111
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
*/
|
||||
export class MessageExtend {
|
||||
// 消息通知
|
||||
static notify(type: 'primary' | 'success' | 'danger' | 'warning', message: any) {
|
||||
static Notify(type: 'primary' | 'success' | 'danger' | 'warning', message: any) {
|
||||
showNotify({ type, message })
|
||||
}
|
||||
|
||||
// 提示弹窗
|
||||
static dialog(
|
||||
static Dialog(
|
||||
title: string,
|
||||
message: string,
|
||||
theme: 'round-button' | 'default',
|
||||
@@ -31,7 +31,7 @@ export class MessageExtend {
|
||||
}
|
||||
|
||||
// 成功失败默认提示
|
||||
static showToast(type: 'success' | 'fail' | 'default', text: any) {
|
||||
static ShowToast(type: 'success' | 'fail' | 'default', text: any) {
|
||||
if (type == 'success') {
|
||||
showSuccessToast(text)
|
||||
} else if (type == 'fail') {
|
||||
@@ -42,7 +42,7 @@ export class MessageExtend {
|
||||
}
|
||||
|
||||
// 自定义图标提示
|
||||
static showIconToast(icon: any, text: any) {
|
||||
static ShowIconToast(icon: any, text: any) {
|
||||
showToast({
|
||||
message: text,
|
||||
icon: icon,
|
||||
@@ -50,7 +50,7 @@ export class MessageExtend {
|
||||
}
|
||||
|
||||
// 多条消息通知(堆叠展示)
|
||||
static notifyList(type: 'primary' | 'success' | 'danger' | 'warning', messages: string[], duration: number = 3000) {
|
||||
static NotifyList(type: 'primary' | 'success' | 'danger' | 'warning', messages: string[], duration: number = 3000) {
|
||||
if (typeof window === 'undefined') return
|
||||
if (!messages || messages.length === 0) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user