From 0c168ce15c9e166c98a1f1ad1decc073dfec2ea4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十二月 2024 16:45:18 +0800 Subject: [PATCH] 2024-12-10 --- src/tabviews/custom/components/editor/braft-editor/index.scss | 5 +++++ src/menu/components/editor/braft-editor/index.jsx | 7 +++++++ src/menu/components/editor/braft-editor/options.jsx | 32 +++++++++++++++++++------------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/menu/components/editor/braft-editor/index.jsx b/src/menu/components/editor/braft-editor/index.jsx index 553f4b0..0878d3e 100644 --- a/src/menu/components/editor/braft-editor/index.jsx +++ b/src/menu/components/editor/braft-editor/index.jsx @@ -152,9 +152,16 @@ if (res.tbStyle.includes('no-border') && (res.tbStyle.includes('bold-border') || res.tbStyle.includes('deep-border'))) { res.tbStyle = res.tbStyle.filter(item => item !== 'no-border') } + + if (res.splitLine === 'true') { + res.tbStyle.push('deep-split') + } + res.tbStyle = res.tbStyle.join(' ') } + delete res.splitLine + let _card = {...card, wrap: res} if (res.datatype === 'public') { diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index 44defce..70910be 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -31,6 +31,13 @@ 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' + } + const cardWrapForm = [ { type: 'text', @@ -134,7 +141,7 @@ type: 'checkbox', field: 'tbStyle', label: '琛ㄦ牸鏍峰紡', - initval: wrap.tbStyle ? wrap.tbStyle.split(' ') : [], + initval: tbStyle, tooltip: '瀵屾枃鏈腑琛ㄦ牸鐨勬牱寮忥紝娉細閫夋嫨鈥滆竟妗嗗姞绮椻�濇垨鈥滆竟妗嗛鑹插姞娣扁�濇椂鈥滄棤杈规鈥濇棤鏁堛��', required: false, options: [ @@ -146,18 +153,17 @@ ], span: 24 }, - // { - // type: 'radio', - // field: 'firstTr', - // label: '琛ㄦ牸棣栬', - // initval: wrap.firstTr || 'deep', - // tooltip: '瀵屾枃鏈腑table鐨勯琛岃儗鏅鑹层��', - // required: false, - // options: [ - // {value: 'deep', label: '娣辫壊'}, - // {value: 'light', label: '娴呰壊'}, - // ] - // }, + { + type: 'radio', + field: 'splitLine', + label: '鍒嗗壊绾垮姞娣�', + initval: splitLine, + required: false, + options: [ + {value: 'false', label: '鍚�'}, + {value: 'true', label: '鏄�'}, + ], + }, { type: 'radio', field: 'permission', diff --git a/src/tabviews/custom/components/editor/braft-editor/index.scss b/src/tabviews/custom/components/editor/braft-editor/index.scss index 37fd26d..ea58f85 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.scss +++ b/src/tabviews/custom/components/editor/braft-editor/index.scss @@ -74,6 +74,11 @@ } } } +.custom-braft-editor-box.deep-split { + .braft-content hr { + border-color: rgba(0, 0, 0, 0.85)!important; + } +} .custom-braft-editor-box::after { content: ' '; -- Gitblit v1.8.0