From 726ef579edf490469398a977fb621e70bd0c816d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 07 二月 2025 23:59:57 +0800 Subject: [PATCH] 2025-02-07 --- src/menu/components/editor/braft-editor/index.jsx | 2 +- src/tabviews/custom/components/editor/braft-editor/index.jsx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/menu/components/editor/braft-editor/index.jsx b/src/menu/components/editor/braft-editor/index.jsx index 8765707..c9e9cd9 100644 --- a/src/menu/components/editor/braft-editor/index.jsx +++ b/src/menu/components/editor/braft-editor/index.jsx @@ -212,7 +212,7 @@ } trigger="hover"> <ToolOutlined /> </Popover> - <BraftContent value={card.wrap.datatype !== 'static' ? '<p class="empty-content"><span>瀵屾枃鏈�<span>瀛楃鏇挎崲锛氱┖鏍�(blank_space_**)锛屽叾涓�**浠h〃绌烘牸鏁般�� </span></span></p>' : card.html}/> + <BraftContent value={card.wrap.datatype !== 'static' ? '<p class="empty-content"><span>瀵屾枃鏈�<span>瀛楃鏇挎崲锛�$blank_space_**$(绌烘牸锛屽叾涓�**浠h〃绌烘牸鏁�)銆� </span></span></p>' : card.html}/> <div className="component-name"> <div className="center"> <div className="title">{card.name}</div> diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index 4f70285..eff5b65 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -64,9 +64,9 @@ _data = [_data] } } else if (_config.html) { - if (/blank_space_\d+/ig.test(_config.html)) { - _config.html = _config.html.replace(/blank_space_\d+/ig, (w) => { - let n = +w.replace(/blank_space_/ig, '') + if (/\$blank_space_\d+\$/ig.test(_config.html)) { + _config.html = _config.html.replace(/\$blank_space_\d+\$/ig, (w) => { + let n = +w.replace(/blank_space_|\$/ig, '') if (n) { return new Array(n).fill(' ').join('') } @@ -273,9 +273,9 @@ }) } - if (/blank_space_\d+/ig.test(item.$html)) { - item.$html = item.$html.replace(/blank_space_\d+/ig, (w) => { - let n = +w.replace(/blank_space_/ig, '') + if (/\$blank_space_\d+\$/ig.test(item.$html)) { + item.$html = item.$html.replace(/\$blank_space_\d+\$/ig, (w) => { + let n = +w.replace(/blank_space_|\$/ig, '') if (n) { return new Array(n).fill(' ').join('') } -- Gitblit v1.8.0