feat(bee-table): multiSelect 未引入 PropTypes 报错bug

This commit is contained in:
liushaozhen 2019-09-03 09:34:11 +08:00
parent 20d514e1f9
commit 240c61cc01
3 changed files with 13 additions and 8 deletions

View File

@ -1,4 +1,4 @@
"use strict"; 'use strict';
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
@ -8,11 +8,15 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
exports["default"] = multiSelect; exports["default"] = multiSelect;
var _react = require("react"); var _react = require('react');
var _react2 = _interopRequireDefault(_react); var _react2 = _interopRequireDefault(_react);
var _util = require("./util"); var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _util = require('./util');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@ -153,7 +157,7 @@ function multiSelect(Table, Checkbox) {
return MultiSelect; return MultiSelect;
}(_react.Component), _class.propTypes = { }(_react.Component), _class.propTypes = {
autoCheckedByClickRows: PropTypes.bool //行点击时,是否自动勾选复选框 autoCheckedByClickRows: _propTypes2["default"].bool //行点击时,是否自动勾选复选框
}, _class.defaultProps = { }, _class.defaultProps = {
prefixCls: "u-table-mult-select", prefixCls: "u-table-mult-select",
getSelectedDataFunc: function getSelectedDataFunc() {}, getSelectedDataFunc: function getSelectedDataFunc() {},
@ -317,7 +321,7 @@ function multiSelect(Table, Checkbox) {
var _defaultColumns = [{ var _defaultColumns = [{
className: 'u-table-multiSelect-column', className: 'u-table-multiSelect-column',
title: _react2["default"].createElement(Checkbox, _extends({ title: _react2["default"].createElement(Checkbox, _extends({
className: "table-checkbox" className: 'table-checkbox'
}, checkAttr, { }, checkAttr, {
disabled: disabledCount == dataLength ? true : false, disabled: disabledCount == dataLength ? true : false,
onChange: _this2.onAllCheckChange onChange: _this2.onAllCheckChange
@ -331,7 +335,7 @@ function multiSelect(Table, Checkbox) {
record._disabled ? attr.disabled = record._disabled : ""; record._disabled ? attr.disabled = record._disabled : "";
return _react2["default"].createElement(Checkbox, _extends({ return _react2["default"].createElement(Checkbox, _extends({
key: index, key: index,
className: "table-checkbox" className: 'table-checkbox'
}, attr, { }, attr, {
checked: record._checked, checked: record._checked,
onClick: _this2.handleClick, onClick: _this2.handleClick,
@ -354,4 +358,4 @@ function multiSelect(Table, Checkbox) {
}; };
}, _temp; }, _temp;
} }
module.exports = exports["default"]; module.exports = exports['default'];

View File

@ -1,6 +1,6 @@
{ {
"name": "bee-table", "name": "bee-table",
"version": "2.2.8", "version": "2.2.9",
"description": "Table ui component for react", "description": "Table ui component for react",
"keywords": [ "keywords": [
"react", "react",

View File

@ -1,4 +1,5 @@
import React, { Component } from "react"; import React, { Component } from "react";
import PropTypes from 'prop-types';
import {ObjectAssign} from './util'; import {ObjectAssign} from './util';
/** /**
* 参数: 过滤表头 * 参数: 过滤表头