[UX] 在路由加载时如果有新的路由请求直接拦截取消 (beforeEach 路由守卫)
This commit is contained in:
@ -11,25 +11,21 @@ let appSetting = null
|
||||
onBeforeMount(() => {
|
||||
appSetting = useAppSettingStore()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>设置</h1>
|
||||
<Hr />
|
||||
<ClientOnly><div class="settings">
|
||||
<section><mdui-card>
|
||||
<h2>界面</h2><Hr />
|
||||
<div>自动黑暗模式<div style="flex: 1;"/>
|
||||
<mdui-switch :checked="appSetting.value.autoTheme"
|
||||
@change="e => appSetting.value.autoTheme = e.target.checked">
|
||||
</mdui-switch></div>
|
||||
<div v-if="!appSetting.value.autoTheme">默认黑暗模式<div style="flex: 1;"/>
|
||||
<mdui-switch :checked="appSetting.value.darkTheme"
|
||||
@change="e => appSetting.value.darkTheme = e.target.checked">
|
||||
</mdui-switch></div>
|
||||
</mdui-card></section>
|
||||
</div></ClientOnly>
|
||||
<h1>设置</h1><Hr />
|
||||
<ClientOnly><div class="settings"><section><mdui-card>
|
||||
<h2>界面</h2><Hr />
|
||||
<div>自动黑暗模式<div style="flex: 1;"/>
|
||||
<mdui-switch :checked="appSetting.value.autoTheme"
|
||||
@change="e => appSetting.value.autoTheme = e.target.checked">
|
||||
</mdui-switch></div>
|
||||
<div v-if="!appSetting.value.autoTheme">默认黑暗模式<div style="flex: 1;"/>
|
||||
<mdui-switch :checked="appSetting.value.darkTheme"
|
||||
@change="e => appSetting.value.darkTheme = e.target.checked">
|
||||
</mdui-switch></div>
|
||||
</mdui-card></section></div></ClientOnly>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
Reference in New Issue
Block a user