mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 15:24:09 +00:00
refactor(baTable):优化数据行侧边按钮的类型定义
This commit is contained in:
parent
223f732777
commit
eb648f24d2
@ -62,7 +62,7 @@ const { t } = useI18n()
|
|||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const optBtn = defaultOptButtons(['edit', 'delete'])
|
const optBtn = defaultOptButtons(['edit', 'delete'])
|
||||||
optBtn[1].popconfirm.title = t('routine.attachment.Files and records will be deleted at the same time Are you sure?')
|
optBtn[1].popconfirm!.title = t('routine.attachment.Files and records will be deleted at the same time Are you sure?')
|
||||||
|
|
||||||
const baTable = new baTableClass(new baTableApi(routineAttachment), {
|
const baTable = new baTableClass(new baTableApi(routineAttachment), {
|
||||||
column: [
|
column: [
|
||||||
|
5
web/types/table.d.ts
vendored
5
web/types/table.d.ts
vendored
@ -3,6 +3,7 @@ import { Component, ComponentPublicInstance } from 'vue'
|
|||||||
import Table from '/@/components/table/index.vue'
|
import Table from '/@/components/table/index.vue'
|
||||||
import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults'
|
import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults'
|
||||||
import type { PopconfirmProps } from 'element-plus'
|
import type { PopconfirmProps } from 'element-plus'
|
||||||
|
import { Mutable } from 'element-plus/es/utils'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
/* baTable */
|
/* baTable */
|
||||||
@ -200,7 +201,7 @@ declare global {
|
|||||||
class?: string
|
class?: string
|
||||||
type: ButtonType
|
type: ButtonType
|
||||||
icon: string
|
icon: string
|
||||||
popconfirm?: Partial<PopconfirmProps>
|
popconfirm?: Partial<Mutable<PopconfirmProps>>
|
||||||
disabledTip?: boolean
|
disabledTip?: boolean
|
||||||
// 自定义点击事件
|
// 自定义点击事件
|
||||||
click?: (row: TableRow, field: TableColumn) => void
|
click?: (row: TableRow, field: TableColumn) => void
|
||||||
@ -209,7 +210,7 @@ declare global {
|
|||||||
// 按钮是否禁用,请返回布尔值
|
// 按钮是否禁用,请返回布尔值
|
||||||
disabled?: (row: TableRow, field: TableColumn) => boolean
|
disabled?: (row: TableRow, field: TableColumn) => boolean
|
||||||
// 自定义el-button属性
|
// 自定义el-button属性
|
||||||
attr?: Partial<ButtonProps>
|
attr?: Partial<Mutable<ButtonProps>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 表格行 */
|
/* 表格行 */
|
||||||
|
Loading…
Reference in New Issue
Block a user