fix: 表格单元格下划线、删除线无法取消(#14)

This commit is contained in:
pipipi-pikachu 2021-04-09 20:14:33 +08:00
parent 1cdad3b82e
commit 32569c5a5c

View File

@ -17,11 +17,14 @@ export const getTextStyle = (style?: TableCellStyle) => {
fontname,
align,
} = style
let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`
if (textDecoration === ' ') textDecoration = 'none'
return {
fontWeight: bold ? 'bold' : 'normal',
fontStyle: em ? 'italic' : 'normal',
textDecoration: `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`,
textDecoration,
color: color || '#000',
backgroundColor: backcolor || '',
fontSize: fontsize || '14px',