优化界面

This commit is contained in:
刘祥超
2020-10-20 20:29:33 +08:00
parent 98b6c012b7
commit 7a5bcf7757
4 changed files with 12 additions and 7 deletions

View File

@@ -210,12 +210,11 @@ window.teaweb = {
});
},
confirm: function (message, callback) {
var width = "20em";
let width = "20em";
if (message.length > 30) {
width = "30em";
}
Swal.fire({
text: message,
let config = {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
@@ -233,7 +232,13 @@ window.teaweb = {
callback.call(Tea.Vue);
}
}
});
}
if (message.startsWith("html:")) {
config.html = message.substring(5)
} else {
config.text = message
}
Swal.fire(config);
},
reload: function () {
window.location.reload()