fix(bee-table中引用checkbox在safair下无法使用的问题):
This commit is contained in:
parent
7fb14015b4
commit
2fc1fc05fd
|
@ -70,7 +70,7 @@
|
|||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1600;
|
||||
z-index: 1900;
|
||||
opacity: .7;
|
||||
filter: blur(0.5px);
|
||||
background-color: #fff; }
|
||||
|
|
|
@ -656,7 +656,8 @@ var Table = function (_Component) {
|
|||
var headStyle = {};
|
||||
|
||||
var tableClassName = '';
|
||||
if (scroll.x || fixed) {
|
||||
//表格元素的宽度大于容器的宽度也显示滚动条
|
||||
if (scroll.x || fixed || this.contentDomWidth < this.contentWidth) {
|
||||
tableClassName = clsPrefix + '-fixed';
|
||||
if (!footerScroll) {
|
||||
bodyStyle.overflowX = bodyStyle.overflowX || 'auto';
|
||||
|
@ -703,7 +704,7 @@ var Table = function (_Component) {
|
|||
var _drag_class = _this3.props.dragborder ? "table-drag-bordered" : "";
|
||||
return _react2["default"].createElement(
|
||||
'table',
|
||||
{ className: ' ' + tableClassName + ' table table-bordered ' + _drag_class + ' ', style: tableStyle },
|
||||
{ className: ' ' + tableClassName + ' table-bordered ' + _drag_class + ' ', style: tableStyle },
|
||||
_this3.props.dragborder ? null : _this3.getColGroup(columns, fixed),
|
||||
hasHead ? _this3.getHeader(columns, fixed) : null,
|
||||
tableBody
|
||||
|
|
|
@ -105,8 +105,9 @@ var TableHeader = function (_Component) {
|
|||
return da.key == data.key;
|
||||
});
|
||||
_this.drag.width = _this.drag.data[_this.drag.currIndex].width;
|
||||
var contentTableDom = document.getElementById("u-table-drag-thead-" + _this.theadKey).parentNode;
|
||||
|
||||
_this.contentTableWidth = contentTable.width;
|
||||
_this.contentTableWidth = contentTableDom.style.width ? parseInt(contentTableDom.style.width) : parseInt(contentTableDom.scrollWidth);
|
||||
};
|
||||
|
||||
_this.onMouseUp = function (event, data) {
|
||||
|
@ -127,10 +128,14 @@ var TableHeader = function (_Component) {
|
|||
contentTable = _this$props2.contentTable;
|
||||
|
||||
var x = event.pageX - _this.drag.initPageLeftX + _this.drag.initLeft - 0;
|
||||
var contentTableDom = document.getElementById("u-table-drag-thead-" + _this.theadKey).parentNode;
|
||||
|
||||
if (!_this.contentTableWidth) {
|
||||
_this.contentTableWidth = contentTable.clientWidth;
|
||||
_this.contentTableWidth = contentTableDom.style.width ? parseInt(contentTableDom.style.width) : parseInt(contentTableDom.scrollWidth);
|
||||
}
|
||||
// console.log(this.contentTableWidth,x);
|
||||
var newTableWidth = _this.contentTableWidth + x;
|
||||
// console.log(newTableWidth);
|
||||
var newWidth = _this.drag.width + x;
|
||||
if (newWidth < _this.props.minColumnWidth) {
|
||||
//清楚样式
|
||||
|
@ -164,8 +169,9 @@ var TableHeader = function (_Component) {
|
|||
var currentDom = document.getElementById("u-table-drag-thead-" + _this.theadKey).getElementsByTagName("th")[_this.drag.currIndex];
|
||||
currentDom.style.width = newWidth + "px";
|
||||
// this.contentTableWidth = newTableWidth;
|
||||
var contentTableDom = document.getElementById("u-table-drag-thead-" + _this.theadKey).parentNode;
|
||||
|
||||
contentTableDom.style.width = newTableWidth + 'px';
|
||||
|
||||
_this.drag.x = x;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
Loading…
Reference in New Issue