chore(加载主题样式): 只使用异步方式,保留一个函数loadTheme
This commit is contained in:
@@ -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');
|
||||
|
||||
// 底部导航
|
||||
|
||||
Reference in New Issue
Block a user