From c13c622eac5551c6f099f148feb5256711ca34de Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 11 七月 2023 21:03:01 +0800 Subject: [PATCH] !25 部分优化以及新增功能 Merge pull request !25 from ahaos/tspr --- src/plugins/modal.ts | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/plugins/modal.ts b/src/plugins/modal.ts index 9526623..a8b0548 100644 --- a/src/plugins/modal.ts +++ b/src/plugins/modal.ts @@ -1,57 +1,57 @@ -import { ElMessage, ElMessageBox, ElNotification, ElLoading, MessageBoxData } from 'element-plus'; +import { MessageBoxData } from 'element-plus'; import { LoadingInstance } from 'element-plus/es/components/loading/src/loading'; let loadingInstance: LoadingInstance; export default { // 娑堟伅鎻愮ず - msg(content: string) { + msg(content: any) { ElMessage.info(content); }, // 閿欒娑堟伅 - msgError(content: string) { + msgError(content: any) { ElMessage.error(content); }, // 鎴愬姛娑堟伅 - msgSuccess(content: string) { + msgSuccess(content: any) { ElMessage.success(content); }, // 璀﹀憡娑堟伅 - msgWarning(content: string) { + msgWarning(content: any) { ElMessage.warning(content); }, // 寮瑰嚭鎻愮ず - alert(content: string) { + alert(content: any) { ElMessageBox.alert(content, '绯荤粺鎻愮ず'); }, // 閿欒鎻愮ず - alertError(content: string) { + alertError(content: any) { ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'error' }); }, // 鎴愬姛鎻愮ず - alertSuccess(content: string, s: string, p: { dangerouslyUseHTMLString: boolean }) { + alertSuccess(content: any) { ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'success' }); }, // 璀﹀憡鎻愮ず - alertWarning(content: string) { + alertWarning(content: any) { ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'warning' }); }, // 閫氱煡鎻愮ず - notify(content: string) { + notify(content: any) { ElNotification.info(content); }, // 閿欒閫氱煡 - notifyError(content: string) { + notifyError(content: any) { ElNotification.error(content); }, // 鎴愬姛閫氱煡 - notifySuccess(content: string) { + notifySuccess(content: any) { ElNotification.success(content); }, // 璀﹀憡閫氱煡 - notifyWarning(content: string) { + notifyWarning(content: any) { ElNotification.warning(content); }, // 纭绐椾綋 - confirm(content: string): Promise<MessageBoxData> { + confirm(content: any): Promise<MessageBoxData> { return ElMessageBox.confirm(content, '绯荤粺鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', @@ -59,7 +59,7 @@ }); }, // 鎻愪氦鍐呭 - prompt(content: string) { + prompt(content: any) { return ElMessageBox.prompt(content, '绯荤粺鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', -- Gitblit v1.9.3