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

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

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