解决刷新时样式失效问题。
This commit is contained in:
@@ -274,11 +274,7 @@
|
||||
const currentPath = window.location.pathname;
|
||||
const targetPath = routes[key];
|
||||
if (currentPath !== targetPath && targetPath !== undefined) {
|
||||
// 添加页面切换时的过渡效果
|
||||
document.querySelector('.app-container').classList.remove('loaded');
|
||||
setTimeout(() => {
|
||||
window.location.href = targetPath;
|
||||
}, 300);
|
||||
window.location.href = targetPath;
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
@@ -290,10 +286,7 @@
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
document.querySelector('.app-container').classList.remove('loaded');
|
||||
setTimeout(() => {
|
||||
window.location.href = '/logout';
|
||||
}, 300);
|
||||
window.location.href = '/logout';
|
||||
}).catch(() => {
|
||||
// 用户点击取消,不做任何操作
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user