2017-11-21 11:15:41 +00:00
|
|
|
<script>
|
2017-11-22 07:05:53 +00:00
|
|
|
import TabBarMixin from './TabBarMixin'
|
|
|
|
function noop () {
|
|
|
|
}
|
2017-11-21 11:15:41 +00:00
|
|
|
export default {
|
2017-11-22 07:45:43 +00:00
|
|
|
mixins: [TabBarMixin],
|
2017-11-21 11:15:41 +00:00
|
|
|
name: 'TabBar',
|
|
|
|
props: {
|
|
|
|
prefixCls: {
|
|
|
|
default: 'ant-tabs',
|
|
|
|
type: String,
|
|
|
|
},
|
|
|
|
tabBarPosition: {
|
|
|
|
default: 'top',
|
2017-11-22 07:05:53 +00:00
|
|
|
type: String,
|
2017-11-21 11:15:41 +00:00
|
|
|
},
|
|
|
|
disabled: Boolean,
|
2017-11-22 07:05:53 +00:00
|
|
|
onKeyDown: {
|
|
|
|
default: noop,
|
|
|
|
type: Function,
|
2017-11-21 11:15:41 +00:00
|
|
|
},
|
2017-11-22 07:05:53 +00:00
|
|
|
onTabClick: {
|
|
|
|
default: noop,
|
|
|
|
type: Function,
|
2017-11-21 11:15:41 +00:00
|
|
|
},
|
2017-11-22 07:05:53 +00:00
|
|
|
activeKey: String,
|
|
|
|
panels: Array,
|
2017-11-21 11:15:41 +00:00
|
|
|
},
|
2017-12-01 04:21:43 +00:00
|
|
|
render (h) {
|
|
|
|
const tabs = this.getTabs(h)
|
|
|
|
return this.getRootNode(tabs, h)
|
2017-11-21 11:15:41 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|