This commit is contained in:
Putoo
2026-04-26 18:53:56 +08:00
parent 2c6c62e88c
commit 4463f9e810
20 changed files with 461 additions and 1035 deletions

View File

@@ -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