From 2a03640349b948f656451a84f205a0972abd8b95 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 27 三月 2024 17:06:03 +0800
Subject: [PATCH] 2024-03-27

---
 src/tabviews/custom/components/card/cardcellList/index.jsx |   54 +++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 8a38647..d30162f 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -880,6 +880,51 @@
             console.warn(e)
             val = ''
           }
+
+          if (!val && card.noValue === 'hide') { // 绌哄�奸殣钘�
+            return null
+          } else if (typeof(val) === 'object' && val.type === 'linkmenu') {
+            // type: 'linkmenu', linkThdMenu: null, menuId: '', value: ``, defaultValue: '', onclick: 'inner'
+            let item = {linkType: 'linkmenu', linkThdMenu: val.linkThdMenu}
+            let _val_ = val.value || ''
+
+            if (!item.linkThdMenu && val.menuId) {
+              item.linkThdMenu = window.GLOB.mkThdMenus.get(val.menuId) || ''
+            }
+            if (!item.linkThdMenu && val.defaultValue) {
+              _val_ = val.defaultValue
+            }
+
+            if (val.onclick === 'inner') {
+              contents.push(
+                <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
+                  <div style={_style}>
+                    <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}}>
+                      <span onClick={(e) => {this.openNewView(e, item)}} dangerouslySetInnerHTML={{__html: _val_}}></span>
+                    </div>
+                  </div>
+                </div>
+              )
+            } else {
+              _style.cursor = 'pointer'
+              contents.push(
+                <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
+                  <div style={_style} onClick={(e) => {this.openNewView(e, item)}}>
+                    <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: _val_}}></div>
+                  </div>
+                </div>
+              )
+            }
+          } else {
+            contents.push(
+              <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
+                <div style={_style}>
+                  <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: val}}></div>
+                </div>
+              </div>
+            )
+          }
+          return
         } else if (card.$sync) {
           if (card.eval === 'false') {
             val = ''
@@ -933,15 +978,6 @@
 
         if (!val && card.noValue === 'hide') { // 绌哄�奸殣钘�
           return null
-        } else if (card.eval === 'func') {
-          contents.push(
-            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
-              <div style={_style}>
-                <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}} dangerouslySetInnerHTML={{__html: val}}></div>
-              </div>
-            </div>
-          )
-          return
         }
 
         if (card.round && typeof(val) === 'number') {

--
Gitblit v1.8.0