update 面包屑,页面样式

This commit is contained in:
赵霄
2023-09-22 10:27:00 +08:00
parent 7360dcff84
commit 84315607bc
4 changed files with 35 additions and 26 deletions
+13 -7
View File
@@ -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>