diff --git a/build/Table.css b/build/Table.css index 3b2d165..bbef689 100644 --- a/build/Table.css +++ b/build/Table.css @@ -24,7 +24,8 @@ .u-table tr.tr-row-hover { background: rgb(227,242,253); } .u-table th, .u-table td { - padding: 16px 8px; } + padding: 16px 8px; + word-break: break-all; } .u-table-scroll { overflow: auto; } .u-table-header { @@ -40,7 +41,7 @@ overflow-x: scroll; padding-bottom: 20px; margin-bottom: -20px; - overflow-y: scroll; + overflow-y: auto; box-sizing: border-box; } .u-table-title { padding: 16px 8px; diff --git a/build/Table.js b/build/Table.js index cc91fcc..9d43832 100644 --- a/build/Table.js +++ b/build/Table.js @@ -539,7 +539,7 @@ var Table = function (_Component) { } else { bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; } - bodyStyle.overflowY = bodyStyle.overflowY || 'scroll'; + bodyStyle.overflowY = bodyStyle.overflowY || 'auto'; useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug diff --git a/build/lib/multiSelect.js b/build/lib/multiSelect.js index 533a2e9..df7b4ee 100644 --- a/build/lib/multiSelect.js +++ b/build/lib/multiSelect.js @@ -1,7 +1,13 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +exports["default"] = multiSelect; + var _react = require("react"); var _react2 = _interopRequireDefault(_react); @@ -28,7 +34,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" * getSelectedDataFunc--function,能获取到选中的数据 * 使用全选时得注意,data中的key值一定要是唯一值 */ -module.exports = function multiSelect(Table) { +function multiSelect(Table) { Array.prototype.indexOf = function (val) { for (var i = 0; i < this.length; i++) { if (this[i] == val) return i; @@ -106,7 +112,7 @@ module.exports = function multiSelect(Table) { checkedObj: checkedObj, selIds: selIds }); - if (typeof getSelectedDataFunc === 'function') { + if (typeof getSelectedDataFunc === "function") { getSelectedDataFunc(selIds); } }; @@ -172,4 +178,5 @@ module.exports = function multiSelect(Table) { return BookLoader; }(_react.Component); -}; \ No newline at end of file +} +module.exports = exports["default"]; \ No newline at end of file diff --git a/build/lib/sort.js b/build/lib/sort.js index 31a9cb0..d2b172b 100644 --- a/build/lib/sort.js +++ b/build/lib/sort.js @@ -28,7 +28,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function" /** * 参数:prefixCls,默认bee-table,用于设置图标的样式 - * @param {*} Table + * @param {*} Table */ function sort(Table) { return function (_Component) { diff --git a/build/lib/sum.js b/build/lib/sum.js index e0fc0a4..b983173 100644 --- a/build/lib/sum.js +++ b/build/lib/sum.js @@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +exports["default"] = sum; + var _react = require("react"); var _react2 = _interopRequireDefault(_react); @@ -29,7 +31,7 @@ var columns2 = { dataIndex: "showSum" }; -var sum = function sum(Table) { +function sum(Table) { return function (_React$Component) { _inherits(SumTable, _React$Component); @@ -96,6 +98,4 @@ var sum = function sum(Table) { return SumTable; }(_react2["default"].Component); }; - -exports["default"] = sum; module.exports = exports["default"]; \ No newline at end of file diff --git a/package.json b/package.json index 5540bb2..7db9a87 100644 --- a/package.json +++ b/package.json @@ -1,75 +1,75 @@ { - "name": "bee-table", - "version": "1.0.5", - "description": "Table ui component for react", - "keywords": [ - "react", - "react-component", - "bee-table", - "iuap-design", - "tinper-bee", - "Table" - ], - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/tinper-bee/bee-table.git", - "author": "Yonyou FED", - "repository": "http://github.com/tinper-bee/bee-table", - "bugs": "https://github.com/tinper-bee/bee-table.git/issues", - "license": "MIT", - "main": "./build/index.js", - "config": { - "port": 3000, - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } - }, - "scripts": { - "dev": "bee-tools run start", - "build": "bee-tools run build", - "lint": "bee-tools run lint", - "test": "bee-tools run test", - "chrome": "bee-tools run chrome", - "coveralls": "bee-tools run coverage", - "browsers": "bee-tools run browsers", - "pub": "bee-tools run pub", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" - }, - "dependencies": { - "classnames": "^2.2.5", - "object-path": "^0.11.3", - "tinper-bee-core": "latest", - "warning": "^3.0.0" - }, - "peerDependencies": { - "react": "^15.3.0 || ^16.0", - "react-dom": "^15.3.0 || ^16.0", - "prop-types": "15.6.0" - }, - "devDependencies": { - "bee-animate": "latest", - "bee-button": "latest", - "bee-checkbox": "latest", - "bee-datepicker": "latest", - "bee-form": "^1.0.8", - "bee-form-control": "latest", - "bee-icon": "latest", - "bee-input-group": "latest", - "bee-layout": "latest", - "bee-pagination": "latest", - "bee-panel": "latest", - "bee-popconfirm": "^1.0.1", - "bee-select": "latest", - "bee-tools": "latest", - "bee-tooltip": "^1.0.2", - "chai": "^3.5.0", - "console-polyfill": "~0.2.1", - "cz-conventional-changelog": "^2.1.0", - "enzyme": "^2.4.1", - "es5-shim": "~4.1.10", - "react": "^15.5.0", - "react-addons-test-utils": "^15.5.0", - "react-dom": "^15.5.0" + "name": "bee-table", + "version": "1.0.6", + "description": "Table ui component for react", + "keywords": [ + "react", + "react-component", + "bee-table", + "iuap-design", + "tinper-bee", + "Table" + ], + "engines": { + "node": ">=4.0.0" + }, + "homepage": "https://github.com/tinper-bee/bee-table.git", + "author": "Yonyou FED", + "repository": "http://github.com/tinper-bee/bee-table", + "bugs": "https://github.com/tinper-bee/bee-table.git/issues", + "license": "MIT", + "main": "./build/index.js", + "config": { + "port": 3000, + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" } -} + }, + "scripts": { + "dev": "bee-tools run start", + "build": "bee-tools run build", + "lint": "bee-tools run lint", + "test": "bee-tools run test", + "chrome": "bee-tools run chrome", + "coveralls": "bee-tools run coverage", + "browsers": "bee-tools run browsers", + "pub": "bee-tools run pub", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" + }, + "dependencies": { + "classnames": "^2.2.5", + "object-path": "^0.11.3", + "tinper-bee-core": "latest", + "warning": "^3.0.0" + }, + "peerDependencies": { + "react": "^15.3.0 || ^16.0", + "react-dom": "^15.3.0 || ^16.0", + "prop-types": "15.6.0" + }, + "devDependencies": { + "bee-animate": "latest", + "bee-button": "latest", + "bee-checkbox": "latest", + "bee-datepicker": "latest", + "bee-form": "^1.0.8", + "bee-form-control": "latest", + "bee-icon": "latest", + "bee-input-group": "latest", + "bee-layout": "latest", + "bee-pagination": "latest", + "bee-panel": "latest", + "bee-popconfirm": "^1.0.1", + "bee-select": "latest", + "bee-tools": "latest", + "bee-tooltip": "^1.0.2", + "chai": "^3.5.0", + "console-polyfill": "~0.2.1", + "cz-conventional-changelog": "^2.1.0", + "enzyme": "^2.4.1", + "es5-shim": "~4.1.10", + "react": "^15.5.0", + "react-addons-test-utils": "^15.5.0", + "react-dom": "^15.5.0" + } +} \ No newline at end of file diff --git a/src/Table.js b/src/Table.js index efdbc92..d670e05 100644 --- a/src/Table.js +++ b/src/Table.js @@ -465,7 +465,7 @@ class Table extends Component{ } else { bodyStyle.maxHeight = bodyStyle.maxHeight || scroll.y; } - bodyStyle.overflowY = bodyStyle.overflowY || 'scroll'; + bodyStyle.overflowY = bodyStyle.overflowY || 'auto'; useFixedHeader = true; // Add negative margin bottom for scroll bar overflow bug diff --git a/src/Table.scss b/src/Table.scss index 20fb620..1538a7d 100644 --- a/src/Table.scss +++ b/src/Table.scss @@ -80,7 +80,7 @@ $table-move-in-color: $bg-color-base; overflow-x: scroll; padding-bottom: 20px; margin-bottom: -20px; - overflow-y: scroll; + overflow-y: auto; box-sizing: border-box; }