chore(加载主题样式): 只使用异步方式,保留一个函数loadTheme

This commit is contained in:
2026-01-06 17:01:03 +08:00
parent 6358102cae
commit d7b07c974d
3 changed files with 7 additions and 27 deletions

View File

@@ -252,13 +252,14 @@ const store = new Vuex.Store({
},
actions: {
init() {
return new Promise((resolve, reject) => {
return new Promise(async (resolve, reject) => {
Http.sendRequest({
url: '/api/config/init',
success: res => {
success: async res => {
var data = res.data;
if (data) {
this.commit('setThemeStyle', configExternal.loadThemeSync(data.style_theme?.name));
const themeData = await configExternal.loadTheme(data.style_theme?.name);
this.commit('setThemeStyle', themeData);
this.dispatch('themeColorSet');
// 底部导航