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, fontname,
align, align,
} = style } = style
let textDecoration = `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`
if (textDecoration === ' ') textDecoration = 'none'
return { return {
fontWeight: bold ? 'bold' : 'normal', fontWeight: bold ? 'bold' : 'normal',
fontStyle: em ? 'italic' : 'normal', fontStyle: em ? 'italic' : 'normal',
textDecoration: `${underline ? 'underline' : ''} ${strikethrough ? 'line-through' : ''}`, textDecoration,
color: color || '#000', color: color || '#000',
backgroundColor: backcolor || '', backgroundColor: backcolor || '',
fontSize: fontsize || '14px', fontSize: fontsize || '14px',