0
点赞
收藏
分享

微信扫一扫

AspNetCore 中使用 Knife4jUI 更加友好的Swagger界面

一葉_code 2023-12-13 阅读 28

解决方案如下:

<el-button type="primary" size="small" @click="workerDel(scope.row.id)">删除</el-button>
	workerDel(id) {
      this.$confirm("此操作将永久该记录, 是否继续?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }).then(() => {
          let params = {
            ids: [id]
          }
          delDateSchedule(params).then((res) => {
            this.$message.success("删除成功");
            //自动创建一个a标签
            //添加到dom中
            //并且隐藏它
            //模拟a标签点击
            //让删除按钮的聚焦失焦
            //移除a标签
            const a = document.createElement("a");
            document.body.appendChild(a);
            a.style.display = "none";
            a.click();
            document.body.removeChild(a);
            //重新刷新列表
            this.getSchedulePage();
          });
        });
    },

效果如图:
在这里插入图片描述

举报

相关推荐

0 条评论