feat(table.js && table.scss): 修改固定表头的滚动条默认样式为auto
This commit is contained in:
parent
d02af6c829
commit
e8bc09f6ab
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
module.exports = exports["default"];
|
|
@ -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"];
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue