From 7b0738ba6d933af5eb133c6fd54d5f1c3fb4abba Mon Sep 17 00:00:00 2001 From: From-wh Date: Wed, 17 May 2023 11:38:21 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20diy=E9=A1=B5=E9=9D=A2=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=8F=8A=E5=85=B3=E9=97=AD=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/setting/devise/diyIndex.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/admin/src/pages/setting/devise/diyIndex.vue b/template/admin/src/pages/setting/devise/diyIndex.vue index dba55e280..a58c6fd18 100644 --- a/template/admin/src/pages/setting/devise/diyIndex.vue +++ b/template/admin/src/pages/setting/devise/diyIndex.vue @@ -334,6 +334,9 @@ export default { this.$store.commit('mobildConfig/SETEMPTY'); }, created() { + window.onbeforeunload = () => { + return '刷新页面将丢失内容,是否继续?'; + }; this.categoryList(); this.getUrlList(); this.pageId = this.$route.query.id; @@ -371,9 +374,6 @@ export default { }); }, methods: { - beforeUnload() { - return '确认是否保存?'; - }, saveModal() { if (!this.saveName) return this.$Message.warning('请先输入模板名称'); this.saveConfig(1, this.saveName); @@ -409,7 +409,7 @@ export default { closeWindow() { this.$Modal.confirm({ title: '确定关闭当前页吗?', - content: '离开前请确认保存您的设计', + content: '关闭页面前请先保存数据,未保存的话数据会丢失', okText: '确定', cancelText: '取消', loading: true,