关于Vue弹框组件this.$confirm

确定后不能刷新页面列表

show_tank(record) {
        var that = this
        this.$confirm({
          title: '您确定要选择吗?',
          content: '选择后不可修改',
           closable: true, //是否显示右上角的x
           maskClosable: true,//触发阴影层的点击关闭
           onOk: function () {
              var id = record.id
            let httpurl = that.url.addSelectionPeople
              getAction(httpurl + '?id=' + id).then((res) => {
                if (res.success) {
                  that.$message.success(res.result);
                  that.loadData();//刷新列表
                }else {
                  that.$message.warning(res.message);
                }
              })
            },          
          onCancel() {
            console.log("on取消")
          },
        });
      }

posted @ 2024-05-26 17:30  小海葵  阅读(96)  评论(0编辑  收藏  举报