From 44adf318fc85408dc1678390956c87d96a0fb104 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 01 六月 2023 17:45:01 +0800 Subject: [PATCH] 2-23-06-01 --- src/menu/components/editor/braft-editor/options.jsx | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index c746b12..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 }, -- Gitblit v1.8.0