From 4453a9e63e8e176c70c432b03fd4ba3ebf00a04c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 二月 2023 14:55:20 +0800
Subject: [PATCH] 2023-02-09

---
 src/menu/components/card/cardcellcomponent/dragaction/card.jsx |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
index 197c671..8069bcf 100644
--- a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
+++ b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -101,32 +101,29 @@
       //   </div>
       // )
     } else if (card.eleType === 'picture') {
-      let _imagestyle = {}
+      let _imagestyle = {
+        backgroundSize: card.style.backgroundSize || 'cover',
+        backgroundPosition: card.style.backgroundPosition || 'center',
+        backgroundRepeat: card.style.backgroundRepeat || 'no-repeat',
+        borderRadius: card.style.borderRadius || 0
+      }
       let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar')
 
       if (url) {
         url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
-        _imagestyle = {backgroundImage: `url('${url}')`}
+        _imagestyle.backgroundImage = `url('${url}')`
       } else {
         let index = card.uuid.match(/\d{1}/g)
         index = index.slice(-1)[0] % 5
         let demos = [demo1, demo2, demo3, demo4, demo5]
 
-        _imagestyle = {backgroundImage: `url('${demos[index]}')`}
-      }
-
-      if (card.style && card.style.borderRadius) {
-        _imagestyle.borderRadius = card.style.borderRadius
+        _imagestyle.backgroundImage = `url('${demos[index]}')`
       }
 
       if (PicRadio[card.lenWidRadio]) {
         _imagestyle.paddingTop = PicRadio[card.lenWidRadio]
       } else {
         _imagestyle.paddingTop = '100%'
-      }
-
-      if (card.backgroundSize) {
-        _imagestyle.backgroundSize = card.backgroundSize
       }
 
       return (

--
Gitblit v1.8.0