feat:混合模式下,当点击“Spark”或“APM”的子开关时,也会刷新是否已安装逻辑

This commit is contained in:
2026-03-11 14:24:14 +08:00
parent 207334608c
commit b3cef63bf5
2 changed files with 12 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ const emit = defineEmits<{
(e: "remove", app: App): void;
(e: "open-preview", index: number): void;
(e: "open-app", pkgname: string): void;
(e: "check-install", app: App): void;
}>();
const appPkgname = computed(() => props.app?.pkgname);
@@ -305,6 +306,16 @@ const displayApp = computed(() => {
: props.app.apmApp || props.app;
});
watch(
() => displayApp.value,
(newApp) => {
if (newApp) {
emit("check-install", newApp);
}
},
{ immediate: false },
);
const activeDownload = computed(() => {
return downloads.value.find((d) => d.pkgname === displayApp.value?.pkgname);
});