|
|
<template>
|
|
|
<div :class="classes">
|
|
|
<slot name="tabs" v-bind:navList="navList">
|
|
|
<slot name="tabs">
|
|
|
<div :class="[prefixCls + '-bar']">
|
|
|
<span class="back" @click="onBackClick">
|
|
|
<i class="iconfont fontcls"></i>
|
...
|
...
|
@@ -35,7 +35,13 @@ export default { |
|
|
data() {
|
|
|
return {
|
|
|
prefixCls: 'yoho-tabs',
|
|
|
navList: [],
|
|
|
navList: [{
|
|
|
label: '有货优惠券',
|
|
|
name: 0
|
|
|
}, {
|
|
|
label: 'UFO优惠券',
|
|
|
name: 1
|
|
|
}],
|
|
|
activeKey: this.value
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -52,14 +58,7 @@ export default { |
|
|
},
|
|
|
methods: {
|
|
|
updateNav() {
|
|
|
this.navList = [];
|
|
|
this.getTabs().forEach((pane, index) => {
|
|
|
this.navList.push({
|
|
|
label: pane.label,
|
|
|
name: pane.currentName || index,
|
|
|
disabled: pane.disabled
|
|
|
});
|
|
|
|
|
|
if (!pane.currentName) {
|
|
|
pane.currentName = index;
|
|
|
}
|
...
|
...
|
|