feat: 🚀 订阅功能
This commit is contained in:
10
src/hooks/useMsg.ts
Normal file
10
src/hooks/useMsg.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
export const useMsg = (type: any = "success", msg: string, duration?: number, showClose?: boolean) => {
|
||||
ElMessage({
|
||||
showClose: showClose ? showClose : false,
|
||||
message: msg,
|
||||
type: type,
|
||||
duration: duration ? duration : 3000
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user