|
@@ -202,12 +202,19 @@ watch(
|
|
|
([ams, am3ds], _, onCleanup) => {
|
|
|
const cleanups = am3ds.map((am3d, ndx) => {
|
|
|
const am = ams[ndx];
|
|
|
+ console.log("监听", am.title, am3d);
|
|
|
const update = (f: boolean) => {
|
|
|
- focusAM.value = f ? am : undefined;
|
|
|
+ console.log("changeSelect", f);
|
|
|
+ if (focusAM.value === am) {
|
|
|
+ focusAM.value = f ? am : undefined;
|
|
|
+ } else if (f) {
|
|
|
+ focusAM.value = am;
|
|
|
+ }
|
|
|
};
|
|
|
am3d?.bus.on("changeSelect", update);
|
|
|
|
|
|
return () => {
|
|
|
+ console.log("取消监听", am.title, am3d);
|
|
|
am3d?.bus.off("changeSelect", update);
|
|
|
};
|
|
|
});
|