guhongwei 5 лет назад
Родитель
Сommit
78d283ace8
3 измененных файлов с 57 добавлено и 3 удалено
  1. 44 0
      src/layout/public/top.vue
  2. 2 0
      src/router/index.js
  3. 11 3
      src/views/menu/index.vue

+ 44 - 0
src/layout/public/top.vue

@@ -0,0 +1,44 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col class="info">
+        <el-col :span="1" class="home">
+          <i class="el-icon-s-home"></i>
+        </el-col>
+        <el-col :span="23">
+          <el-breadcrumb separator-class="el-icon-arrow-right">
+            <el-breadcrumb-item :to="{ path: '/' }"> 我的主页</el-breadcrumb-item>
+            <el-breadcrumb-item>{{ topTitle }}</el-breadcrumb-item>
+          </el-breadcrumb>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'top',
+  props: {
+    topTitle: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.info {
+  height: 40px;
+  line-height: 40px;
+}
+.home {
+  text-align: center;
+}
+/deep/.el-breadcrumb {
+  line-height: 40px;
+}
+</style>

+ 2 - 0
src/router/index.js

@@ -5,11 +5,13 @@ import checkLogin from '@common/router/before';
 Vue.use(VueRouter);
 
 const routes = [
+  // 首页
   {
     path: '/',
     meta: { title: '首页管理' },
     component: () => import('../views/home/index.vue'),
   },
+  // 菜单管理
   {
     path: '/menu/index',
     meta: { title: '菜单管理' },

+ 11 - 3
src/views/menu/index.vue

@@ -1,17 +1,25 @@
 <template>
   <div id="index">
     <el-row>
-      <el-col :span="24">
-        菜单
+      <el-col :span="24" class="index">
+        <el-col :span="24" class="top">
+          <topInfo :topTitle="pageTitle"></topInfo>
+        </el-col>
+        <el-col :span="24" class="info">
+          主体
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
 <script>
+import topInfo from '@/layout/public/top.vue';
 export default {
   name: 'index',
   props: {},
-  components: {},
+  components: {
+    topInfo,
+  },
   data: () => ({}),
   created() {},
   methods: {},