From eb648f24d25480305b4e306a732abad72cfda93a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Mon, 27 Feb 2023 09:39:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(baTable):=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=8C=E4=BE=A7=E8=BE=B9=E6=8C=89=E9=92=AE=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/backend/routine/attachment/index.vue | 2 +- web/types/table.d.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/views/backend/routine/attachment/index.vue b/web/src/views/backend/routine/attachment/index.vue index 936d2d26..f1d6635d 100644 --- a/web/src/views/backend/routine/attachment/index.vue +++ b/web/src/views/backend/routine/attachment/index.vue @@ -62,7 +62,7 @@ const { t } = useI18n() const tableRef = ref() 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), { column: [ diff --git a/web/types/table.d.ts b/web/types/table.d.ts index 90f179cb..d1650792 100644 --- a/web/types/table.d.ts +++ b/web/types/table.d.ts @@ -3,6 +3,7 @@ import { Component, ComponentPublicInstance } from 'vue' import Table from '/@/components/table/index.vue' import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults' import type { PopconfirmProps } from 'element-plus' +import { Mutable } from 'element-plus/es/utils' declare global { /* baTable */ @@ -200,7 +201,7 @@ declare global { class?: string type: ButtonType icon: string - popconfirm?: Partial + popconfirm?: Partial> disabledTip?: boolean // 自定义点击事件 click?: (row: TableRow, field: TableColumn) => void @@ -209,7 +210,7 @@ declare global { // 按钮是否禁用,请返回布尔值 disabled?: (row: TableRow, field: TableColumn) => boolean // 自定义el-button属性 - attr?: Partial + attr?: Partial> } /* 表格行 */