done
This commit is contained in:
@@ -8,30 +8,26 @@
|
||||
export default {
|
||||
name: 'zan-tab',
|
||||
props: {
|
||||
// 对应 Tabs 组件的 activeKey
|
||||
tabKey: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
// 选项卡头显示文字
|
||||
title: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
tabPaneClassName: {
|
||||
paneclass: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
disable: Boolean
|
||||
},
|
||||
computed: {
|
||||
classNames() {
|
||||
return [
|
||||
{'is-select': this.tabKey == this.$parent.switchActiveTabKey},
|
||||
this.tabPaneClassName
|
||||
{'is-select': this.$parent.tabs.indexOf(this) == this.$parent.switchActiveTabKey },
|
||||
this.paneclass
|
||||
];
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.$parent.tabCreate(this.tabKey, this.title);
|
||||
this.$parent.tabs.push(this);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user