From 010fdcf8abd58bde5c1106db8ed8448effc75b4b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 25 二月 2025 16:37:46 +0800 Subject: [PATCH] 2025-02-25 --- src/menu/components/editor/braft-editor/options.jsx | 78 ++++++++++++++++++++++++++++++++------- 1 files changed, 64 insertions(+), 14 deletions(-) diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index d3f260f..91f403e 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -31,6 +31,20 @@ roleList = [] } + let tbStyle = wrap.tbStyle ? wrap.tbStyle.split(' ') : [] + let splitLine = 'false' + if (tbStyle.includes('deep-split')) { + tbStyle = tbStyle.filter(n => n !== 'deep-split') + splitLine = 'true' + } + let loads = [] + if (wrap.loaded === 'true') { + loads.push('loaded') + } + if (wrap.preload === 'true') { + loads.push('preload') + } + const cardWrapForm = [ { type: 'text', @@ -134,26 +148,62 @@ type: 'checkbox', field: 'tbStyle', label: '琛ㄦ牸鏍峰紡', - initval: wrap.tbStyle ? wrap.tbStyle.split(' ') : [], + initval: tbStyle, + tooltip: '瀵屾枃鏈腑琛ㄦ牸鐨勬牱寮忥紝娉細閫夋嫨鈥滆竟妗嗗姞绮椻�濇垨鈥滆竟妗嗛鑹插姞娣扁�濇椂鈥滄棤杈规鈥濇棤鏁堛��', required: false, options: [ {value: 'th-light', label: '琛ㄥご閫忔槑'}, - {value: 'no-border', label: '鏃犺竟妗�'}, {value: 'tb-flex', label: '鍒楃瓑瀹�'}, + {value: 'no-border', label: '鏃犺竟妗�'}, + {value: 'bold-border', label: '杈规鍔犵矖'}, + {value: 'deep-border', label: '杈规棰滆壊鍔犳繁'}, + {value: 'word-break', label: '寮哄埗鎹㈣'}, + ], + span: 24 + }, + { + type: 'radio', + field: 'splitLine', + label: '鍒嗗壊绾垮姞娣�', + initval: splitLine, + required: false, + options: [ + {value: 'false', label: '鍚�'}, + {value: 'true', label: '鏄�'}, + ], + }, + { + type: 'checkbox', + field: 'loads', + label: '甯冨眬璋冩暣', + initval: loads, + required: false, + tooltip: '棰勫鐞嗗叆鍙俬tml銆乨ata锛岃繑鍥炰慨鏀瑰悗鐨刪tml锛涘悗澶勭悊鍏ュ弬涓篽tml锛屽彲閫氳繃椤甸潰鍏冪礌鐨勬牱寮忚皟鏁村苟杩斿洖澶勭悊鍚庣殑html銆�', + options: [ + {value: 'preload', label: '棰勫鐞�'}, + {value: 'loaded', label: '鍚庡鐞�'}, + ], + controlFields: [ + {field: 'prefunc', values: ['preload']}, + {field: 'loadedfunc', values: ['loaded']}, ] }, - // { - // type: 'radio', - // field: 'firstTr', - // label: '琛ㄦ牸棣栬', - // initval: wrap.firstTr || 'deep', - // tooltip: '瀵屾枃鏈腑table鐨勯琛岃儗鏅鑹层��', - // required: false, - // options: [ - // {value: 'deep', label: '娣辫壊'}, - // {value: 'light', label: '娴呰壊'}, - // ] - // }, + { + type: 'codemirror', + field: 'prefunc', + label: '棰勫鐞嗚剼鏈�', + initval: wrap.prefunc || '', + required: true, + span: 24 + }, + { + type: 'codemirror', + field: 'loadedfunc', + label: '鍚庡鐞嗚剼鏈�', + initval: wrap.loadedfunc || '', + required: true, + span: 24 + }, { type: 'radio', field: 'permission', -- Gitblit v1.8.0