mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-07 07:35:06 +08:00
perf: vxe demo
This commit is contained in:
@ -103,6 +103,9 @@ VXETable.setup({
|
||||
input: {
|
||||
clearable: true
|
||||
},
|
||||
form: {
|
||||
titleColon: true // 是否显示标题冒号
|
||||
},
|
||||
modal: {
|
||||
width: 600, // 窗口的宽度
|
||||
height: 400, // 窗口的高度
|
||||
@ -124,6 +127,14 @@ VXETable.setup({
|
||||
: XEUtils.toFormatString(XEUtils.get(enUS, key), args)
|
||||
}
|
||||
})
|
||||
// 格式金额,默认2位数
|
||||
VXETable.formats.add('formatAmount', ({ cellValue }, digits = 2) => {
|
||||
return XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
|
||||
})
|
||||
// 格式日期,默认 yyyy-MM-dd HH:mm:ss
|
||||
VXETable.formats.add('formatDate', ({ cellValue }, format = 'yyyy-MM-dd HH:mm:ss') => {
|
||||
return XEUtils.toDateString(cellValue, format)
|
||||
})
|
||||
export const setupVxeTable = (app: App<Element>) => {
|
||||
// 表格功能
|
||||
app.use(Filter).use(Edit).use(Menu).use(Export).use(Keyboard).use(Validator)
|
||||
|
Reference in New Issue
Block a user