From c8437fd3eade771c8572f1740720e6ab718211ab Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Wed, 9 Feb 2022 20:12:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20TS=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/plugin.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/plugin.ts b/src/utils/plugin.ts index 561c7653..10399044 100644 --- a/src/utils/plugin.ts +++ b/src/utils/plugin.ts @@ -68,29 +68,29 @@ export const goDialog = ( const typeObj = { // 自定义 - delete: { + [DialogEnum.delete]: { fn: dialogFn || window['$dialog'].warning, message: message || '是否删除此数据?', }, // 原有 - warning: { + [DialogEnum.warning]: { fn: window['$dialog'].warning, message: message || '是否执行此操作?', }, - error: { + [DialogEnum.error]: { fn: window['$dialog'].error, message: message || '是否执行此操作?', }, - success: { + [DialogEnum.success]: { fn: window['$dialog'].success, message: message || '是否执行此操作?', }, } - const d: DialogReactive = (typeObj as any)[type || DialogEnum.warning]['fn']({ + const d: DialogReactive = typeObj[type || DialogEnum.warning]['fn']({ title: '提示', icon: renderIcon(InformationCircleIcon, { size: dialogIconSize }), - content: (typeObj as any)[type || DialogEnum.warning]['message'], + content: typeObj[type || DialogEnum.warning]['message'], positiveText: '确定', negativeText: '取消', // 是否通过遮罩关闭