Commit 9b223baa by 吕海涛

修改bug

parent 0658bb2d
...@@ -343,17 +343,22 @@ export default { ...@@ -343,17 +343,22 @@ export default {
}, },
saveNotice() { saveNotice() {
let that = this; let that = this;
this.$confirm('存为草稿或发布公告', '提示', { this.$confirm(
confirmButtonText: '存为草稿', "检测到未保存的内容,是否在离开页面前保存修改?",
cancelButtonText: '发布公告', "确认信息",
type: 'warning' {
}) distinguishCancelAndClose: true,
confirmButtonText: "存为草稿",
cancelButtonText: "发布公告",
type: "warning",
}
)
.then(() => { .then(() => {
that.addNoticeInfo(true); that.addNoticeInfo(true);
}) })
.catch(() => { .catch((action) => {
that.addNoticeInfo(false); action === "cancel" ? that.addNoticeInfo(false) : "";
}) });
}, },
addNoticeInfo(flag) { addNoticeInfo(flag) {
let params = this.preParams(flag); let params = this.preParams(flag);
......
...@@ -436,16 +436,21 @@ export default { ...@@ -436,16 +436,21 @@ export default {
}, },
saveNotice() { saveNotice() {
let that = this; let that = this;
this.$confirm("存为草稿或发布公告", "提示", { this.$confirm(
"检测到未保存的内容,是否在离开页面前保存修改?",
"确认信息",
{
distinguishCancelAndClose: true,
confirmButtonText: "存为草稿", confirmButtonText: "存为草稿",
cancelButtonText: "发布公告", cancelButtonText: "发布公告",
type: "warning", type: "warning",
}) }
)
.then(() => { .then(() => {
that.addNoticeInfo(true); that.addNoticeInfo(true);
}) })
.catch(() => { .catch((action) => {
that.addNoticeInfo(false); action === "cancel" ? that.addNoticeInfo(false) : "";
}); });
}, },
addNoticeInfo(flag) { addNoticeInfo(flag) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment