From 42eefa6f4e02c967edb7fb0647bd79611ff38b5b Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 20 Aug 2022 14:55:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E5=AD=97=E5=8A=A0=E7=B2=97?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E6=9C=AC=E6=A1=86=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=8F=AF=E8=A7=86=E5=8C=BA=E5=9F=9F=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Toolbar/ElementStylePanel/TextStylePanel.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue index 45217df8..5069d754 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/TextStylePanel.vue @@ -285,6 +285,8 @@ import ElementOutline from '../common/ElementOutline.vue' import ElementShadow from '../common/ElementShadow.vue' import ColorButton from '../common/ColorButton.vue' +// 注意,存在一个未知原因的BUG,如果文本加粗后文本框高度增加,画布的可视区域定位会出现错误 +// 因此在执行预置样式命令时,将加粗命令放在尽可能靠前的位置,避免字号增大后再加粗 const presetStyles = [ { label: '大标题', @@ -294,9 +296,9 @@ const presetStyles = [ }, cmd: [ { command: 'clear' }, + { command: 'bold' }, { command: 'fontsize', value: '48px' }, { command: 'align', value: 'center' }, - { command: 'bold' }, ], }, { @@ -307,9 +309,9 @@ const presetStyles = [ }, cmd: [ { command: 'clear' }, + { command: 'bold' }, { command: 'fontsize', value: '36px' }, { command: 'align', value: 'center' }, - { command: 'bold' }, ], }, {