|
@@ -1,23 +1,40 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class='box-shadow-blue full-height' style="background-color: #F4F3EE">
|
|
|
|
|
- <div class='padding mt-20'>
|
|
|
|
|
- <div class='flex flex-center mt-10' style="margin-bottom: 60px">
|
|
|
|
|
- <img src='@/assets/svg/logo.svg'/>
|
|
|
|
|
|
|
+ <div class="box-shadow-blue full-height" style="background-color: #f4f3ee">
|
|
|
|
|
+ <div class="padding mt-20">
|
|
|
|
|
+ <div class="flex flex-center mt-10" style="margin-bottom: 60px">
|
|
|
|
|
+ <img src="@/assets/svg/logo.svg" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <div class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width ">
|
|
|
|
|
- <div v-for="(item,index) in data" :key="item.name" class="full-width flex flex-col flex-center pointer ">
|
|
|
|
|
- <div class='full-width flex flex-center padding' style='z-index: 2'
|
|
|
|
|
- :class="active === index ? 'item-s' : 'item'" @click="navClick(item,index)">
|
|
|
|
|
- <img :src=item.img>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="(item, index) in data"
|
|
|
|
|
+ :key="item.name"
|
|
|
|
|
+ class="full-width flex flex-col flex-center pointer"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="full-width flex flex-center padding"
|
|
|
|
|
+ style="z-index: 2"
|
|
|
|
|
+ :class="active === index ? 'item-s' : 'item'"
|
|
|
|
|
+ @click="navClick(item, index)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img :src="item.img" />
|
|
|
<span class="flex-child-average">{{ item.name }}</span>
|
|
<span class="flex-child-average">{{ item.name }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if='item.children && item.children.length > 0 && active === index'
|
|
|
|
|
- class=' flex flex-col flex-center item-sub padding'>
|
|
|
|
|
- <div v-for='(sub,subIndex) in item.children' :key='item' class='padding full-width flex flex-center'
|
|
|
|
|
- :class='subIndex === subActive ? "item-sub-active":"" ' @click='subClick(sub,subIndex)'>
|
|
|
|
|
- <div class='mr-10 main-color'>·</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-if="item.children && item.children.length > 0 && active === index"
|
|
|
|
|
+ class="flex flex-col flex-center item-sub padding"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="(sub, subIndex) in item.children"
|
|
|
|
|
+ :key="item"
|
|
|
|
|
+ class="padding full-width flex flex-center"
|
|
|
|
|
+ :class="subIndex === subActive ? 'item-sub-active' : ''"
|
|
|
|
|
+ @click="subClick(sub, subIndex)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="mr-10 main-color">·</div>
|
|
|
<span>{{ sub.name }}</span>
|
|
<span>{{ sub.name }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -29,7 +46,7 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
export default {
|
|
export default {
|
|
|
- data () {
|
|
|
|
|
|
|
+ data() {
|
|
|
return {
|
|
return {
|
|
|
active: 0,
|
|
active: 0,
|
|
|
subActive: 0,
|
|
subActive: 0,
|
|
@@ -61,7 +78,7 @@ export default {
|
|
|
{
|
|
{
|
|
|
name: '公司资料',
|
|
name: '公司资料',
|
|
|
img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
|
|
img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
|
|
|
- path: '/components'
|
|
|
|
|
|
|
+ path: '/company'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
@@ -74,16 +91,16 @@ export default {
|
|
|
currentPage: ''
|
|
currentPage: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created () {
|
|
|
|
|
|
|
+ created() {
|
|
|
this.currentPage = window.location.href
|
|
this.currentPage = window.location.href
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- init () {
|
|
|
|
|
|
|
+ init() {
|
|
|
if (this.currentPage.indexOf('/invest') > -1) {
|
|
if (this.currentPage.indexOf('/invest') > -1) {
|
|
|
this.active = 1
|
|
this.active = 1
|
|
|
- // } else if (this.currentPage.indexOf('/task') > -1) {
|
|
|
|
|
- // this.active = 2
|
|
|
|
|
|
|
+ // } else if (this.currentPage.indexOf('/task') > -1) {
|
|
|
|
|
+ // this.active = 2
|
|
|
} else if (this.currentPage.indexOf('/database') > -1) {
|
|
} else if (this.currentPage.indexOf('/database') > -1) {
|
|
|
this.active = 2
|
|
this.active = 2
|
|
|
} else if (this.currentPage.indexOf('/recycle') > -1) {
|
|
} else if (this.currentPage.indexOf('/recycle') > -1) {
|
|
@@ -92,7 +109,7 @@ export default {
|
|
|
this.active = 0
|
|
this.active = 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- navClick (item, index) {
|
|
|
|
|
|
|
+ navClick(item, index) {
|
|
|
this.active = index
|
|
this.active = index
|
|
|
if (item.children && item.children.length > 0) {
|
|
if (item.children && item.children.length > 0) {
|
|
|
this.subActive = 0
|
|
this.subActive = 0
|
|
@@ -101,7 +118,7 @@ export default {
|
|
|
this.$router.push(item.path)
|
|
this.$router.push(item.path)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- subClick (item, index) {
|
|
|
|
|
|
|
+ subClick(item, index) {
|
|
|
this.subActive = index
|
|
this.subActive = index
|
|
|
this.$router.push(item.path)
|
|
this.$router.push(item.path)
|
|
|
}
|
|
}
|
|
@@ -120,8 +137,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-bg {
|
|
.item-bg {
|
|
|
- border-top: 1px solid #D1D1D1;
|
|
|
|
|
- border-bottom: 1px solid #D1D1D1;
|
|
|
|
|
|
|
+ border-top: 1px solid #d1d1d1;
|
|
|
|
|
+ border-bottom: 1px solid #d1d1d1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-s {
|
|
.item-s {
|
|
@@ -129,7 +146,7 @@ export default {
|
|
|
border-radius: 14px;
|
|
border-radius: 14px;
|
|
|
margin-top: 30px;
|
|
margin-top: 30px;
|
|
|
color: white;
|
|
color: white;
|
|
|
- background-color: #AB7630;
|
|
|
|
|
|
|
+ background-color: #ab7630;
|
|
|
box-shadow: 2px 2px 10px 2px rgba(242, 162, 58, 0.49);
|
|
box-shadow: 2px 2px 10px 2px rgba(242, 162, 58, 0.49);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -147,11 +164,10 @@ export default {
|
|
|
margin-top: -10px;
|
|
margin-top: -10px;
|
|
|
padding-top: 20px;
|
|
padding-top: 20px;
|
|
|
color: #939393;
|
|
color: #939393;
|
|
|
- background-color: #E4E4E4;
|
|
|
|
|
|
|
+ background-color: #e4e4e4;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item-sub-active {
|
|
.item-sub-active {
|
|
|
- background-color: #D3D3D3;
|
|
|
|
|
|
|
+ background-color: #d3d3d3;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|