All checks were successful
Build / build-and-test (push) Successful in 27s
[Style] 为主视图增加 16px 间距 更新 mdui-card 的右边距问题 (老问题了, 还是没有解决) [Base] 引入 VueUse 分离 Axios HTML 部分紧凑化
41 lines
963 B
Vue
41 lines
963 B
Vue
<script setup>
|
|
import { ref, onBeforeMount } from 'vue'
|
|
|
|
import 'mdui/components/switch.js'
|
|
import 'mdui/components/card.js'
|
|
|
|
import { useAppSettingStore } from '../stores/appSetting.js'
|
|
|
|
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>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.settings div {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|