tabs组件导航区添加右侧slot功能及修改例子文件
This commit is contained in:
parent
5e7ad5e05a
commit
c4eb5dcffd
3 changed files with 36 additions and 7 deletions
|
@ -12,6 +12,7 @@
|
|||
<Icon v-if="showClose(item)" type="ios-close-empty" @click.native.stop="handleRemove(index)"></Icon>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-nav-right']" v-if="showSlot"><slot name="right"></slot></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +60,8 @@
|
|||
navList: [],
|
||||
barWidth: 0,
|
||||
barOffset: 0,
|
||||
activeKey: this.value
|
||||
activeKey: this.value,
|
||||
showSlot:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -225,6 +227,9 @@
|
|||
this.updateBar();
|
||||
this.updateStatus();
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.showSlot = this.$slots.default !== undefined;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue