this.$confirm的用法
if(command=="logout"){this.$confirm("退出当前账号,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.commit("CLEAR_DAT...
if (command == "logout") {
this.$confirm("退出当前账号, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$store.commit("CLEAR_DATA");
sessionStorage.removeItem("store");
this.$router.push({ name: "Login" });
this.$message({
type: "success",
message: "退出成功!"
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消退出"
});
});
}
更多推荐
所有评论(0)