feat:
This commit is contained in:
parent
83fed7b012
commit
9726e462b7
|
@ -248,6 +248,10 @@ var Table = function (_Component) {
|
||||||
if (this.columnManager.isAnyColumnsFixed()) {
|
if (this.columnManager.isAnyColumnsFixed()) {
|
||||||
this.syncFixedTableRowHeight();
|
this.syncFixedTableRowHeight();
|
||||||
}
|
}
|
||||||
|
//如果contentDomWidth为0则需要重新计算,适应模态框中表格;
|
||||||
|
if (this.contentDomWidth == 0) {
|
||||||
|
this.computeTableWidth();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
Table.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||||
|
@ -438,7 +442,9 @@ var Table = function (_Component) {
|
||||||
dataindex: column.dataIndex,
|
dataindex: column.dataIndex,
|
||||||
datasource: _this2.props.data,
|
datasource: _this2.props.data,
|
||||||
format: column.format,
|
format: column.format,
|
||||||
filterdropdown: column.filterDropdown
|
filterdropdown: column.filterDropdown,
|
||||||
|
filterdropdownauto: column.filterDropdownAuto, //是否自定义数据
|
||||||
|
filterdropdowndata: column.filterDropdownData //自定义数据格式
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -257,7 +257,7 @@ var TableHeader = function (_Component) {
|
||||||
//下拉框选择
|
//下拉框选择
|
||||||
case 'dropdown':
|
case 'dropdown':
|
||||||
var selectDataSource = [];
|
var selectDataSource = [];
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0 && (rows[1][index]['filterdropdownauto'] || 'auto') == 'auto') {
|
||||||
var hash = {};
|
var hash = {};
|
||||||
//处理下拉重复对象组装dropdown
|
//处理下拉重复对象组装dropdown
|
||||||
selectDataSource = Array.from(rows[1][0].datasource, function (x) {
|
selectDataSource = Array.from(rows[1][0].datasource, function (x) {
|
||||||
|
@ -267,6 +267,8 @@ var TableHeader = function (_Component) {
|
||||||
hash[next.key] ? '' : hash[next.key] = true && item.push(next);
|
hash[next.key] ? '' : hash[next.key] = true && item.push(next);
|
||||||
return item;
|
return item;
|
||||||
}, []);
|
}, []);
|
||||||
|
} else {
|
||||||
|
selectDataSource = rows[1][index]['filterdropdowndata'];
|
||||||
}
|
}
|
||||||
return _react2["default"].createElement(_FilterType2["default"], {
|
return _react2["default"].createElement(_FilterType2["default"], {
|
||||||
rendertype: type,
|
rendertype: type,
|
||||||
|
@ -311,7 +313,7 @@ var TableHeader = function (_Component) {
|
||||||
// let a = this.props.rows[0];
|
// let a = this.props.rows[0];
|
||||||
|
|
||||||
};var _row = [];
|
};var _row = [];
|
||||||
_this.props.rows[0].forEach(function (item) {
|
_this.props.rows[0] && _this.props.rows[0].forEach(function (item) {
|
||||||
var newItem = item.key != "checkbox" ? (0, _utils.ObjectAssign)(item) : item;
|
var newItem = item.key != "checkbox" ? (0, _utils.ObjectAssign)(item) : item;
|
||||||
_row.push(newItem);
|
_row.push(newItem);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "1.4.14",
|
"version": "1.4.15",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
|
Loading…
Reference in New Issue