Fix dependencies list not updating on dependency remove. (#1388)

This commit is contained in:
chaos
2023-10-01 13:19:23 -07:00
committed by GitHub
parent c4ddd08b0a
commit 9acc463c7f

View File

@@ -908,8 +908,6 @@ export default defineNuxtComponent({
ogDescription: description, ogDescription: description,
}) })
const order = ['required', 'optional', 'incompatible', 'embedded']
return { return {
auth, auth,
tags, tags,
@@ -921,12 +919,6 @@ export default defineNuxtComponent({
primaryFile: ref(primaryFile), primaryFile: ref(primaryFile),
alternateFile: ref(alternateFile), alternateFile: ref(alternateFile),
replaceFile: ref(replaceFile), replaceFile: ref(replaceFile),
deps: computed(() =>
version.dependencies.sort(
(a, b) => order.indexOf(a.dependency_type) - order.indexOf(b.dependency_type)
)
),
} }
}, },
data() { data() {
@@ -959,6 +951,12 @@ export default defineNuxtComponent({
(this.newFiles.length === 0 && this.version.files.length === 0 && !this.replaceFile) (this.newFiles.length === 0 && this.version.files.length === 0 && !this.replaceFile)
) )
}, },
deps() {
const order = ['required', 'optional', 'incompatible', 'embedded']
return [...this.version.dependencies].sort(
(a, b) => order.indexOf(a.dependency_type) - order.indexOf(b.dependency_type)
)
},
}, },
watch: { watch: {
'$route.path'() { '$route.path'() {