123
parent
100f535f02
commit
620710b9a5
|
@ -41,7 +41,8 @@
|
|||
"troisjs": "^0.3.4",
|
||||
"vue": "3.2.45",
|
||||
"vue-cropper": "1.0.3",
|
||||
"vue-router": "4.1.4"
|
||||
"vue-router": "4.1.4",
|
||||
"mitt": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "3.1.0",
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
import mitt from 'mitt'
|
||||
export default mitt()
|
|
@ -12,6 +12,8 @@
|
|||
<script setup>
|
||||
import bimStore from '@/store/modules/bim';
|
||||
import { nextTick } from "vue";
|
||||
import bus from '@/utils/bus.js'
|
||||
|
||||
const myTree = ref("myTree");
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -164,7 +166,10 @@ const handleNodeClick = (value) => {
|
|||
bimStore().setActivateTree(value);
|
||||
}
|
||||
const isParent = value.children.length > 0;
|
||||
emit('handleNodeClick', value, isParent)
|
||||
emit('handleNodeClick', value, isParent);
|
||||
|
||||
bus.emit('foo');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import {
|
|||
// import renderModel from "../renderModel";
|
||||
import homeIcon from '@/assets/image/bg7.jpg'
|
||||
import TWEEN from "@tweenjs/tween.js";
|
||||
import bus from '@/utils/bus.js'
|
||||
|
||||
let scene = ref(null);
|
||||
let renderer = ref(null);
|
||||
|
@ -59,6 +60,9 @@ watch(() => props.sceneUrl, val => {
|
|||
loadSence();
|
||||
});
|
||||
onMounted(() => {
|
||||
bus.on('foo', e => {
|
||||
|
||||
})
|
||||
init();
|
||||
loadSence();
|
||||
// 启动动画
|
||||
|
|
Loading…
Reference in New Issue