From e1cee96b38805bcccf48e7bcb9d296f2bc54c720 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 24 一月 2025 11:10:32 +0800
Subject: [PATCH] 2025-01-24

---
 src/menu/components/carousel/data-card/options.jsx |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx
index 6193479..cf5156a 100644
--- a/src/menu/components/carousel/data-card/options.jsx
+++ b/src/menu/components/carousel/data-card/options.jsx
@@ -4,6 +4,7 @@
 export default function (wrap, subtype) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
 
   if (roleList) {
     try {
@@ -16,6 +17,13 @@
   }
 
   const cardWrapForm = [
+    {
+      type: 'text',
+      field: 'title',
+      label: '鏍囬',
+      initval: wrap.title || '',
+      required: false
+    },
     {
       type: 'text',
       field: 'name',
@@ -46,9 +54,9 @@
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
       ],
-      controlFields: [
+      controlFields: subtype === 'propcard' ? [
         {field: 'empty', values: ['dynamic']},
-      ],
+      ] : null,
       forbid: subtype !== 'propcard'
     },
     {
@@ -64,6 +72,7 @@
       controlFields: [
         {field: 'modalWidth', values: ['modal']},
         {field: 'modalContent', values: ['modal']},
+        {field: 'code', values: ['modal']},
       ]
     },
     {
@@ -71,6 +80,7 @@
       field: 'modalContent',
       label: '寮圭獥鍐呭',
       initval: wrap.modalContent || 'message',
+      tooltip: '浣跨敤绯荤粺鏇存柊鏃讹紝濡傛灉杩斿洖鍊肩殑ErrCode涓�-1锛屽彧浼氬仛绯荤粺閰嶇疆鏇存柊涓嶄細鏄剧ず寮圭獥銆傛敞锛氭暟鎹簮浣跨敤鍚屾鏌ヨ鏃舵棤鏁堛��',
       required: false,
       options: [
         {value: 'message', label: '娑堟伅鎻愰啋'},
@@ -93,6 +103,18 @@
       required: true,
       options: ['px', 'vw'],
       forbid: appType === 'mob'
+    },
+    {
+      type: 'text',
+      field: 'code',
+      label: '娑堟伅缂栫爜',
+      initval: wrap.code || '',
+      tooltip: '鐢ㄤ簬璁板綍娑堟伅鏄惁宸茶鐨勬爣璇嗭紝濡傛灉涓嶅悓椤甸潰涓瓨鍦ㄧ浉鍚屾秷鎭紝鍙寚瀹氬浐瀹氬�笺��',
+      required: false,
+      rules: [{
+        pattern: /^[0-9a-zA-Z_]*$/ig,
+        message: '鍙厑璁稿寘鍚暟瀛椼�佸瓧姣嶄互鍙奯銆�'
+      }]
     },
     {
       type: 'radio',
@@ -175,7 +197,6 @@
       initval: wrap.empty || 'show',
       tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
       required: false,
-      skip: true,
       options: [
         {value: 'show', label: '鍚�'},
         {value: 'hidden', label: '鏄�'},
@@ -185,13 +206,25 @@
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
-      initval: wrap.permission || 'false',
+      initval: wrap.permission || (!appType ? 'true' : 'false'),
       required: false,
       options: [
-        {value: 'true', label: '鍚敤'},
+        {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: ispop
+    },
+    {
+      type: 'radio',
+      field: 'cacheLocal',
+      label: '鏈湴缂撳瓨',
+      initval: wrap.cacheLocal || 'true',
+      required: false,
+      options: [
+        {value: 'true', label: '缁ф壙鑿滃崟'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      forbid: ispop
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0