Commit e25fd005 authored by wanghao's avatar wanghao

1 进入管理系统 强制刷新界面调整

parent 5165fae5
......@@ -126,25 +126,11 @@ export default {
this.selectedMenu = index;
},
goToAdmin() {
// 先手动销毁 DataV 相关组件
const dataVContainers = document.querySelectorAll('.dv-full-screen-container');
dataVContainers.forEach(container => {
container.remove();
});
// 清理可能的残留样式
const dataVStyles = document.querySelectorAll('style[data-v]');
dataVStyles.forEach(style => {
if (style.innerHTML.includes('dv-full-screen-container')) {
style.remove();
}
});
setTimeout(() => {
this.$router.push('/index').then(() => {
window.location.href = window.location.origin + '/index?_t=' + Date.now();
});
}, 100);
// 在新窗口打开,完全隔离当前环境
const baseUrl = window.location.origin;
const targetUrl = baseUrl + '/index?_t=' + Date.now();
window.open(targetUrl, '_blank');
},
}
}
......
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