From a8ad928324da550605295118681e4123a274cdef Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 29 五月 2023 10:26:23 +0800
Subject: [PATCH] !9 代码生成,数据名称从后台加载 Merge pull request !9 from WangBQ/ts
---
src/plugins/modal.ts | 152 +++++++++++++++++++++++++-------------------------
1 files changed, 76 insertions(+), 76 deletions(-)
diff --git a/src/plugins/modal.ts b/src/plugins/modal.ts
index c18cb0b..9526623 100644
--- a/src/plugins/modal.ts
+++ b/src/plugins/modal.ts
@@ -2,80 +2,80 @@
import { LoadingInstance } from 'element-plus/es/components/loading/src/loading';
let loadingInstance: LoadingInstance;
export default {
- // 娑堟伅鎻愮ず
- msg(content: string) {
- ElMessage.info(content);
- },
- // 閿欒娑堟伅
- msgError(content: string) {
- ElMessage.error(content);
- },
- // 鎴愬姛娑堟伅
- msgSuccess(content: string) {
- ElMessage.success(content);
- },
- // 璀﹀憡娑堟伅
- msgWarning(content: string) {
- ElMessage.warning(content);
- },
- // 寮瑰嚭鎻愮ず
- alert(content: string) {
- ElMessageBox.alert(content, '绯荤粺鎻愮ず');
- },
- // 閿欒鎻愮ず
- alertError(content: string) {
- ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'error' });
- },
- // 鎴愬姛鎻愮ず
- alertSuccess(content: string, s: string, p: { dangerouslyUseHTMLString: boolean }) {
- ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'success' });
- },
- // 璀﹀憡鎻愮ず
- alertWarning(content: string) {
- ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'warning' });
- },
- // 閫氱煡鎻愮ず
- notify(content: string) {
- ElNotification.info(content);
- },
- // 閿欒閫氱煡
- notifyError(content: string) {
- ElNotification.error(content);
- },
- // 鎴愬姛閫氱煡
- notifySuccess(content: string) {
- ElNotification.success(content);
- },
- // 璀﹀憡閫氱煡
- notifyWarning(content: string) {
- ElNotification.warning(content);
- },
- // 纭绐椾綋
- confirm(content: string): Promise<MessageBoxData> {
- return ElMessageBox.confirm(content, '绯荤粺鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- });
- },
- // 鎻愪氦鍐呭
- prompt(content: string) {
- return ElMessageBox.prompt(content, '绯荤粺鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- });
- },
- // 鎵撳紑閬僵灞�
- loading(content: string) {
- loadingInstance = ElLoading.service({
- lock: true,
- text: content,
- background: 'rgba(0, 0, 0, 0.7)'
- });
- },
- // 鍏抽棴閬僵灞�
- closeLoading() {
- loadingInstance.close();
- }
+ // 娑堟伅鎻愮ず
+ msg(content: string) {
+ ElMessage.info(content);
+ },
+ // 閿欒娑堟伅
+ msgError(content: string) {
+ ElMessage.error(content);
+ },
+ // 鎴愬姛娑堟伅
+ msgSuccess(content: string) {
+ ElMessage.success(content);
+ },
+ // 璀﹀憡娑堟伅
+ msgWarning(content: string) {
+ ElMessage.warning(content);
+ },
+ // 寮瑰嚭鎻愮ず
+ alert(content: string) {
+ ElMessageBox.alert(content, '绯荤粺鎻愮ず');
+ },
+ // 閿欒鎻愮ず
+ alertError(content: string) {
+ ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'error' });
+ },
+ // 鎴愬姛鎻愮ず
+ alertSuccess(content: string, s: string, p: { dangerouslyUseHTMLString: boolean }) {
+ ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'success' });
+ },
+ // 璀﹀憡鎻愮ず
+ alertWarning(content: string) {
+ ElMessageBox.alert(content, '绯荤粺鎻愮ず', { type: 'warning' });
+ },
+ // 閫氱煡鎻愮ず
+ notify(content: string) {
+ ElNotification.info(content);
+ },
+ // 閿欒閫氱煡
+ notifyError(content: string) {
+ ElNotification.error(content);
+ },
+ // 鎴愬姛閫氱煡
+ notifySuccess(content: string) {
+ ElNotification.success(content);
+ },
+ // 璀﹀憡閫氱煡
+ notifyWarning(content: string) {
+ ElNotification.warning(content);
+ },
+ // 纭绐椾綋
+ confirm(content: string): Promise<MessageBoxData> {
+ return ElMessageBox.confirm(content, '绯荤粺鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ });
+ },
+ // 鎻愪氦鍐呭
+ prompt(content: string) {
+ return ElMessageBox.prompt(content, '绯荤粺鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ });
+ },
+ // 鎵撳紑閬僵灞�
+ loading(content: string) {
+ loadingInstance = ElLoading.service({
+ lock: true,
+ text: content,
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ },
+ // 鍏抽棴閬僵灞�
+ closeLoading() {
+ loadingInstance.close();
+ }
};
--
Gitblit v1.9.3