From 94fe37551855f542d1cbad8b7af7fe3311daeddb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 六月 2022 00:56:51 +0800 Subject: [PATCH] 2022-06-02 --- src/menu/components/card/cardcellcomponent/formconfig.jsx | 151 +++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 129 insertions(+), 22 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index ee0f0b8..a97d103 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -8,7 +8,7 @@ * @param {*} card * @param {*} type */ -export function getCardCellForm (card, type, subtype, cardCell) { +export function getCardCellForm (card, type, subtype, cardCell, anchors) { let _options = [ { value: 'text', text: '鏂囨湰'}, { value: 'number', text: '鏁板��'}, @@ -43,15 +43,9 @@ } } - let dataTypes = [ - { value: 'dynamic', text: '鍔ㄦ��' }, - { value: 'static', text: '闈欐��' } - ] + let tooltip = '' if (cardCell.$cardType === 'extendCard') { - card.datatype = 'static' - dataTypes = [ - { value: 'static', text: '闈欐��' } - ] + tooltip = '鍦ㄦ墿灞曞崱鐗囦腑锛屽姩鎬佹暟鎹樉绀哄�间负鑾峰彇鍒扮殑绗竴琛屾暟鎹��' } let forms = [ @@ -75,8 +69,12 @@ key: 'datatype', label: '鏁版嵁绫诲瀷', initVal: card.datatype || 'static', + tooltip, required: true, - options: dataTypes + options: [ + { value: 'dynamic', text: '鍔ㄦ��' }, + { value: 'static', text: '闈欐��' } + ] }, { type: 'select', @@ -126,6 +124,42 @@ ] }, { + type: 'number', + key: 'startTime', + precision: 0, + label: '寮�濮嬫椂闂�', + initVal: card.startTime || 0, + tooltip: '瑙嗛寮�濮嬫挱鏀剧殑鏃堕棿锛岀敤浜庤皟鏁磋棰戝垵濮嬪寲灞曠ず鐨勭晫闈€��', + required: false + }, + { + type: 'radio', + key: 'posterType', + label: '棰勮鍥�', + initVal: card.posterType || '', + required: false, + options: [ + { value: '', text: '鏃�' }, + { value: 'dynamic', text: '鍔ㄦ��' }, + { value: 'static', text: '闈欐��' } + ] + }, + { + type: 'file', + key: 'posterUrl', + label: '棰勮鍦板潃', + initVal: card.posterUrl || '', + maxfile: 1, + required: true + }, + { + type: 'select', + key: 'posterField', + label: '棰勮鍦板潃', + initVal: card.posterField || '', + required: true + }, + { type: 'select', key: 'format', label: '鏍煎紡鍖�', @@ -138,6 +172,8 @@ { value: 'thdSeparator', text: '鍗冨垎浣�' }, { value: 'abs', text: '缁濆鍊�' }, { value: 'YYYY-MM-DD', text: 'YYYY-MM-DD' }, + { value: 'YYYY-MM-DD HH:mm', text: 'YYYY-MM-DD HH:mm' }, + { value: 'YYYY-MM-DD HH:mm:ss', text: 'YYYY-MM-DD HH:mm:ss' }, { value: 'MM鏈圖D鏃�', text: 'MM鏈圖D鏃�' }, { value: 'YYYY骞碝M鏈圖D鏃�', text: 'YYYY骞碝M鏈圖D鏃�' }, { value: 'HH:mm', text: '鏃跺垎锛堜緥锛�16:57锛�' }, @@ -313,6 +349,25 @@ required: false }, { + type: 'select', + key: 'bgImage', + label: '鍔ㄦ�佽儗鏅�', + initVal: card.bgImage || '', + tooltip: '缁戝畾鏁版嵁婧愬瓧娈碉紝鍙牴鎹繑鍥炲�兼敼鍙樿儗鏅浘銆�', + required: false, + allowClear: true, + options: [] + }, + { + type: 'cascader', + key: 'anchors', + label: '璺宠浆閿氱偣', + initVal: card.anchors || [], + tooltip: sessionStorage.getItem('appType') === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : '', + required: false, + options: anchors + }, + { type: 'number', key: 'barHeight', min: 5, @@ -393,6 +448,7 @@ label: '鏈�澶у搴�', initVal: card.maxWidth || '', tooltip: '鍥剧墖瀹藉害鐨勬渶澶у�笺��', + help: '娉細姝ゅ�煎瓨鍦ㄦ椂锛屽乏鍙冲杈硅窛涓�0灞呬腑鏄剧ず銆�', required: false, }, { @@ -413,7 +469,6 @@ initVal: card.link || '', tooltip: '鍔ㄦ�佸湴鍧�涓虹粦瀹氬瓧娈靛�笺��', required: false, - // forbid: isApp, options: [ { value: '', text: '鏃�' }, { value: 'dynamic', text: '鍔ㄦ��' }, @@ -426,7 +481,6 @@ label: '閾炬帴绫诲瀷', initVal: card.linkType || 'other', required: false, - // forbid: isApp, options: [ { value: 'tel', text: '鐢佃瘽' }, { value: 'email', text: '閭' }, @@ -464,15 +518,6 @@ // { value: 'blank', text: '鏂伴〉闈�' }, // { value: 'self', text: '褰撳墠椤甸潰' } // ] - // }, - // { - // type: 'select', - // key: 'copyMenuId', - // label: '澶嶅埗鑿滃崟', - // initVal: card.copyMenuId || '', - // required: false, - // forbid: !isApp, - // options: appMenus // }, { type: 'select', @@ -516,7 +561,7 @@ key: 'formula', label: '鍏紡', initVal: card.formula || '', - tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋溿�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�', + tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋滐紝鍦ㄤ笉浣跨敤瑙f瀽鏃舵崲琛岀鎴栫┖鏍间細鏇挎崲涓洪〉闈㈠厓绱犮�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�', placeholder: '渚嬪锛欯price@ * @number@', required: true }, @@ -532,6 +577,68 @@ { value: 'hide', text: '闅愯棌' } ] }, + { + type: 'radio', + key: 'fixStyle', + label: '鍓嶅悗缂�', + initVal: card.fixStyle || '', + tooltip: '鍓嶇紑涓庡悗缂�锛屼娇鐢ㄤ笌鍐呭缁熶竴鐨勬牱寮忚繕鏄嫭绔嬫牱寮忋��', + required: false, + options: [ + { value: '', text: '缁熶竴鏍峰紡' }, + { value: 'alone', text: '鐙珛鏍峰紡' } + ] + }, + { + type: 'radio', + key: 'copyable', + label: '鍙鍒�', + initVal: card.copyable || 'false', + tooltip: '鍏冪礌鏄惁鍙鍒讹紝澶嶅埗鍐呭鍖呮嫭鍓嶇紑涓庡悗缂�銆�', + required: false, + options: [ + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } + ] + }, + { + type: 'number', + key: 'fixSize', + min: 10, + max: 300, + label: '瀛椾綋澶у皬', + initVal: card.fixSize || 14, + tooltip: '鍓嶇紑銆佸悗缂�鐨勫瓧浣撳ぇ灏忋��', + required: true + }, + { + type: 'color', + key: 'fixColor', + label: '瀛椾綋棰滆壊', + initVal: card.fixColor || 'rgba(0, 0, 0, 0.65)', + tooltip: '鍓嶇紑銆佸悗缂�鐨勫瓧浣撻鑹层��', + required: true + }, + { + type: 'number', + key: 'fixLeft', + min: 0, + max: 1000, + label: '宸﹁竟璺�', + initVal: card.fixLeft || 0, + tooltip: '鍓嶇紑銆佸悗缂�鐨勫乏杈硅窛銆�', + required: false + }, + { + type: 'number', + key: 'fixRight', + min: 0, + max: 1000, + label: '鍙宠竟璺�', + initVal: card.fixRight || 0, + tooltip: '鍓嶇紑銆佸悗缂�鐨勫彸杈硅窛銆�', + required: false + }, ] return forms -- Gitblit v1.8.0