From d0e8c7cb64d7d219f7cfec8bc87cf699b9cfe7b2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 08 十一月 2022 12:35:25 +0800 Subject: [PATCH] 2022-11-08 --- src/menu/components/table/normal-table/options.jsx | 172 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 128 insertions(+), 44 deletions(-) diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index 0d0e698..c6caecc 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -1,7 +1,7 @@ /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, action = []) { +export default function (wrap, action = [], columns = []) { let roleList = sessionStorage.getItem('sysRoles') let appType = sessionStorage.getItem('appType') @@ -32,10 +32,33 @@ required: true }, { + type: 'number', + field: 'width', + label: '瀹藉害', + initval: wrap.width || 24, + tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', + min: 1, + max: 24, + precision: 0, + required: true + }, + { + type: 'number', + field: 'height', + label: '楂樺害', + initval: wrap.height || '', + tooltip: '琛ㄦ牸楂樺害锛岀┖鍊兼椂楂樺害鑷�傚簲銆�', + min: 10, + max: 3000, + precision: 0, + required: false, + forbid: appType === 'mob' + }, + { type: 'radio', field: 'tableType', label: '琛ㄦ牸灞炴��', - initval: wrap.tableType, + initval: wrap.tableType || '', required: false, options: [ {value: '', label: '涓嶅彲閫�'}, @@ -78,18 +101,20 @@ {value: 'true', label: '鏄�'}, {value: 'false', label: '鍚�'}, ], - forbid: appType === 'mob' + forbid: appType === 'mob' || appType === 'pc' }, { type: 'radio', field: 'size', label: '琛ㄦ牸澶у皬', initval: wrap.size || 'middle', + tooltip: '琛ㄦ牸鐨勫唴杈硅窛锛屼粠澶у埌灏忎緷娆¢�掑噺銆�', required: false, options: [ {value: 'default', label: '澶�'}, {value: 'middle', label: '涓�'}, {value: 'small', label: '灏�'}, + {value: 'mini', label: '杩蜂綘'}, ] }, { @@ -108,6 +133,7 @@ field: 'selected', label: '棣栬閫変腑', initval: wrap.selected || 'false', + tooltip: '褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆�', required: false, options: [ {value: 'false', label: '鏃�'}, @@ -115,6 +141,18 @@ {value: 'always', label: '鏁版嵁鍔犺浇'}, ] }, + // { + // type: 'radio', + // field: 'show', + // label: '鎼滅储鎸夐挳', + // initval: wrap.show || 'true', + // tooltip: '鎼滅储鏉′欢瀛樺湪鏃讹紝鍙�夋嫨鏄惁鏄剧ず鎼滅储鎸夐挳銆�', + // required: false, + // options: [ + // {value: 'true', label: '鏄剧ず'}, + // {value: 'false', label: '闅愯棌'}, + // ] + // }, { type: 'color', field: 'borderColor', @@ -123,47 +161,36 @@ tooltip: '榛樿鍊� #e8e8e8銆�', required: false }, - { - type: 'color', - field: 'color', - label: '瀛椾綋棰滆壊', - initval: wrap.color || 'rgba(0, 0, 0, 0.65)', - tooltip: '榛樿鍊� rgba(0, 0, 0, 0.65)銆�', - required: false - }, - { - type: 'number', - field: 'fontSize', - label: '瀛椾綋澶у皬', - initval: wrap.fontSize || 24, - min: 12, - max: 30, - precision: 0, - required: false - }, - { - type: 'number', - field: 'width', - label: '瀹藉害', - initval: wrap.width || 24, - tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', - min: 1, - max: 24, - precision: 0, - required: true - }, - { - type: 'number', - field: 'advanceWidth', - label: '楂樼骇鎼滅储', - initval: wrap.advanceWidth || 1000, - tooltip: '楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��', - min: 10, - max: 3000, - precision: 0, - required: false, - forbid: appType === 'mob' - }, + // { + // type: 'color', + // field: 'color', + // label: '瀛椾綋棰滆壊', + // initval: wrap.color || 'rgba(0, 0, 0, 0.65)', + // tooltip: '榛樿鍊� rgba(0, 0, 0, 0.65)銆�', + // required: false + // }, + // { + // type: 'number', + // field: 'fontSize', + // label: '瀛椾綋澶у皬', + // initval: wrap.fontSize || 14, + // min: 12, + // max: 30, + // precision: 0, + // required: false + // }, + // { + // type: 'number', + // field: 'advanceWidth', + // label: '楂樼骇鎼滅储', + // initval: wrap.advanceWidth || 1000, + // tooltip: '楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��', + // min: 10, + // max: 3000, + // precision: 0, + // required: false, + // forbid: appType === 'mob' + // }, { type: 'select', field: 'doubleClick', @@ -176,6 +203,63 @@ forbid: appType === 'mob' }, { + type: 'select', + field: 'controlField', + label: '绂佺敤瀛楁', + initval: wrap.controlField || '', + tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�', + required: false, + allowClear: true, + options: columns, + controlFields: [ + {field: 'controlVal', notNull: true}, + ] + }, + { + type: 'text', + field: 'controlVal', + label: '绂佺敤鍊�', + initval: wrap.controlVal || '', + tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + required: false + }, + { + type: 'radio', + field: 'empty', + label: '绌哄�奸殣钘�', + initval: wrap.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + options: [ + {value: 'show', label: '鍚�'}, + {value: 'hidden', label: '鏄�'}, + ], + }, + { + type: 'radio', + field: 'supKey', + label: '涓婄骇涓婚敭', + initval: wrap.supKey || 'true', + tooltip: '褰撹缃笂绾х粍浠舵椂锛屼笂绾т富閿�间负绌烘槸鍚﹁繘琛屾暟鎹煡璇€��', + required: false, + options: [ + {value: 'true', label: '楠岃瘉'}, + {value: 'false', label: '蹇界暐'}, + ], + }, + { + type: 'radio', + field: 'permission', + label: '鏉冮檺楠岃瘉', + initval: wrap.permission || 'false', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !appType + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', -- Gitblit v1.8.0