初始化 ui.

This commit is contained in:
lijiahang
2023-07-27 18:48:15 +08:00
parent ee53ec6486
commit 5be2c7fda2
185 changed files with 1107 additions and 17815 deletions

View File

@@ -24,6 +24,7 @@
type?: string;
defaultVal?: boolean | string | number;
}
defineProps({
title: {
type: String,
@@ -37,19 +38,19 @@
},
});
const appStore = useAppStore();
const handleChange = async ({
key,
value,
}: {
/**
* 修改配置
*/
const handleChange = async ({ key, value, }: {
key: string;
value: unknown;
}) => {
// 色弱模式
if (key === 'colorWeak') {
document.body.style.filter = value ? 'invert(80%)' : 'none';
}
if (key === 'menuFromServer' && value) {
await appStore.fetchServerMenuConfig();
}
// 顶部菜单
if (key === 'topMenu') {
appStore.updateSettings({
menuCollapse: false,