mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 18:49: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
	 xingyu4j
					xingyu4j