From fcb6dc26bdc65ce455691f58b276cc846fab99bc Mon Sep 17 00:00:00 2001 From: Vion Date: Sun, 23 Jan 2022 11:30:31 +0800 Subject: [PATCH] Breadcrumbs 0 version --- rc-busness/components/tabs.vue | 115 ++++-------------- .../pages/productdetails/productlist.vue | 41 ++++--- 2 files changed, 48 insertions(+), 108 deletions(-) diff --git a/rc-busness/components/tabs.vue b/rc-busness/components/tabs.vue index 92be0d68..a2c6336f 100644 --- a/rc-busness/components/tabs.vue +++ b/rc-busness/components/tabs.vue @@ -1,12 +1,11 @@ @@ -14,93 +13,25 @@ import { mapState, mapMutations } from "vuex"; export default { + props:["crumbs"], + name:"crumbs", data() { - return { - title: "", - path: "", - titleLists: [ - { - path: '/', - name: 'index', - meta:{ - title: '首页', - - } - } - - ], - showTab: true, - isShow: true, - }; - }, - - - watch: { - $route() { - this.setTitle(); - }, - }, - mounted() { - this.setTitle(); - }, - - methods: { - ...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(){ - - // } + return { + homepageName:'首页' + }; + }, + created(){ + if(this.showTab != false) + this.showTab=true; + }, + watch: { + }, + mounted() { + }, + methods: { + ...mapMutations(["changemessage",'selectMenu']) + } }; diff --git a/rc-busness/pages/productdetails/productlist.vue b/rc-busness/pages/productdetails/productlist.vue index 0eda6010..11801ff0 100644 --- a/rc-busness/pages/productdetails/productlist.vue +++ b/rc-busness/pages/productdetails/productlist.vue @@ -2,6 +2,7 @@
+
@@ -310,6 +311,7 @@ import Myheader from "~/components/header.vue"; import MyFooter from '~/components/rc-footer.vue' import FixRight from "~/components/fixed-right.vue"; +import tabs from "~/components/tabs.vue"; import { userstype, biaome, @@ -320,21 +322,27 @@ import { export default { data() { return { - value: "", - isLoading: false, - userstype: [], - activeIndex: "0", - allacindex: 0, - userishwo: true, - userishwo4: true, - userserachlist: [ - { - categoryName: [], //专区 - tagUsedAge: [], //年龄 - tagFunction: [], //功能 - tagBreed: [], //品种 - }, - ], + crumbs:[ + { + path:'/productdetails/productlist/', + title:'产品列表', + } + ], + value: "", + isLoading: false, + userstype: [], + activeIndex: "0", + allacindex: 0, + userishwo: true, + userishwo4: true, + userserachlist: [ + { + categoryName: [], //专区 + tagUsedAge: [], //年龄 + tagFunction: [], //功能 + tagBreed: [], //品种 + }, + ], activeIndex1: 0, activeIndexa: "-1", dialogInfo1: false, @@ -477,7 +485,8 @@ export default { components: { Myheader, MyFooter, - FixRight + FixRight, + tabs }, created() { this.routeParams=this.$route.query;