diff --git a/components.d.ts b/components.d.ts index 412774bd..2b805ad6 100644 --- a/components.d.ts +++ b/components.d.ts @@ -71,4 +71,7 @@ declare module 'vue' { WordList2: typeof import('./src/components/list/WordList2.vue')['default'] WordListModal: typeof import('./src/components/Modal/WordListModal.vue')['default'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/src/App.vue b/src/App.vue index 9cc999cb..f784acde 100644 --- a/src/App.vue +++ b/src/App.vue @@ -40,17 +40,20 @@ watch(store.wrong.originWords, (n) => { useStartKeyboardEventListener() -onMounted(() => { +async function init() { console.time() - Promise.allSettled([store.init(), settingStore.init()]).then(e => { + store.init().then(() => { store.load = true - setTheme(settingStore.theme) console.timeEnd() }) -}) + await settingStore.init() + setTheme(settingStore.theme) +} onMounted(() => { + init() }) +