From d77bffddf598583a1a11ed8068d9df5bc2acdac2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 21 二月 2024 14:27:40 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/carousel/data-card/options.jsx | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 111 insertions(+), 3 deletions(-) diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx index ce39a9a..f7ba65c 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,7 +54,67 @@ {value: 'dynamic', label: '鍔ㄦ��'}, {value: 'static', label: '闈欐��'}, ], + controlFields: [ + {field: 'empty', values: ['dynamic']}, + ], forbid: subtype !== 'propcard' + }, + { + type: 'radio', + field: 'display', + label: '鏄剧ず妯″紡', + initval: wrap.display || 'normal', + required: false, + options: [ + {value: 'normal', label: '姝e父'}, + {value: 'modal', label: '寮圭獥'}, + ], + controlFields: [ + {field: 'modalWidth', values: ['modal']}, + {field: 'modalContent', values: ['modal']}, + {field: 'code', values: ['modal']}, + ] + }, + { + type: 'radio', + field: 'modalContent', + label: '寮圭獥鍐呭', + initval: wrap.modalContent || 'message', + tooltip: '浣跨敤绯荤粺鏇存柊鏃讹紝濡傛灉杩斿洖鍊肩殑ErrCode涓�-1锛屽彧浼氬仛绯荤粺閰嶇疆鏇存柊涓嶄細鏄剧ず寮圭獥銆傛敞锛氭暟鎹簮浣跨敤鍚屾鏌ヨ鏃舵棤鏁堛��', + required: false, + options: [ + {value: 'message', label: '娑堟伅鎻愰啋'}, + {value: 'update', label: '绯荤粺鏇存柊'}, + ] + }, + { + type: 'styleInput', + field: 'height', + label: '缁勪欢楂樺害', + initval: wrap.height || '', + required: true, + options: ['px', 'vh'] + }, + { + type: 'styleInput', + field: 'modalWidth', + label: '寮圭獥瀹藉害', + initval: wrap.modalWidth || '300px', + 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', @@ -56,7 +124,10 @@ required: false, options: [ {value: 'false', label: '鍚�'}, - {value: 'true', label: '鏄�'}, + {value: 'true', label: '鏄�'} + ], + controlFields: [ + {field: 'speed', values: ['true']} ] }, { @@ -64,7 +135,7 @@ field: 'speed', label: '鏃堕棿闂撮殧', initval: wrap.speed || 3, - tooltip: '浣跨敤鑷姩鍒囨崲鏃舵湁鏁堬紝榛樿涓�3绉�', + tooltip: '榛樿涓�3绉�', min: 1, max: 100, precision: 0, @@ -91,7 +162,7 @@ {value: 'true', label: '鏄�'}, {value: 'false', label: '鍚�'}, ], - forbid: true // v5 涓嶆敮鎸佸瀭鐩存樉绀� + forbid: appType !== 'mob' }, { type: 'radio', @@ -120,6 +191,43 @@ forbid: appType === 'mob' }, { + type: 'radio', + field: 'empty', + label: '绌哄�奸殣钘�', + initval: wrap.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + skip: true, + options: [ + {value: 'show', label: '鍚�'}, + {value: 'hidden', label: '鏄�'}, + ], + }, + { + type: 'radio', + field: 'permission', + label: '鏉冮檺楠岃瘉', + initval: wrap.permission || (!appType ? 'true' : 'false'), + required: false, + options: [ + {value: 'true', label: !appType ? '缁ф壙鑿滃崟' : '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop + }, + { + type: 'radio', + field: 'cacheLocal', + label: '鏈湴缂撳瓨', + initval: wrap.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', label: '缁ф壙鑿滃崟'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', -- Gitblit v1.8.0