guhongwei 4 tahun lalu
induk
melakukan
9a26c033e3

+ 6 - 33
src/components/common/Sidebar.vue

@@ -52,6 +52,11 @@ export default {
           index: 'homeIndex',
           title: '系统首页',
         },
+        {
+          icon: 'el-icon-s-home',
+          index: 'test',
+          title: '测试菜单',
+        },
       ],
     };
   },
@@ -75,39 +80,7 @@ export default {
       let user = this.user;
       // 复制列表
       let list = _.cloneDeep(this.items);
-      let data = [
-        {
-          icon: 'el-icon-s-home',
-          index: 'test',
-          title: '测试菜单',
-        },
-        // {
-        //   icon: 'el-icon-s-home',
-        //   index: 'sdalkd',
-        //   title: '测试菜单二级',
-        //   subs: [
-        //     {
-        //       index: 'test2',
-        //       title: '测试菜单',
-        //     },
-        //     {
-        //       index: 'test22',
-        //       title: '测试菜单',
-        //     },
-        //   ],
-        // },
-        // {
-        //   icon: 'el-icon-s-home',
-        //   index: 'asdasd',
-        //   title: '测试菜单三级',
-        //   subs: [
-        //     {
-        //       index: 'test3',
-        //       title: '测试菜单',
-        //     },
-        //   ],
-        // },
-      ];
+      let data = [];
       list.push(...data);
       this.$set(this, `items`, _.uniqBy(list, 'index'));
     },

+ 0 - 16
src/router/index.js

@@ -25,22 +25,6 @@ export default new Router({
           component: () => import('../views/test/index.vue'),
           meta: { title: '测试菜单' },
         },
-        {
-          path: '/test2',
-          component: () => import('../views/test2/index.vue'),
-          meta: { title: '测试菜单' },
-        },
-        {
-          path: '/test22',
-          component: () => import('../views/test22/index.vue'),
-          meta: { title: '测试菜单' },
-        },
-
-        {
-          path: '/test3',
-          component: () => import('../views/test3/index.vue'),
-          meta: { title: '测试菜单' },
-        },
       ],
     },
     {

+ 0 - 31
src/views/test2/index.vue

@@ -1,31 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24">
-        <p>index</p>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  metaInfo() {
-    return { title: this.route.meta.title };
-  },
-  name: 'index',
-  props: {},
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 31
src/views/test22/index.vue

@@ -1,31 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24">
-        <p>index</p>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  metaInfo() {
-    return { title: this.route.meta.title };
-  },
-  name: 'index',
-  props: {},
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped></style>

+ 0 - 31
src/views/test3/index.vue

@@ -1,31 +0,0 @@
-<template>
-  <div id="index">
-    <el-row>
-      <el-col :span="24">
-        <p>index</p>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  metaInfo() {
-    return { title: this.route.meta.title };
-  },
-  name: 'index',
-  props: {},
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-  },
-};
-</script>
-
-<style lang="less" scoped></style>