|
@@ -2,8 +2,8 @@
|
|
|
<div class="shopInfo">
|
|
|
<el-row class="order_tab">
|
|
|
<el-col :span="24">
|
|
|
- <div class="tab_list">
|
|
|
- <div class="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tab_ac==i?true:false}" v-for="(item,i) in tab_list" :key="i">
|
|
|
+ <div class="tabList">
|
|
|
+ <div class="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tabNum==i?true:false}" v-for="(item,i) in tabList" :key="i">
|
|
|
<span>{{item.name}}</span>
|
|
|
<div class="tab_line"></div>
|
|
|
</div>
|
|
@@ -37,13 +37,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: "shopList",
|
|
|
- tab_list: [
|
|
|
- { name: "门店列表", index: 0 },
|
|
|
- { name: "绑定外卖平台", index: 1 },
|
|
|
- { name: "绑定配送平台", index: 2 },
|
|
|
- { name: "绑定打印机", index: 3 },
|
|
|
+ tabList: [
|
|
|
+ { name: "门店列表", index: 0, activeName: "shopList" },
|
|
|
+ { name: "绑定外卖平台", index: 1, activeName: "storeList" },
|
|
|
+ { name: "绑定配送平台", index: 2, activeName: "deliveryList" },
|
|
|
+ { name: "绑定打印机", index: 3, activeName: "printerList" },
|
|
|
],
|
|
|
- tab_ac: 0,
|
|
|
+ tabNum: 0,
|
|
|
renderComponent: true,
|
|
|
};
|
|
|
},
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
bus.$on("goPrinter", () => {
|
|
|
this.changeTabs(3);
|
|
|
});
|
|
|
- let i = this.$route.query.tab_ac;
|
|
|
+ let i = this.$route.query.tabNum;
|
|
|
if (i) {
|
|
|
this.changeTabs(Number(i));
|
|
|
}
|
|
@@ -67,28 +67,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeTabs(i) {
|
|
|
- if (i === this.tab_ac) {
|
|
|
+ if (i === this.tabNum) {
|
|
|
this.forceRerender();
|
|
|
return;
|
|
|
}
|
|
|
- this.tab_ac = i;
|
|
|
- switch (i) {
|
|
|
- case 0:
|
|
|
- this.activeName = "shopList";
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- this.activeName = "storeList";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- this.activeName = "deliveryList";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- this.activeName = "printerList";
|
|
|
- break;
|
|
|
- default:
|
|
|
- this.activeName = "shopList";
|
|
|
- break;
|
|
|
- }
|
|
|
+ this.tabNum = i;
|
|
|
+ this.activeName = this.tabList[i].activeName;
|
|
|
},
|
|
|
},
|
|
|
mounted() {},
|
|
@@ -103,7 +87,7 @@ export default {
|
|
|
height: 74px;
|
|
|
background: #fff;
|
|
|
|
|
|
- .tab_list {
|
|
|
+ .tabList {
|
|
|
width: 100%;
|
|
|
height: 74px;
|
|
|
padding-top: 20px;
|