|
@@ -315,6 +315,10 @@ export default {
|
|
|
return this.displayRoles
|
|
return this.displayRoles
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ // 清除可能的 beforeunload 处理,防止页面刷新弹出"离开网站?"提示
|
|
|
|
|
+ window.onbeforeunload = null
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
hasPerm(required) {
|
|
hasPerm(required) {
|
|
|
return hasPermission(this.effectivePerms, required)
|
|
return hasPermission(this.effectivePerms, required)
|
|
@@ -426,10 +430,13 @@ export default {
|
|
|
this.$message.success('已复制邀请码')
|
|
this.$message.success('已复制邀请码')
|
|
|
},
|
|
},
|
|
|
handleLogout() {
|
|
handleLogout() {
|
|
|
|
|
+ // 不使用 modal 遮罩(全局 .v-modal { display:none } 会与 $confirm 的遮罩冲突)
|
|
|
this.$confirm('确定要退出登录吗?', '提示', {
|
|
this.$confirm('确定要退出登录吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ modal: false,
|
|
|
|
|
+ customClass: 'cfc-logout-confirm'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
localStorage.removeItem('token')
|
|
localStorage.removeItem('token')
|
|
|
localStorage.removeItem('role')
|
|
localStorage.removeItem('role')
|
|
@@ -448,10 +455,6 @@ export default {
|
|
|
.v-modal {
|
|
.v-modal {
|
|
|
display: none !important;
|
|
display: none !important;
|
|
|
}
|
|
}
|
|
|
-/* 保留 $confirm / MessageBox 的遮罩 */
|
|
|
|
|
-.el-message-box .v-modal {
|
|
|
|
|
- display: block !important;
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
.layout-container {
|
|
.layout-container {
|
|
|
height: 100vh;
|
|
height: 100vh;
|