Home.vue 2.0 KB
Newer Older
X
xiesi 已提交
1
<template>
X
xiesi 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  <el-container style="height: 100%">
    <el-aside width="200px" style="overflow-x: hidden">
      <el-menu>
        <el-submenu index="1">
          <template #title
            ><i class="el-icon-message"> </i><span> 大分类A</span></template
          >
          <el-menu-item index="1-1">A.小分类a</el-menu-item>
          <el-menu-item index="1-2">A.小分类b</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-aside>
    <el-aside
      style="
        width: 200px;
        height: 100%;
        border: 1px solid #eee;
        background-color: #ffe;
        text-align: center;
        vertical-align: middle;
      "
    >
      模型列表 图片+名称
    </el-aside>

    <el-container>
      <el-header style="text-align: center; font-size: 40px">
29
        <el-button
X
xiesi 已提交
30
          @click="ondrawerbuttonclick"
31 32 33 34 35
          type="primary"
          style="margin-left: 16px"
        >
          可以添加属性,可以添加到项目,可以添加到打包集合
        </el-button>
X
xiesi 已提交
36 37
      </el-header>

38
      <el-main> hello </el-main>
X
xiesi 已提交
39 40
    </el-container>
  </el-container>
41

X
xiesi 已提交
42 43 44 45 46 47 48
  <el-drawer
    v-model="drawer"
    size="70%"
    @opened="aa"
    @close="helfds"
    @closed="cc"
    destroy-on-close
X
xiesi 已提交
49
    show-close="true"
X
xiesi 已提交
50 51 52
    :with-header="false"
  >
    <LoadFBX ref="myfbx" :fbxfilepath="curefbxname"> </LoadFBX>
53
  </el-drawer>
X
xiesi 已提交
54 55 56 57 58 59 60 61 62 63
</template>

<script>
import LoadFBX from "@/components/LoadFBX.vue";

export default {
  name: "Home",
  components: {
    LoadFBX,
  },
谢斯 已提交
64
  methods: {
X
xiesi 已提交
65 66 67 68 69 70
    ondrawerbuttonclick() {
      this.curefbxname = this.fbxnamelist[this.count++ % 2];
      console.log("click : " + this.curefbxname);
      this.drawer = true;
    },

谢斯 已提交
71 72 73 74
    aa() {
      console.log("aa");
      this.$refs.myfbx.hello();
    },
X
xiesi 已提交
75 76 77 78
    cc() {
      console.log("cc");
      this.$refs.myfbx.hello();
    },
谢斯 已提交
79
  },
80 81 82
  data() {
    return {
      drawer: false,
X
xiesi 已提交
83 84 85
      fbxnamelist: ["a.fbx", "b.fbx"],
      curefbxname: "a.fbx",
      count: 0,
86 87
    };
  },
X
xiesi 已提交
88 89 90 91
};
</script>

<style lang="scss" scoped>
X
xiesi 已提交
92 93
.el-main {
  padding: 0px;
X
xiesi 已提交
94 95
}
</style>