From 5ed69b4bb3416ec61abf424375af8650864dbdfa Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 08 八月 2021 17:27:10 +0800
Subject: [PATCH] 2021-08-08

---
 src/components/imgScale/index.jsx |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/imgScale/index.jsx b/src/components/imgScale/index.jsx
index 8363674..f948dd7 100644
--- a/src/components/imgScale/index.jsx
+++ b/src/components/imgScale/index.jsx
@@ -39,12 +39,14 @@
     if (url || !src) return
 
     let index = 0
+    let _list = []
 
-    if (list.length > 0) {
+    if (list.length > 1) {
       index = list.indexOf(src)
+      _list = list
     }
 
-    this.setState({url: src, className: 'opening', list, scale: 1, rotate: 0, index})
+    this.setState({url: src, className: 'opening', list: _list, scale: 1, rotate: 0, index})
     setTimeout(() => {
       this.setState({className: 'open'})
     }, 300)

--
Gitblit v1.8.0