feat: 添加主题色设置功能

This commit is contained in:
pikachu1995@126.com
2026-07-07 10:56:14 +08:00
parent df35a26f9e
commit 295aaf1a01
16 changed files with 275 additions and 33 deletions

View File

@@ -6,7 +6,9 @@
<script>
import storage from "@/plugins/storage";
import { getBaseSite } from "@/api/common.js";
import { getBaseSite, getThemeSetting } from "@/api/common.js";
import { fetchAndApplyTheme } from "@/utils/theme";
export default {
name: "App",
mounted() {
@@ -42,6 +44,7 @@ export default {
});
}
this.getSite();
this.getTheme();
},
getSite() {
getBaseSite().then((res) => {
@@ -55,6 +58,9 @@ export default {
}
}).catch(() => {});
},
getTheme() {
fetchAndApplyTheme(getThemeSetting).catch(() => {});
},
},
};
</script>