mirror of
https://gitee.com/newgateway/vtj.git
synced 2026-07-02 00:17:19 +08:00
29 lines
545 B
TypeScript
29 lines
545 B
TypeScript
import { ElLoading, ElNotification, ElMessageBox } from 'element-plus';
|
|
|
|
export function loading() {
|
|
return ElLoading.service({
|
|
lock: true,
|
|
text: 'Loading',
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
});
|
|
}
|
|
|
|
export function notify(
|
|
message: string,
|
|
title: string = '',
|
|
type: 'success' | 'warning' | 'error' | 'info' = 'warning'
|
|
) {
|
|
ElNotification({
|
|
title,
|
|
message,
|
|
type
|
|
});
|
|
}
|
|
|
|
export function alert(
|
|
message: string,
|
|
options?: Record<string, any>
|
|
): Promise<any> {
|
|
return ElMessageBox.alert(message, options);
|
|
}
|