From f308a19516f0f15c0aca1af87c1aa722af0fee5c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 12 四月 2024 17:48:52 +0800
Subject: [PATCH] 2024-04-12

---
 src/menu/components/card/cardsimplecomponent/options.jsx |   49 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/src/menu/components/card/cardsimplecomponent/options.jsx b/src/menu/components/card/cardsimplecomponent/options.jsx
index 7b397d1..9e177e7 100644
--- a/src/menu/components/card/cardsimplecomponent/options.jsx
+++ b/src/menu/components/card/cardsimplecomponent/options.jsx
@@ -38,16 +38,18 @@
       field: 'condition',
       label: '鏄剧ず鏉′欢',
       initval: setting.condition || 'false',
-      tooltip: '褰撻�夋嫨鈥滄湁鈥濇椂锛屽彧鏈夌鍚堟潯浠剁殑鏁版嵁鎵嶄細灞曠ず銆�',
+      tooltip: '褰撻�夋嫨鈥滆嚜瀹氫箟鈥濇椂锛屽彧鏈夌鍚堟潯浠剁殑鏁版嵁鎵嶄細灞曠ず銆傚綋閫夋嫨鈥滄爣棰樷�濇椂锛屽彧鏈夐琛屾墠浼氬睍绀�',
       required: false,
       options: [
-        {value: 'true', label: '鏈�'},
-        {value: 'false', label: '鏃�'},
+        {value: 'false', label: '濮嬬粓鏄剧ず'},
+        {value: 'true', label: '鑷畾涔�'},
+        {value: 'title', label: '鏍囬'},
       ],
       controlFields: [
         {field: 'controlField', values: ['true']},
         {field: 'controlType', values: ['true']},
         {field: 'controlValue', values: ['true']},
+        {field: 'click', values: ['true', 'false']},
       ]
     },
     {
@@ -83,7 +85,7 @@
       field: 'click',
       label: '鐐瑰嚮浜嬩欢',
       initval: setting.click || '',
-      tooltip: '褰撻�夋嫨瑙﹀彂鎸夐挳鏃讹紝鍙湁褰撳崱鐗囦腑鍙瓨鍦ㄤ竴涓寜閽椂鏈夋晥銆�',
+      // tooltip: '褰撻�夋嫨瑙﹀彂鎸夐挳鏃讹紝鍙湁褰撳崱鐗囦腑鍙瓨鍦ㄤ竴涓寜閽椂鏈夋晥銆�',
       required: false,
       options: [
         {value: '', label: '鏃�'},
@@ -198,6 +200,14 @@
     }
   }
 
+  let ops = []
+  let adapters = sessionStorage.getItem('adapter') || ''
+  if (adapters.indexOf('wxmini') > -1) {
+    ops.push({value: 'miniprogram', label: '灏忕▼搴�'})
+  } else if (setting.click === 'miniprogram') {
+    setting.click = ''
+  }
+
   const cardSettingForm = [
     {
       type: 'text',
@@ -210,6 +220,17 @@
     },
     {
       type: 'radio',
+      field: 'layout',
+      label: '鍏冪礌甯冨眬',
+      initval: setting.layout || 'grid',
+      required: false,
+      options: [
+        {value: 'grid', label: '鏍呮牸甯冨眬'},
+        {value: 'flex', label: '寮规�у竷灞�'},
+      ]
+    },
+    {
+      type: 'radio',
       field: 'click',
       label: '鐐瑰嚮浜嬩欢',
       initval: setting.click || '',
@@ -218,12 +239,15 @@
         {value: '', label: '鏃�'},
         {value: 'menu', label: '鑿滃崟'},
         {value: 'link', label: '閾炬帴'},
+        ...ops
       ],
       controlFields: [
         {field: 'menu', values: ['menu']},
         {field: 'linkurl', values: ['link']},
         {field: 'open', values: ['menu', 'link']},
-        {field: 'joint', values: ['menu', 'link']},
+        {field: 'joint', values: ['menu', 'link', 'miniprogram']},
+        {field: 'miniAppId', values: ['miniprogram']},
+        {field: 'miniPath', values: ['miniprogram']},
       ]
     },
     {
@@ -248,6 +272,21 @@
       forbid: appType !== 'pc' && appType !== 'mob'
     },
     {
+      type: 'text',
+      field: 'miniAppId',
+      label: '灏忕▼搴廇ppID',
+      initval: setting.miniAppId || '',
+      required: true
+    },
+    {
+      type: 'text',
+      field: 'miniPath',
+      label: '椤甸潰璺緞',
+      initval: setting.miniPath || '',
+      tooltip: '鍙寚瀹氳烦杞皬绋嬪簭椤甸潰锛屼负绌烘椂鎵撳紑棣栭〉锛屾敞锛氬弬鏁版嫾鎺ュ湪鎸囧畾椤甸潰鏃舵湁鏁堛��',
+      required: false
+    },
+    {
       type: 'radio',
       field: 'joint',
       label: '鍙傛暟鎷兼帴',

--
Gitblit v1.8.0