From 432b788acf901b0720184b8ee8bc81a2e6fa47e0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 28 九月 2021 18:22:02 +0800
Subject: [PATCH] 2021-09-28

---
 src/menu/components/card/cardcomponent/options.jsx |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx
index cd79835..c59147a 100644
--- a/src/menu/components/card/cardcomponent/options.jsx
+++ b/src/menu/components/card/cardcomponent/options.jsx
@@ -1,7 +1,7 @@
 /**
  * @description Setting琛ㄥ崟閰嶇疆淇℃伅
  */
-export default function (setting, hasPrimaryKey) {
+export default function (setting, hasPrimaryKey, buttons = []) {
   let appType = sessionStorage.getItem('appType')
 
   let menulist = []
@@ -12,7 +12,7 @@
     if (appmenulist) {
       try {
         appmenulist = JSON.parse(appmenulist)
-      } catch {
+      } catch (e) {
         appmenulist = []
       }
     } else {
@@ -23,7 +23,7 @@
     if (menulist) {
       try {
         menulist = JSON.parse(menulist)
-      } catch {
+      } catch (e) {
         menulist = []
       }
     } else {
@@ -82,7 +82,7 @@
       field: 'primaryId',
       label: '涓婚敭鍊�',
       initval: setting.primaryId || '',
-      tooltip: '鍗$墖鐐瑰嚮鏃讹紝鍚戝叾浠栫粍浠朵紶閫掔殑ID鍊笺��',
+      tooltip: '璁剧疆涓�涓睘鎬у崱闈欐�両D锛屽悜鍏朵粬缁勪欢浼犻�掔殑鎸囧畾闈欐�両D鍊�',
       required: false,
       forbid: !hasPrimaryKey
     },
@@ -104,6 +104,7 @@
         {field: 'linkurl', values: ['link']},
         {field: 'open', values: ['menu', 'link']},
         {field: 'joint', values: ['menu', 'link']},
+        {field: 'linkbtn', values: ['button']},
       ]
     },
     {
@@ -146,6 +147,14 @@
         {value: 'false', label: '鍚�'},
       ],
     },
+    {
+      type: 'select',
+      field: 'linkbtn',
+      label: '鍏宠仈鎸夐挳',
+      initval: setting.linkbtn || '',
+      required: true,
+      options: buttons
+    }
   ]
 
   return cardSettingForm

--
Gitblit v1.8.0