import {ElMessage} from "element-plus"; function message(msg: string, type: string, isHtml: boolean) { return ElMessage({ type: type, // @ts-ignore duration: 2800, dangerouslyUseHTMLString: isHtml, message: msg, showClose: true, grouping: true, }) } export const xcMessage = { success: (msg: string, isHtml = false) => { return message(msg, 'success', isHtml) }, danger: (msg: string, isHtml = false) => { return message(msg, 'danger', isHtml) }, info: (msg: string, isHtml = false) => { return message(msg, 'info', isHtml) }, warning: (msg: string, isHtml = false) => { return message(msg, 'warning', isHtml) }, error: (msg: string, isHtml = false) => { return message(msg, 'error', isHtml) } }