const tabComponent = { template: ` `, data() { return { tabData: {}, list: [], isSwitchCount: 1 } }, 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) => { if (item.iswitch === "1") { this.isSwitchCount++ } 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 } }