mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 02:36:39 +08:00
Breadcrumbs 0 version
This commit is contained in:
parent
43857121c4
commit
fcb6dc26bd
@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="crumbs" v-if="showTab">
|
<div class="crumbs" v-if="showTab">
|
||||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in titleLists"
|
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
||||||
:key="index">{{ item.meta.title }}</el-breadcrumb-item>
|
|
||||||
<!-- <el-breadcrumb-item>商品管理</el-breadcrumb-item>
|
|
||||||
<el-breadcrumb-item>商品分类</el-breadcrumb-item> -->
|
|
||||||
</el-breadcrumb>
|
|
||||||
|
|
||||||
|
<el-breadcrumb-item :to=item.path v-for="(item, index) in crumbs"
|
||||||
|
:key="index">{{ item.title }}</el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -14,93 +13,25 @@
|
|||||||
import { mapState, mapMutations } from "vuex";
|
import { mapState, mapMutations } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props:["crumbs"],
|
||||||
|
name:"crumbs",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: "",
|
homepageName:'首页'
|
||||||
path: "",
|
|
||||||
titleLists: [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
name: 'index',
|
|
||||||
meta:{
|
|
||||||
title: '首页',
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
],
|
|
||||||
showTab: true,
|
|
||||||
isShow: true,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
if(this.showTab != false)
|
||||||
watch: {
|
this.showTab=true;
|
||||||
$route() {
|
|
||||||
this.setTitle();
|
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.setTitle();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["changemessage",'selectMenu']),
|
...mapMutations(["changemessage",'selectMenu'])
|
||||||
setTitle() {
|
|
||||||
console.log(this.$route.matched);
|
|
||||||
console.log(this.titleLists);
|
|
||||||
let userinfo=[]
|
|
||||||
|
|
||||||
|
|
||||||
let saveUserInfo={
|
|
||||||
path:'admin',
|
|
||||||
name:'1',
|
|
||||||
meta:'b341181c-aced-11e9-89bf-00163e0e8daf',
|
|
||||||
|
|
||||||
}
|
}
|
||||||
userinfo.push(this.$route.matched);
|
|
||||||
let list=[];
|
|
||||||
console.log(userinfo);
|
|
||||||
userinfo.map(item=>{
|
|
||||||
console.log(item);
|
|
||||||
list=item;
|
|
||||||
})
|
|
||||||
console.log(list);
|
|
||||||
let anlist={
|
|
||||||
path:'admin',
|
|
||||||
name:'1',
|
|
||||||
meta:'b341181c-aced-11e9-89bf-00163e0e8daf',
|
|
||||||
}
|
|
||||||
list.forEach(element=>{
|
|
||||||
console.log(element);
|
|
||||||
anlist=element
|
|
||||||
})
|
|
||||||
for(let i in list){
|
|
||||||
saveUserInfo.path=list[i].path;
|
|
||||||
saveUserInfo.name=list[i].name;
|
|
||||||
saveUserInfo.meta=list[i].meta;
|
|
||||||
}
|
|
||||||
console.log(saveUserInfo);
|
|
||||||
// store.commit('se', current.name);
|
|
||||||
this.selectMenu({ data: saveUserInfo });
|
|
||||||
console.log(this.$store.state.tabsList);
|
|
||||||
this.titleLists=this.$store.state.tabsList;
|
|
||||||
// console.log(userlisa);
|
|
||||||
console.log(this.titleLists);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// created(){
|
|
||||||
// let user=this.$store.state.tabsList;
|
|
||||||
// this.tags=user;
|
|
||||||
// console.log(this.tags);
|
|
||||||
// console.log(user);
|
|
||||||
// console.log(this.$store.state.tabsList)
|
|
||||||
// },
|
|
||||||
|
|
||||||
// mounted(){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-max-width--xl rc-main">
|
<div class="rc-max-width--xl rc-main">
|
||||||
<div class="usersearch">
|
<div class="usersearch">
|
||||||
<div class="usercontentshow" ref="usercontent">
|
<div class="usercontentshow" ref="usercontent">
|
||||||
@ -310,6 +311,7 @@
|
|||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
import FixRight from "~/components/fixed-right.vue";
|
import FixRight from "~/components/fixed-right.vue";
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
import {
|
import {
|
||||||
userstype,
|
userstype,
|
||||||
biaome,
|
biaome,
|
||||||
@ -320,6 +322,12 @@ import {
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/productdetails/productlist/',
|
||||||
|
title:'产品列表',
|
||||||
|
}
|
||||||
|
],
|
||||||
value: "",
|
value: "",
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
userstype: [],
|
userstype: [],
|
||||||
@ -477,7 +485,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
MyFooter,
|
MyFooter,
|
||||||
FixRight
|
FixRight,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.routeParams=this.$route.query;
|
this.routeParams=this.$route.query;
|
||||||
|
Loading…
Reference in New Issue
Block a user