From bd6521dcc02d1b224016c4df9e36388668989d0c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 10 七月 2023 00:58:17 +0800
Subject: [PATCH] 2023-07-10

---
 src/tabviews/custom/components/calendar/index.jsx |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/custom/components/calendar/index.jsx b/src/tabviews/custom/components/calendar/index.jsx
index 0d7c725..628bfeb 100644
--- a/src/tabviews/custom/components/calendar/index.jsx
+++ b/src/tabviews/custom/components/calendar/index.jsx
@@ -59,6 +59,12 @@
       _config.wrap.colorField = ''
     }
 
+    if (_config.action[0] && _config.action[0].config && _config.action[0].config.enabled) {
+      _config.setting.linkbtn = _config.action[0].uuid
+    } else {
+      _config.action = []
+    }
+
     this.setState({
       BID: BData ? (BData.$BID || '') : '',
       BData: BData,
@@ -301,6 +307,18 @@
     })
   }
 
+  yearChange = (value) => {
+    const { config } = this.state
+
+    if (!config.setting.$re_year) return
+
+    this.setState({
+      year: value
+    }, () => {
+      this.loadData()
+    })
+  }
+
   render() {
     const { config, loading, data, BID, BData } = this.state
 
@@ -319,7 +337,7 @@
         {config.action[0] ? 
           <PopupButton disabled={false} BID={BID} btn={config.action[0]} BData={BData} setting={config.setting} selectedData={[]}/> : null
         }
-        <CalendarBoard config={config} data={data}/>
+        <CalendarBoard config={config} data={data} yearChange={this.yearChange}/>
       </div>
     )
   }

--
Gitblit v1.8.0