提交 66af0882 编写于 作者: X xiesi

可以通过抽屉 切换显示的内容

上级 643edb6b
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<el-container> <el-container>
<el-header style="text-align: center; font-size: 40px"> <el-header style="text-align: center; font-size: 40px">
<el-button <el-button
@click="drawer = true" @click="ondrawerbuttonclick"
type="primary" type="primary"
style="margin-left: 16px" style="margin-left: 16px"
> >
...@@ -39,8 +39,16 @@ ...@@ -39,8 +39,16 @@
</el-container> </el-container>
</el-container> </el-container>
<el-drawer v-model="drawer" size="70%" @opened="aa" :with-header="false"> <el-drawer
<LoadFBX ref="myfbx" fbxfilepath="a.fbx"> </LoadFBX> v-model="drawer"
size="70%"
@opened="aa"
@close="helfds"
@closed="cc"
destroy-on-close
:with-header="false"
>
<LoadFBX ref="myfbx" :fbxfilepath="curefbxname"> </LoadFBX>
</el-drawer> </el-drawer>
</template> </template>
...@@ -53,14 +61,27 @@ export default { ...@@ -53,14 +61,27 @@ export default {
LoadFBX, LoadFBX,
}, },
methods: { methods: {
ondrawerbuttonclick() {
this.curefbxname = this.fbxnamelist[this.count++ % 2];
console.log("click : " + this.curefbxname);
this.drawer = true;
},
aa() { aa() {
console.log("aa"); console.log("aa");
this.$refs.myfbx.hello(); this.$refs.myfbx.hello();
}, },
cc() {
console.log("cc");
this.$refs.myfbx.hello();
},
}, },
data() { data() {
return { return {
drawer: false, drawer: false,
fbxnamelist: ["a.fbx", "b.fbx"],
curefbxname: "a.fbx",
count: 0,
}; };
}, },
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册