(vue前端)对操作进行检测,通过elementui-Notify来展示并提供跳转

  1. 检测操作代码
  2. 跳出notify
  3. 展示结果
 
 
//   跳框
        const notify = this.$notify({
          type: "warning",
          dangerouslyUseHTMLString: true,
          title: "提示",
          message:
            '<p>检测到您扔有题未设定答案类型,<span style="color:#0066ff;cursor:pointer">请点击处理</span>!</p>',
          duration: 0,
        });
 
 //  抓取点击事件操作
        notify.$el.querySelector("span").onclick = () => {
          // your code
          _this.$router.push({
            path: "/data/resultProcess",
            query: { projectKey: this.project_key },
          });
          // 点击后关闭notify 不需要的话可删掉
          notify.close();
          _this.$notify({
            type: "warning",
            title: "以下为未处理项目",
            message: this.needProcessItem,
            duration: 0,
            // position:'bottom-right',
          });

posted @ 2021-10-28 10:34  Hansenne  阅读(954)  评论(0)    收藏  举报