fix: tabBarGutter not work

* fix: #2083

* fix: #2083

Co-authored-by: baojie <baojie223@qq.com>
pull/2098/head
baojie223 2020-04-15 20:26:17 +08:00 committed by GitHub
parent 39cf47a9d8
commit 603dcec087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ const TabBar = {
renderTabBar: PropTypes.func, renderTabBar: PropTypes.func,
panels: PropTypes.array.def([]), panels: PropTypes.array.def([]),
activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), activeKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
tabBarGutter: PropTypes.number,
}, },
render() { render() {
const { const {

View File

@ -43,6 +43,7 @@ export default {
defaultActiveKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), defaultActiveKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
__propsSymbol__: PropTypes.any, __propsSymbol__: PropTypes.any,
direction: PropTypes.string.def('ltr'), direction: PropTypes.string.def('ltr'),
tabBarGutter: PropTypes.number,
}, },
data() { data() {
const props = getOptionProps(this); const props = getOptionProps(this);
@ -193,6 +194,7 @@ export default {
renderTabBar, renderTabBar,
destroyInactiveTabPane, destroyInactiveTabPane,
direction, direction,
tabBarGutter,
} = props; } = props;
const cls = { const cls = {
[prefixCls]: 1, [prefixCls]: 1,
@ -209,6 +211,7 @@ export default {
panels: props.children, panels: props.children,
activeKey: this.$data._activeKey, activeKey: this.$data._activeKey,
direction, direction,
tabBarGutter,
}, },
on: { on: {
keydown: this.onNavKeyDown, keydown: this.onNavKeyDown,