Refresh state on pack install

This commit is contained in:
the1812 2021-12-13 23:37:09 +08:00
parent de52d9152d
commit 2e2a90c568
2 changed files with 8 additions and 0 deletions

View File

@ -44,7 +44,9 @@
<RegistryItem <RegistryItem
v-for="item of filteredList" v-for="item of filteredList"
:key="item.name" :key="item.name"
ref="items"
:item="item" :item="item"
@refresh="checkInstalled"
/> />
<!-- <RegistryItem <!-- <RegistryItem
v-for="item of packList" v-for="item of packList"
@ -161,6 +163,9 @@ export default Vue.extend({
this.loading = false this.loading = false
} }
}, },
checkInstalled() {
this.$refs.items?.forEach((item: any) => item.checkInstalled())
},
}, },
}) })
</script> </script>

View File

@ -131,6 +131,9 @@ export default Vue.extend({
urls.map(async url => installFeature(url)), urls.map(async url => installFeature(url)),
) )
this.checkInstalled() this.checkInstalled()
if (this.item.type === 'pack') {
this.$emit('refresh')
}
} catch (error) { } catch (error) {
logError(error) logError(error)
} finally { } finally {