From 78eed586f6a0d15162c89878c53a301e7b142a8a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 10 十月 2022 00:07:06 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/card/cardcellList/index.jsx |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 34153e6..df3a4e9 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -9,8 +9,6 @@
 import asyncElementComponent from '@/utils/asyncComponent'
 import { getMark } from '@/utils/utils.js'
 import MkIcon from '@/components/mk-icon'
-import MKEmitter from '@/utils/events.js'
-import LostPng from '@/assets/img/lost.png'
 import Encrypts from '@/components/encrypts'
 import './index.scss'
 
@@ -29,6 +27,7 @@
 const QrCode = asyncElementComponent(() => import('@/components/qrcode'))
 const MkProgress = asyncElementComponent(() => import('@/components/mkProgress'))
 const Video = asyncComponent(() => import('@/components/video'))
+const MkPicture = asyncComponent(() => import('@/components/mkPicture'))
 const PicRadio = {
   '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%',
   '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%',
@@ -555,26 +554,12 @@
         }
   
         let scale = url && card.scale === 'true'
-        let urls = url ? url.split(',').filter(Boolean) : [LostPng]
-  
-        if (!url) {
-          _imagestyle = {backgroundSize: 'contain'}
-        }
+        let urls = url ? url.split(',').filter(Boolean) : ['']
 
         urls.forEach((u, i) => {
           contents.push(<Col key={card.uuid + i} span={card.width}>
             <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
-              <div
-                className={'ant-mk-picture' + (scale ? ' scale' : '')}
-                onClick={(e) => {
-                  if (!scale) return
-
-                  e.stopPropagation()
-  
-                  MKEmitter.emit('mkImageScale', url, urls)
-                }}
-                style={{..._imagestyle, backgroundImage: `url('${u}')`}}
-              ></div>
+              <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/>
             </div>
           </Col>)
         })

--
Gitblit v1.8.0