|
@@ -3,8 +3,7 @@
|
|
|
<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="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tab_ac==i?true:false}" v-for="(item,i) in tab_list" :key="i">
|
|
|
<span>{{item.name}}</span>
|
|
|
<div class="tab_line"></div>
|
|
|
</div>
|
|
@@ -13,111 +12,111 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-row class="content">
|
|
|
- <component :is="activeName"></component>
|
|
|
+ <component :is="activeName"></component>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import wallet from './accountCompoents/wallet.vue';
|
|
|
- import coupon from './accountCompoents/coupon.vue';
|
|
|
- import recharge from './accountCompoents/recharge.vue';
|
|
|
- export default {
|
|
|
- name: 'HelloWorld',
|
|
|
- components: {
|
|
|
- wallet,
|
|
|
- coupon,
|
|
|
- recharge
|
|
|
- },
|
|
|
+import wallet from "./accountCompoents/wallet.vue";
|
|
|
+import coupon from "./accountCompoents/coupon.vue";
|
|
|
+import recharge from "./accountCompoents/recharge.vue";
|
|
|
+import consumption from "./accountCompoents/consumption.vue";
|
|
|
+export default {
|
|
|
+ name: "HelloWorld",
|
|
|
+ components: {
|
|
|
+ wallet,
|
|
|
+ coupon,
|
|
|
+ recharge,
|
|
|
+ consumption,
|
|
|
+ },
|
|
|
|
|
|
- data() {
|
|
|
- return {
|
|
|
- activeName: 'wallet',
|
|
|
- tab_list: [
|
|
|
- {name: '我的钱包', index: 0},
|
|
|
- {name: '优惠券', index: 1},
|
|
|
- {name: '充值明细', index: 2},
|
|
|
- {name: '消费明细', index: 3}
|
|
|
- ],
|
|
|
- tab_ac: 0,
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- changeTabs(i) {
|
|
|
- this.tab_ac = i;
|
|
|
- switch(i) {
|
|
|
- case 0:
|
|
|
- this.activeName = 'wallet';
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeName: "wallet",
|
|
|
+ tab_list: [
|
|
|
+ { name: "我的钱包", index: 0 },
|
|
|
+ { name: "优惠券", index: 1 },
|
|
|
+ { name: "充值明细", index: 2 },
|
|
|
+ { name: "消费明细", index: 3 },
|
|
|
+ ],
|
|
|
+ tab_ac: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeTabs(i) {
|
|
|
+ this.tab_ac = i;
|
|
|
+ switch (i) {
|
|
|
+ case 0:
|
|
|
+ this.activeName = "wallet";
|
|
|
break;
|
|
|
- case 1:
|
|
|
- this.activeName = 'coupon';
|
|
|
+ case 1:
|
|
|
+ this.activeName = "coupon";
|
|
|
break;
|
|
|
- case 2:
|
|
|
- this.activeName = 'recharge';
|
|
|
+ case 2:
|
|
|
+ this.activeName = "recharge";
|
|
|
break;
|
|
|
- case 3:
|
|
|
- this.activeName = 'consumption';
|
|
|
+ case 3:
|
|
|
+ this.activeName = "consumption";
|
|
|
break;
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
|
<style scoped lang="scss">
|
|
|
- .shopInfo {
|
|
|
- .order_tab {
|
|
|
+.shopInfo {
|
|
|
+ .order_tab {
|
|
|
+ width: 100%;
|
|
|
+ height: 74px;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ .tab_list {
|
|
|
width: 100%;
|
|
|
height: 74px;
|
|
|
- background: #FFF;
|
|
|
-
|
|
|
- .tab_list {
|
|
|
- width: 100%;
|
|
|
- height: 74px;
|
|
|
- padding-top: 20px;
|
|
|
- padding-left: 36px;
|
|
|
- box-sizing: border-box;
|
|
|
- display: flex;
|
|
|
+ padding-top: 20px;
|
|
|
+ padding-left: 36px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
|
|
|
- .tab_item {
|
|
|
- min-width: 58px;
|
|
|
- margin-right: 56px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 500;
|
|
|
- color: #B1B1B1;
|
|
|
- position: relative;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
+ .tab_item {
|
|
|
+ min-width: 58px;
|
|
|
+ margin-right: 56px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #b1b1b1;
|
|
|
+ position: relative;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
- .tab_line {
|
|
|
- width: 58px;
|
|
|
- height: 6px;
|
|
|
- background: #FFF;
|
|
|
- border-radius: 3px;
|
|
|
- margin: 15px auto 0;
|
|
|
- }
|
|
|
+ .tab_line {
|
|
|
+ width: 58px;
|
|
|
+ height: 6px;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 3px;
|
|
|
+ margin: 15px auto 0;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .tab_item_ac {
|
|
|
- color: #FC7200;
|
|
|
+ .tab_item_ac {
|
|
|
+ color: #fc7200;
|
|
|
|
|
|
- .tab_line {
|
|
|
- background: #FC7200;
|
|
|
- }
|
|
|
+ .tab_line {
|
|
|
+ background: #fc7200;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .content {
|
|
|
- width: 100%;
|
|
|
- margin-top: 10px;
|
|
|
- padding: 20px;
|
|
|
- box-sizing: border-box;
|
|
|
- background: #FFF;
|
|
|
-
|
|
|
- }
|
|
|
+ .content {
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 10px;
|
|
|
+ padding: 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|