From f352e3209190c4be1ab3c4047fd365de751552ca Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sun, 29 Dec 2024 17:37:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=96=87=E6=9C=AC=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue | 2 +- .../Editor/Toolbar/ElementStylePanel/TableStylePanel.vue | 6 +++--- .../components/element/ShapeElement/BaseShapeElement.vue | 2 +- src/views/components/element/ShapeElement/index.vue | 2 +- src/views/components/element/TableElement/utils.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue index f26717ff..4677f35b 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ShapeStylePanel.vue @@ -252,7 +252,7 @@ const updateTextAlign = (align: 'top' | 'middle' | 'bottom') => { const defaultText: ShapeText = { content: '', - defaultFontName: '微软雅黑', + defaultFontName: '', defaultColor: '#000', align: 'middle', } diff --git a/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue b/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue index 40260ec5..b9bcd940 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue @@ -210,7 +210,7 @@ const textAttrs = ref({ color: '#000', backcolor: '', fontsize: '12px', - fontname: '微软雅黑', + fontname: '', align: 'left', }) @@ -258,7 +258,7 @@ const updateTextAttrState = () => { color: '#000', backcolor: '', fontsize: '12px', - fontname: '微软雅黑', + fontname: '', align: 'left', } } @@ -271,7 +271,7 @@ const updateTextAttrState = () => { color: style.color || '#000', backcolor: style.backcolor || '', fontsize: style.fontsize || '12px', - fontname: style.fontname || '微软雅黑', + fontname: style.fontname || '', align: style.align || 'left', } } diff --git a/src/views/components/element/ShapeElement/BaseShapeElement.vue b/src/views/components/element/ShapeElement/BaseShapeElement.vue index 08df9844..91cb42e6 100644 --- a/src/views/components/element/ShapeElement/BaseShapeElement.vue +++ b/src/views/components/element/ShapeElement/BaseShapeElement.vue @@ -85,7 +85,7 @@ const { flipStyle } = useElementFlip(flipH, flipV) const text = computed(() => { const defaultText: ShapeText = { content: '', - defaultFontName: '微软雅黑', + defaultFontName: '', defaultColor: '#000', align: 'middle', } diff --git a/src/views/components/element/ShapeElement/index.vue b/src/views/components/element/ShapeElement/index.vue index d4c0317e..ccc06926 100644 --- a/src/views/components/element/ShapeElement/index.vue +++ b/src/views/components/element/ShapeElement/index.vue @@ -147,7 +147,7 @@ watch(handleElementId, () => { const text = computed(() => { const defaultText: ShapeText = { content: '', - defaultFontName: '微软雅黑', + defaultFontName: '', defaultColor: '#000', align: 'middle', } diff --git a/src/views/components/element/TableElement/utils.ts b/src/views/components/element/TableElement/utils.ts index 1b0ea974..a1eb98ed 100644 --- a/src/views/components/element/TableElement/utils.ts +++ b/src/views/components/element/TableElement/utils.ts @@ -29,7 +29,7 @@ export const getTextStyle = (style?: TableCellStyle): CSSProperties => { color: color || '#000', backgroundColor: backcolor || '', fontSize: fontsize || '14px', - fontFamily: fontname || '微软雅黑', + fontFamily: fontname || '', textAlign: align || 'left', } }