16 lines
366 B
TypeScript
16 lines
366 B
TypeScript
import { ElNotification } from 'element-plus'
|
|
import type { NotificationType } from 'element-plus'
|
|
|
|
// 消息提示
|
|
export function toast(
|
|
message: string,
|
|
type: NotificationType = 'success',
|
|
dangerouslyUseHTMLString: boolean = true
|
|
) {
|
|
ElNotification({
|
|
message,
|
|
type,
|
|
dangerouslyUseHTMLString,
|
|
duration: 3000
|
|
})
|
|
} |