fix: error

This commit is contained in:
xingyu4j
2022-11-15 13:59:22 +08:00
parent a701c1d76c
commit c7972f9a06
8 changed files with 31 additions and 25 deletions

View File

@ -139,10 +139,6 @@ VXETable.formats.mixin({
formatDate({ cellValue }, format) {
return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd HH:mm:ss')
},
// 格式字典
formatDict() {
return 'cellValue 123'
},
// 四舍五入金额每隔3位逗号分隔默认2位数
formatAmount({ cellValue }, digits = 2) {
return XEUtils.commafy(Number(cellValue), { digits })
@ -158,6 +154,10 @@ VXETable.formats.mixin({
// 向下舍入,默认两位数
formatCutNumber({ cellValue }, digits = 2) {
return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
},
// 格式化图片将图片链接转换为html标签
formatImg({ cellValue }) {
return '<img height="40" src="' + cellValue + '"> '
}
})
export const setupVxeTable = (app: App<Element>) => {