mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 17:18:04 +08:00
优化页面刷新,刷新时禁用页面切换动画
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
export default function useMainPage() {
|
||||
const router = useRouter()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
function reload() {
|
||||
settingsStore.setIsReloading(true)
|
||||
router.push({
|
||||
name: 'reload',
|
||||
}).then(() => {
|
||||
setTimeout(() => {
|
||||
settingsStore.setIsReloading(false)
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user