const tabComponent = {
template: `
-
{{item.text}}
`,
data() {
return {
tabData: {},
list: []
}
},
props: {
/* tab选中下标 */
current: {
type: Number,
default: 1
}
},
methods: {
/* 根据不同icon进行跳转 */
iconHandler(item) {
window.location.replace(item.link)
}
},
mounted() {
let { bottomBar } = JSON.parse(sessionStorage.getItem("product_list"))
this.tabData = bottomBar
bottomBar.navlist.map((item) => {
item.id = Number(item.id)
if (item.id === 1) {
item.link = "./couponCollection.html"
}
if (item.id === 2) {
item.link = "./myOrder.html"
}
if (item.id === 3) {
item.link = "./myCoupon.html"
}
})
this.list = bottomBar.navlist
}
}