From f267d04e0561a0a20d1f2a9f558a273558ece90d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 五月 2021 17:50:19 +0800
Subject: [PATCH] 2021-05-24

---
 src/menu/components/card/cardcellcomponent/dragaction/card.jsx |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
index 96b6549..448cb6a 100644
--- a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
+++ b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -11,13 +11,18 @@
 import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
-
+import { resetStyle } from '@/utils/utils-custom.js'
 import './index.scss'
 
 const BarCode = asyncComponent(() => import('@/components/barcode'))
 const QrCode = asyncComponent(() => import('@/components/qrcode'))
 const Video = asyncComponent(() => import('@/components/video'))
 const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent'))
+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%',
+  '10:1': '10%', '3:4': '133.33%', '2:3': '150%', '9:16': '177.78%'
+}
 
 const Card = ({ id, parent, fields, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, updateMarks, doubleClickCard }) => {
   const originalIndex = findCard(id).index
@@ -45,6 +50,7 @@
   
   if (card.style) {
     _style = {...card.style, opacity: isDragging ? 0 : 1}
+    _style = resetStyle(_style)
   }
 
   const getContent = () => {
@@ -85,12 +91,8 @@
         _imagestyle.borderRadius = card.style.borderRadius
       }
 
-      if (card.lenWidRadio === '16:9') {
-        _imagestyle.paddingTop = '56.25%'
-      } else if (card.lenWidRadio === '3:2') {
-        _imagestyle.paddingTop = '66.67%'
-      } else if (card.lenWidRadio === '4:3') {
-        _imagestyle.paddingTop = '75%'
+      if (PicRadio[card.lenWidRadio]) {
+        _imagestyle.paddingTop = PicRadio[card.lenWidRadio]
       } else {
         _imagestyle.paddingTop = '100%'
       }

--
Gitblit v1.8.0