Skip to content

Commit

Permalink
fixbug
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchch6 committed Mar 20, 2020
1 parent e160ac0 commit 5b1fb7f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions build/TabBarRootNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _classnames2 = require('classnames');
var _classnames = require('classnames');

var _classnames3 = _interopRequireDefault(_classnames2);
var _classnames2 = _interopRequireDefault(_classnames);

var _utils = require('./utils');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand Down Expand Up @@ -71,7 +69,9 @@ var TabBarRootNode = function (_React$Component) {
direction = _props.direction,
restProps = _objectWithoutProperties(_props, ['clsPrefix', 'onKeyDown', 'className', 'extraContent', 'style', 'tabBarPosition', 'children', 'direction']);

var cls = (0, _classnames3["default"])(clsPrefix + '-bar', _defineProperty({}, className, !!className));
var cls = (0, _classnames2["default"])(clsPrefix + '-bar', {
// [className]: !!className,
});
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {};
var newChildren = children;
Expand All @@ -89,8 +89,8 @@ var TabBarRootNode = function (_React$Component) {
className: cls,
tabIndex: '0',
ref: this.props.saveRef('root'),
onKeyDown: onKeyDown,
style: style
onKeyDown: onKeyDown
// style={style}
}, (0, _utils.getDataAttr)(restProps)),
newChildren
);
Expand Down
14 changes: 7 additions & 7 deletions dist/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -39684,18 +39684,16 @@

var _propTypes2 = _interopRequireDefault(_propTypes);

var _classnames2 = __webpack_require__(5);
var _classnames = __webpack_require__(5);

var _classnames3 = _interopRequireDefault(_classnames2);
var _classnames2 = _interopRequireDefault(_classnames);

var _utils = __webpack_require__(281);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Expand Down Expand Up @@ -39741,7 +39739,9 @@
direction = _props.direction,
restProps = _objectWithoutProperties(_props, ['clsPrefix', 'onKeyDown', 'className', 'extraContent', 'style', 'tabBarPosition', 'children', 'direction']);

var cls = (0, _classnames3['default'])(clsPrefix + '-bar', _defineProperty({}, className, !!className));
var cls = (0, _classnames2['default'])(clsPrefix + '-bar', {
// [className]: !!className,
});
var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom';
var extraContentStyle = extraContent && extraContent.props ? extraContent.props.style : {};
var newChildren = children;
Expand All @@ -39759,8 +39759,8 @@
className: cls,
tabIndex: '0',
ref: this.props.saveRef('root'),
onKeyDown: onKeyDown,
style: style
onKeyDown: onKeyDown
// style={style}
}, (0, _utils.getDataAttr)(restProps)),
newChildren
);
Expand Down
2 changes: 1 addition & 1 deletion dist/demo.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/TabBarRootNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class TabBarRootNode extends React.Component {
...restProps
} = this.props;
const cls = classnames(`${clsPrefix}-bar`, {
[className]: !!className,
// [className]: !!className,
});
const topOrBottom = (tabBarPosition === 'top' || tabBarPosition === 'bottom');
const extraContentStyle = (extraContent && extraContent.props) ? extraContent.props.style : {};
Expand All @@ -45,7 +45,7 @@ export default class TabBarRootNode extends React.Component {
tabIndex="0"
ref={this.props.saveRef('root')}
onKeyDown={onKeyDown}
style={style}
// style={style}
{...getDataAttr(restProps)}
>
{newChildren}
Expand Down

0 comments on commit 5b1fb7f

Please sign in to comment.