From f128d679cacda2a6b5b730ad0368b5fe73f887f7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 14 二月 2025 15:27:02 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/calendar/index.jsx |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/calendar/index.jsx b/src/menu/components/calendar/index.jsx
index e4bf1fb..9c69391 100644
--- a/src/menu/components/calendar/index.jsx
+++ b/src/menu/components/calendar/index.jsx
@@ -129,6 +129,8 @@
       if (card.errors.length === 0) {
         card.$tables = getTables(card)
       }
+
+      delete card.$c_ds
     }
 
     this.setState({
@@ -175,9 +177,9 @@
     res.resetContrl = card.wrap.resetContrl || 'init'
 
     if (res.colorField && res.signs) {
-      res.signs = res.signs.map(item => {
+      res.signs = res.signs.map((item, i) => {
         try {
-          let colors = item.color.match(/\d+/g)
+          let colors = item.background.match(/\d+/g)
           if ((colors[0] * 0.299 + colors[1] * 0.578 + colors[2] * 0.114) * colors[3] < 192) {
             item.fontColor = '#ffffff'
           } else {
@@ -187,6 +189,13 @@
           item.fontColor = ''
         }
 
+        item.style = {background: item.background}
+        if (item.fontColor) {
+          item.style.color = item.fontColor
+        }
+
+        item.$index = i + 1
+
         return item
       })
     }

--
Gitblit v1.8.0