|
@@ -13,7 +13,7 @@
|
|
|
@click.stop="$emit('click', 'pano')"
|
|
|
class="icon"
|
|
|
:class="{ active: custom.showMode === 'pano' && active }"
|
|
|
- v-if="getSceneModel(props.model)?.supportPano()"
|
|
|
+ v-if="supportPano"
|
|
|
/>
|
|
|
<ui-input
|
|
|
type="checkbox"
|
|
@@ -47,7 +47,7 @@ import { custom } from "@/env";
|
|
|
import { getSceneModel } from "@/sdk";
|
|
|
|
|
|
import type { FuseModel } from "@/store";
|
|
|
-import { computed } from "vue";
|
|
|
+import { computed, ref } from "vue";
|
|
|
import { currentModel, fuseModel } from "@/model";
|
|
|
|
|
|
type ModelProps = { model: FuseModel; canChange?: boolean };
|
|
@@ -56,6 +56,14 @@ const props = defineProps<ModelProps>();
|
|
|
const active = computed(
|
|
|
() => custom.currentModel === props.model && currentModel.value === fuseModel
|
|
|
);
|
|
|
+const sceneModel = getSceneModel(props.model);
|
|
|
+const supportPano = ref(sceneModel?.supportPano());
|
|
|
+if (sceneModel) {
|
|
|
+ sceneModel.bus.on("loadDone", () => {
|
|
|
+ console.error(sceneModel.supportPano());
|
|
|
+ supportPano.value = sceneModel.supportPano();
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
type ModelEmits = {
|
|
|
(e: "changeSelect", selected: boolean): void;
|