关于elementui 面包屑设置
作者:互联网
后台管理面包屑
新建组件
<template>
<el-breadcrumb separator-class="el-icon-arrow-right">
<template v-for="item in list">
<el-breadcrumb-item v-if="item.path" :to="{path:item.path}" :key="item.path">
{{ item.meta.title }}
</el-breadcrumb-item>
<el-breadcrumb-item v-else :to="{path:'/'}" :key="item.path">
{{ item.meta.title }}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
mounted() {
},
computed: {
list() {
return this.$route.matched;
},
}
}
</script>
<style lang='scss' scoped>
</style>
在index页面中引入
<XnBread></XnBread>
标签:return,methods,elementui,title,item,meta,设置,面包屑 来源: https://www.cnblogs.com/web-simon/p/16485127.html