update 面包屑,页面样式
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -22,15 +24,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getBreadcrumb () {
|
||||
console.log('this.$route.matched', this.$route.matched)
|
||||
|
||||
this.breadList = []
|
||||
this.breadList.push({ name: 'dashboard-analysis', path: '/dashboard/analysis', meta: { title: '首页' } })
|
||||
|
||||
this.name = this.$route.name
|
||||
this.$route.matched.forEach((item) => {
|
||||
// item.meta.name === 'dashboard' ? item.path = '/dashboard' : this.$route.path === item.path
|
||||
this.breadList.push(item)
|
||||
if (!(!item.path && item.name === 'dashboard')) {
|
||||
this.breadList.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -42,6 +41,13 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
.ant-breadcrumb {
|
||||
margin: 12px;
|
||||
}
|
||||
|
||||
.ant-breadcrumb > span:last-child {
|
||||
color: @primary-color;
|
||||
font-weight: 550;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user