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