From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 14 六月 2023 09:55:50 +0800 Subject: [PATCH] 2023-06-14 --- src/menu/components/editor/braft-editor/options.jsx | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index 3c33098..908efea 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -80,14 +80,33 @@ label: '鏁版嵁婧�', initval: wrap.publicId || '', required: true, - options: interfaces + options: interfaces, + reset_source: true, + callback: (map, record) => { + if (!record.publicId) return + + let interfaces = window.GLOB.customMenu.interfaces || [] + + let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0] + + if (!d || !d.columns) return + + let columns = JSON.parse(JSON.stringify(d.columns)) + + let _field = map.get('field') + + if (_field) { + _field.options = columns + _field.oriOptions = columns + map.set('field', _field) + } + } }, { type: 'select', field: 'field', label: '鏂囨湰瀛楁', initval: wrap.field || '', - tooltip: '閫夋嫨鍔ㄦ�佸�兼椂锛岄渶璁剧疆鏂囨湰瀛楁鎵嶅彲鐢熸晥锛屼娇鐢ㄥ叕鍏辨暟鎹簮鏃讹紝闇�鍏堜繚瀛樻暟鎹簮鍚庡啀閫夊彇鏂囨湰瀛楁銆�', required: false, options: columns }, @@ -118,6 +137,18 @@ }, { type: 'radio', + field: 'firstTr', + label: '琛ㄦ牸棣栬', + initval: wrap.firstTr || 'deep', + tooltip: '瀵屾枃鏈腑table鐨勯琛岃儗鏅鑹层��', + required: false, + options: [ + {value: 'deep', label: '娣辫壊'}, + {value: 'light', label: '娴呰壊'}, + ] + }, + { + type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', initval: wrap.permission || 'false', -- Gitblit v1.8.0