表格优化

This commit is contained in:
仲么了
2023-12-27 15:06:57 +08:00
parent d42936398e
commit b456881e6e
17 changed files with 115 additions and 74 deletions

10
types/table.d.ts vendored
View File

@@ -1,7 +1,7 @@
import Table from '@/components/table/index.vue'
import { Component } from 'vue'
import type { PopconfirmProps, ButtonType, FormInstance, ButtonProps, TableColumnCtx, ColProps } from 'element-plus'
import type { VxeColumnProps } from 'vxe-table'
import type { PopconfirmProps, ButtonType, ButtonProps } from 'element-plus'
import { Mutable } from 'element-plus/es/utils'
declare global {
@@ -29,7 +29,7 @@ declare global {
}
/* 表格列 */
interface TableColumn extends Partial<TableColumnCtx<TableRow>> {
interface TableColumn extends VxeColumnProps {
render?:
| 'icon'
| 'switch'
@@ -58,7 +58,7 @@ declare global {
row: TableRow,
field: TableColumn,
value: any,
column: TableColumnCtx<TableRow>,
column: VxeColumnProps,
index: number
) => any
// 自定义渲染模板方法可返回html内容
@@ -66,7 +66,7 @@ declare global {
row: TableRow,
field: TableColumn,
value: any,
column: TableColumnCtx<TableRow>,
column: VxeColumnProps,
index: number
) => string
}