需求:点击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

-
相关阅读:
『亚马逊云科技产品测评』活动征文|如何搭建低成本亚马逊aws云服务器
idea 创建打包 android App
基金净值查询/下载的方法 —— 查询所有基金今日净值数据
es 分组后排序 再分页
转录组&16S全长揭示热应激削弱鲟鱼的皮肤屏障功能的机制
[附源码]Python计算机毕业设计SSM焦作旅游网站(程序+LW)
AI人工智能(第一天)
电容笔哪个品牌好?十大电容笔知名品牌
每日4道算法题——第028天
TensorRT+Yolov7-tiny:基于TensorRT+API部署YoloV7-tiny模型
-
原文地址:https://blog.csdn.net/weixin_45304198/article/details/133272142