修改测试问题

This commit is contained in:
guanj
2025-11-14 09:33:35 +08:00
parent d9efb37083
commit 6303bd1e2c
6 changed files with 256 additions and 218 deletions

22
types/table.d.ts vendored
View File

@@ -8,8 +8,8 @@ declare global {
interface CnTable {
ref: VxeTableInstance | null
data: TableRow[] | any
copyData: TableRow[] | any
allData: TableRow[] | any
filename: any
allFlag: Boolean
// 前端分页数据
webPagingData: TableRow[][]
@@ -29,6 +29,7 @@ declare global {
loadCallback: (() => void) | null
resetCallback: (() => void) | null
beforeSearchFun: (() => void) | null
exportProcessingData: (() => void) | null
height: string
publicHeight: number
}
@@ -50,6 +51,7 @@ declare global {
| 'buttons'
| 'slot'
| 'customTemplate'
| 'renderFormatter'
| 'customRender'
// 默认值
default?: any
@@ -59,14 +61,15 @@ declare global {
custom?: any
// 值替换数据,如{open: '开'}
replaceValue?: any
effect?: any
// 时间格式化
timeFormat?: string
// 开关控制
onChangeField?: (row: TableRow, value: any) => void
activeValue?: string
inactiveValue?: string
activeText?: string
inactiveText?: string
// 开关控制
onChangeField?: (row: TableRow, value: any) => void
activeValue?: string
inactiveValue?: string
activeText?: string
inactiveText?: string
// 自定义组件/函数渲染
customRender?: string | Component
// 使用了 render 属性时,渲染前对字段值的预处理方法,请返回新值
@@ -80,6 +83,8 @@ declare global {
index: number
) => string
children?: TableColumn[]
property?: string
clickable?: boolean // 是否可点击
}
/* 表格右侧操作按钮 */
@@ -90,15 +95,16 @@ declare global {
title?: string
text?: string
class?: string
loading?: string
type: ButtonType
icon: string
popconfirm?: Partial<Mutable<PopconfirmProps>>
disabledTip?: boolean
// 自定义点击事件
click?: (row: TableRow, field: TableColumn) => void
// 按钮是否禁用,请返回布尔值
disabled?: (row: TableRow, field: TableColumn) => boolean
showDisabled?: (row: TableRow, field: TableColumn) => boolean
// 自定义el-button属性
attr?: Partial<Mutable<ButtonProps>>
}