1
|
<template>
|
1
|
<template>
|
2
|
<div :class="classes">
|
2
|
<div :class="classes">
|
3
|
- <slot name="tabs" v-bind:navList="navList">
|
3
|
+ <slot name="tabs">
|
4
|
<div :class="[prefixCls + '-bar']">
|
4
|
<div :class="[prefixCls + '-bar']">
|
5
|
<span class="back" @click="onBackClick">
|
5
|
<span class="back" @click="onBackClick">
|
6
|
<i class="iconfont fontcls"></i>
|
6
|
<i class="iconfont fontcls"></i>
|
|
@@ -35,7 +35,13 @@ export default { |
|
@@ -35,7 +35,13 @@ export default { |
35
|
data() {
|
35
|
data() {
|
36
|
return {
|
36
|
return {
|
37
|
prefixCls: 'yoho-tabs',
|
37
|
prefixCls: 'yoho-tabs',
|
38
|
- navList: [],
|
38
|
+ navList: [{
|
|
|
39
|
+ label: '有货优惠券',
|
|
|
40
|
+ name: 0
|
|
|
41
|
+ }, {
|
|
|
42
|
+ label: 'UFO优惠券',
|
|
|
43
|
+ name: 1
|
|
|
44
|
+ }],
|
39
|
activeKey: this.value
|
45
|
activeKey: this.value
|
40
|
};
|
46
|
};
|
41
|
},
|
47
|
},
|
|
@@ -52,14 +58,7 @@ export default { |
|
@@ -52,14 +58,7 @@ export default { |
52
|
},
|
58
|
},
|
53
|
methods: {
|
59
|
methods: {
|
54
|
updateNav() {
|
60
|
updateNav() {
|
55
|
- this.navList = [];
|
|
|
56
|
this.getTabs().forEach((pane, index) => {
|
61
|
this.getTabs().forEach((pane, index) => {
|
57
|
- this.navList.push({
|
|
|
58
|
- label: pane.label,
|
|
|
59
|
- name: pane.currentName || index,
|
|
|
60
|
- disabled: pane.disabled
|
|
|
61
|
- });
|
|
|
62
|
-
|
|
|
63
|
if (!pane.currentName) {
|
62
|
if (!pane.currentName) {
|
64
|
pane.currentName = index;
|
63
|
pane.currentName = index;
|
65
|
}
|
64
|
}
|