update Tabs
@hezhiying
This commit is contained in:
parent
02fa0d3fff
commit
8e4f708f25
2 changed files with 6 additions and 6 deletions
|
@ -9,8 +9,8 @@
|
|||
</Col>
|
||||
<Col :span="12">
|
||||
<Tabs type="card" closable @on-tab-remove="handleTagRemove">
|
||||
<Tab-pane :label="tab.label" v-for="tab of tabs">{{tab.content}}</Tab-pane>
|
||||
<Button size="small" slot="right" @click="addTab">添加</Button>
|
||||
<Tab-pane :label="tab.label" v-for="tab of tabs" :key="tab">{{tab.content}}</Tab-pane>
|
||||
<Button size="small" slot="extra" @click="addTab">添加</Button>
|
||||
</Tabs>
|
||||
</Col>
|
||||
</Row>
|
||||
|
|
|
@ -12,7 +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 :class="[prefixCls + '-nav-right']" v-if="showSlot"><slot name="extra"></slot></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -61,7 +61,7 @@
|
|||
barWidth: 0,
|
||||
barOffset: 0,
|
||||
activeKey: this.value,
|
||||
showSlot:false
|
||||
showSlot: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -228,8 +228,8 @@
|
|||
this.updateStatus();
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.showSlot = this.$slots.default !== undefined;
|
||||
mounted () {
|
||||
this.showSlot = this.$slots.extra !== undefined;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue