commit
02fa0d3fff
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>
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&-nav-right{
|
||||
float: right;
|
||||
}
|
||||
|
||||
&-nav {
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue