需求:点击element-plus Notification通知组件提示内容时,跳转到对应页面或执行某些逻辑。

const toTaskCenter = () => {
ElNotification.closeAll(); // 跳转前关闭通知
router.push("/taskCenter/import");
};
// 通过onClick属性绑定点击事件
const uploadHandle = async () => {
ElNotification({
title: "温馨提示",
dangerouslyUseHTMLString: true,
message: `任务提交成功!可在 任务中心-导入任务 中查看导入进度`,
type: "success",
onClick() {
toTaskCenter();
},
});
};
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18

-
相关阅读:
SpringBoot流程解析(一)
python中json的使用
FreeRTOS学习笔记(二)
js常见面试题
晶振与定时时间的简单理解
git merge和git rebase的区别
JAVA经典百题之按位与运算符 `&`的使用
Python基础(一)基本类型
学网络安全需要什么基础?
记一次经典SQL双写绕过题目[极客大挑战 2019]BabySQL 1
-
原文地址:https://blog.csdn.net/weixin_45304198/article/details/133272142