|
@@ -2,8 +2,8 @@
|
|
|
<div class="setting">
|
|
|
<el-row class="order_tab">
|
|
|
<el-col :span="15">
|
|
|
- <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>
|
|
@@ -21,17 +21,17 @@
|
|
|
<script>
|
|
|
import voiceSetting from "./settingComponents/voiceSetting.vue";
|
|
|
import deliverySetting from "./settingComponents/deliverySetting.vue";
|
|
|
+import addressManagement from "./settingComponents/addressManagement.vue";
|
|
|
export default {
|
|
|
name: "HelloWorld",
|
|
|
data() {
|
|
|
return {
|
|
|
- msg: "Welcome to Your Vue.js App",
|
|
|
- tab_list: [
|
|
|
- { name: "自动接单/语音设置", index: 0 },
|
|
|
- { name: "推荐/屏蔽运力", index: 1 },
|
|
|
- { name: "常用地址", index: 2 },
|
|
|
+ tabList: [
|
|
|
+ { name: "自动接单/语音设置", index: 0,activeName: 'voiceSetting' },
|
|
|
+ { name: "推荐/屏蔽运力", index: 1,activeName: 'deliverySetting' },
|
|
|
+ // { name: "常用地址", index: 2,activeName: 'addressManagement' },
|
|
|
],
|
|
|
- tab_ac: 0,
|
|
|
+ tabNum: 0,
|
|
|
activeName: "voiceSetting",
|
|
|
renderComponent: true,
|
|
|
};
|
|
@@ -39,6 +39,7 @@ export default {
|
|
|
components: {
|
|
|
voiceSetting,
|
|
|
deliverySetting,
|
|
|
+ addressManagement,
|
|
|
},
|
|
|
methods: {
|
|
|
forceRerender() {
|
|
@@ -50,12 +51,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
changeTabs(i) {
|
|
|
- if (i === this.tab_ac) {
|
|
|
+ if (i === this.tabNum) {
|
|
|
this.forceRerender();
|
|
|
return;
|
|
|
}
|
|
|
- this.tab_ac = i;
|
|
|
- this.activeName = i == 0 ? "voiceSetting" : "deliverySetting";
|
|
|
+ this.tabNum = i;
|
|
|
+ this.activeName = this.tabList[i].activeName;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -69,7 +70,7 @@ export default {
|
|
|
height: 74px;
|
|
|
background: #fff;
|
|
|
|
|
|
- .tab_list {
|
|
|
+ .tabList {
|
|
|
width: 100%;
|
|
|
height: 74px;
|
|
|
padding-top: 20px;
|