Adding loading effects when downloading a universal dictionary

This commit is contained in:
zyronon
2023-11-09 01:42:02 +08:00
parent ed032ef5b6
commit 76269c50fe
4 changed files with 17 additions and 6 deletions

View File

@@ -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()
})
</script>
<template>