perf: 文本字体相关优化

This commit is contained in:
pipipi-pikachu 2024-12-29 17:37:55 +08:00
parent c962d4af17
commit f352e32091
5 changed files with 7 additions and 7 deletions

View File

@ -252,7 +252,7 @@ const updateTextAlign = (align: 'top' | 'middle' | 'bottom') => {
const defaultText: ShapeText = {
content: '',
defaultFontName: '微软雅黑',
defaultFontName: '',
defaultColor: '#000',
align: 'middle',
}

View File

@ -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',
}
}

View File

@ -85,7 +85,7 @@ const { flipStyle } = useElementFlip(flipH, flipV)
const text = computed<ShapeText>(() => {
const defaultText: ShapeText = {
content: '',
defaultFontName: '微软雅黑',
defaultFontName: '',
defaultColor: '#000',
align: 'middle',
}

View File

@ -147,7 +147,7 @@ watch(handleElementId, () => {
const text = computed<ShapeText>(() => {
const defaultText: ShapeText = {
content: '',
defaultFontName: '微软雅黑',
defaultFontName: '',
defaultColor: '#000',
align: 'middle',
}

View File

@ -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',
}
}