index.vue 927 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="#home">
  3. <menu-list :modelNum.sync="modelNum" @handlerouterName="handlerouterName"></menu-list>
  4. <router-view />
  5. </div>
  6. </template>
  7. <script>
  8. import menuList from "@/components/menuList.vue";
  9. export default {
  10. props: [],
  11. data() {
  12. return {
  13. modelNum: 0,
  14. // shebeisheshiShow: false,
  15. routerName: "aa",
  16. imgSrcNum: 1,
  17. tanchuanShow: false
  18. };
  19. },
  20. computed: {},
  21. created() {},
  22. mounted() {},
  23. watch: {
  24. // tanchuanShow(newVal) {
  25. // console.log(newVal)
  26. // }
  27. },
  28. methods: {
  29. handlerouterName(val) {
  30. // console.log(val);
  31. this.routerName = val;
  32. if (val == "device") {
  33. this.modelNum = 3;
  34. } else if (val == "floor") {
  35. this.modelNum = 2;
  36. }
  37. }
  38. },
  39. components: {
  40. menuList
  41. }
  42. };
  43. </script>
  44. <style scoped lang="less">
  45. #home {
  46. width: 100%;
  47. height: 100%;
  48. position: relative;
  49. }
  50. </style>