|
@@ -5,7 +5,7 @@
|
|
|
<img src="/static/image/logo.png" class="logo" />
|
|
|
</div>
|
|
|
<el-menu class="sidebar-el-menu" :default-active="$route.path" :collapse="collapse" background-color="#00152A"
|
|
|
- text-color="#bfcbd9" active-text-color="#20a0ff" unique-opened router>
|
|
|
+ text-color="#bfcbd9" active-text-color="#20a0ff" router>
|
|
|
<template v-for="item in items">
|
|
|
<template v-if="item.children">
|
|
|
<el-submenu :index="item.path" :key="item.path">
|
|
@@ -27,7 +27,7 @@
|
|
|
<template v-else>
|
|
|
<el-menu-item :index="item.path" :key="item.path">
|
|
|
<!-- <i :class="[item.icon,'aliFamily']"></i> -->
|
|
|
- <img :src="item.icon" v-if="item.icon" />
|
|
|
+ <img :src="item.icon" class="side-bar-icon" v-if="item.icon" />
|
|
|
<span slot="title">{{ item.title }}</span>
|
|
|
</el-menu-item>
|
|
|
</template>
|
|
@@ -44,12 +44,51 @@
|
|
|
data() {
|
|
|
return {
|
|
|
collapse: false,
|
|
|
- items: []
|
|
|
+ //items: []
|
|
|
+ items: [
|
|
|
+ {
|
|
|
+ path: '/',
|
|
|
+ name: 'home',
|
|
|
+ title: '一键发单',
|
|
|
+ icon: '/static/image/order-icon.png',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: '/',
|
|
|
+ name: 'HomeIndex',
|
|
|
+ title: '订单列表',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/orderSearch',
|
|
|
+ name: 'orderSearch',
|
|
|
+ title: '订单查询',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/shopInfo',
|
|
|
+ name: 'shopInfo',
|
|
|
+ title: '商家信息',
|
|
|
+ icon: '/static/image/order-icon.png',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ path: '/shopInfo/shopInfos',
|
|
|
+ name: 'shopInfos',
|
|
|
+ title: '订单列表',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ path: '/setUp/set',
|
|
|
+ name: 'setUp',
|
|
|
+ title: '设置',
|
|
|
+ icon: '/static/image/order-icon.png'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
console.log(router.options.routes)
|
|
|
- this.items = [...router.options.routes];
|
|
|
+ //this.items = [...router.options.routes];
|
|
|
// 通过 Event Bus 进行组件间通信,来折叠侧边栏
|
|
|
bus.$on('collapse', msg => {
|
|
|
this.collapse = msg
|
|
@@ -59,12 +98,13 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang='scss' scoped='scoped'>
|
|
|
/deep/ .el-submenu .el-menu-item {
|
|
|
padding-left: 76px !important;
|
|
|
}
|
|
|
/deep/ .el-menu-item.is-active {
|
|
|
color: #fff !important;
|
|
|
+ background-color: #0C2B47 !important;
|
|
|
border-right: 6px solid #009CFF;
|
|
|
}
|
|
|
.sidebar {
|