van-dialog 的js写法

   this.$dialog
            .confirm({
              title: "提示",
              message: "xx",
              confirmButtonText: "删除",
              cancelButtonText: "取消",
            })
            .then(async () => {
              const res2 = await deleteDraftbox(draftId);
              console.log(res2);
              if (res2.code == 200) {
                that.$toast("删除成功");
              }
            })
            .catch(async () => {
              // on cancel
            });

 

posted @ 2026-03-20 09:21  ThisCall  阅读(4)  评论(0)    收藏  举报