还原设置增加回调函数

This commit is contained in:
wanghaoo 2018-11-06 13:49:43 +08:00
parent 4db54a1ba7
commit 2420ce36b0
7 changed files with 28 additions and 57 deletions

View File

@ -232,7 +232,10 @@ function filterColumn(Table, Popover) {
da.checked = true;
da.ifshow = true;
});
_this2.setState(_extends({}, _this2.state));
_this2.setState({
columns: columns
});
_this2.props.afterFilter(_this2.state.columns, _this2.state.columns);
};
this.getCloumnsScroll = function (columns) {

3
dist/demo.css vendored
View File

@ -2420,6 +2420,9 @@ i.uf {
/*
* 选择时删除文本阴影及设置默认选中颜色
*/
::-moz-selection {
background: rgb(187,222,251);
text-shadow: none; }
::selection {
background: rgb(187,222,251);
text-shadow: none; }

2
dist/demo.css.map vendored

File diff suppressed because one or more lines are too long

68
dist/demo.js vendored
View File

@ -7237,7 +7237,7 @@
duration: _propTypes2["default"].number,
onClose: _propTypes2["default"].func,
children: _propTypes2["default"].any,
color: _propTypes2["default"].oneOf(['info', 'success', 'danger', 'warning', 'light', 'dark', 'news', 'infolight', 'successlight', 'dangerlight', 'warninglight']),
color: _propTypes2["default"].oneOf(['light']),
title: _propTypes2["default"].any
};
@ -7336,7 +7336,7 @@
;
Notice.propTypes = propTypes;
Notice.PropTypes = _propTypes2["default"];
Notice.defaultProps = defaultProps;
exports["default"] = Notice;
@ -58629,18 +58629,18 @@
}
};
Popconfirm.prototype.handleClose = function handleClose(e) {
Popconfirm.prototype.handleClose = function handleClose() {
var onClose = this.props.onClose;
this.hide();
onClose && onClose(e);
onClose && onClose();
};
Popconfirm.prototype.handleCancel = function handleCancel(e) {
Popconfirm.prototype.handleCancel = function handleCancel() {
var onCancel = this.props.onCancel;
this.hide();
onCancel && onCancel(e);
onCancel && onCancel();
};
Popconfirm.prototype.handleHide = function handleHide() {
@ -58676,8 +58676,7 @@
content = _props.content,
children = _props.children,
onClick = _props.onClick,
stopbubble = _props.stopbubble,
props = _objectWithoutProperties(_props, ['content', 'children', 'onClick', 'stopbubble']);
props = _objectWithoutProperties(_props, ['content', 'children', 'onClick']);
delete props.defaultOverlayShown;
@ -58694,7 +58693,6 @@
_extends({}, confirmProps, {
onClose: this.handleClose,
onCancel: this.handleCancel,
stopbubble: stopbubble,
placement: props.placement }),
content
);
@ -58809,11 +58807,6 @@
*/
arrowOffsetLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
/**
* 阻止冒泡
*/
stopbubble: _propTypes2["default"].number,
/**
* Title content
*/
@ -58824,7 +58817,6 @@
};
var defaultProps = {
stopbubble: 0,
placement: 'right',
clsPrefix: 'u-popconfirm',
locale: {}
@ -58836,27 +58828,7 @@
function Confirm(props) {
_classCallCheck(this, Confirm);
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
_this.cancel = function (e) {
var _this$props = _this.props,
stopbubble = _this$props.stopbubble,
onCancel = _this$props.onCancel;
stopbubble && e.stopPropagation();
onCancel(e);
};
_this.close = function (e) {
var _this$props2 = _this.props,
stopbubble = _this$props2.stopbubble,
onClose = _this$props2.onClose;
stopbubble && e.stopPropagation();
onClose(e);
};
return _this;
return _possibleConstructorReturn(this, _React$Component.call(this, props));
}
Confirm.prototype.render = function render() {
@ -58878,8 +58850,7 @@
onClose = _props.onClose,
color = _props.color,
onCancel = _props.onCancel,
stopbubble = _props.stopbubble,
props = _objectWithoutProperties(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'clsPrefix', 'trigger', 'title', 'className', 'style', 'children', 'locale', 'onClose', 'color', 'onCancel', 'stopbubble']);
props = _objectWithoutProperties(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'clsPrefix', 'trigger', 'title', 'className', 'style', 'children', 'locale', 'onClose', 'color', 'onCancel']);
var local = (0, _tool.getComponentLocale)(this.props, this.context, 'Popconfirm', function () {
return _i18n2["default"];
@ -58905,10 +58876,7 @@
_extends({}, props, {
role: 'tooltip',
className: (0, _classnames2["default"])(className, classes),
style: outerStyle,
onClick: function onClick(e) {
return stopbubble && e.stopPropagation();
}
style: outerStyle
}),
_react2["default"].createElement('div', { className: 'arrow', style: arrowStyle }),
_react2["default"].createElement(
@ -58921,13 +58889,13 @@
{ className: (0, _classnames2["default"])(clsPrefix + '-confirm') },
_react2["default"].createElement(
_beeButton2["default"],
{ onClick: this.cancel, size: 'sm', style: { minWidth: 50 },
{ onClick: onCancel, size: 'sm', style: { minWidth: 50 },
shape: 'border' },
local['cancel']
),
_react2["default"].createElement(
_beeButton2["default"],
{ onClick: this.close, size: 'sm', style: { minWidth: 50 }, colors: 'primary' },
{ onClick: onClose, size: 'sm', style: { minWidth: 50 }, colors: 'primary' },
local['ok']
)
)
@ -59451,7 +59419,10 @@
da.checked = true;
da.ifshow = true;
});
_this2.setState(_extends({}, _this2.state));
_this2.setState({
columns: columns
});
afterFilter(_this2.state.columns, _this2.state.columns);
};
this.getCloumnsScroll = function (columns) {
@ -63041,13 +63012,6 @@
'show': 'page',
'goto': 'goto',
'ok': 'ok'
},
'zh-tw': {
'total': '共',
'items': '條',
'show': '顯示',
'goto': '跳至',
'ok': '確認'
}
};

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -105,8 +105,9 @@ export default function filterColumn(Table,Popover) {
da.ifshow = true;
});
this.setState({
...this.state
columns
})
this.props.afterFilter(this.state.columns,this.state.columns);
}
getCloumnsScroll=(columns)=>{