Authored by htoooth

add tab

... ... @@ -77,6 +77,8 @@ export default {
this.showFilter = !this.showFilter;
this.$emit('on-filter-change', this.showFilter);
return;
} else {
this.showFilter = false;
}
this.activeKey = nav.label;
... ...
<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">&#xe763;</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;
}
... ...