linkmore-design 1.0.88 → 1.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LmEditTable/EditTable.d.ts +1 -0
- package/dist/index.umd.js +20 -11
- package/dist/index.umd.min.js +1 -1
- package/es/LmEditTable/EditTable.d.ts +1 -0
- package/es/LmEditTable/EditTable.js +19 -10
- package/lib/LmEditTable/EditTable.d.ts +1 -0
- package/lib/LmEditTable/EditTable.js +18 -10
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -360311,7 +360311,7 @@
|
|
|
360311
360311
|
|
|
360312
360312
|
var _excluded$2K = ["index"],
|
|
360313
360313
|
_excluded2$I = ["index"],
|
|
360314
|
-
_excluded3$b = ["value", "onChange"],
|
|
360314
|
+
_excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex"],
|
|
360315
360315
|
_excluded4$1 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"],
|
|
360316
360316
|
_excluded5 = ["onMouseEnter", "onMouseLeave"],
|
|
360317
360317
|
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "sortOpen", "colSortOpen", "filterChange", "size", "recordCreatorProps", "shouldUpdate"];
|
|
@@ -360388,14 +360388,17 @@
|
|
|
360388
360388
|
var _ref3$value = _ref3.value,
|
|
360389
360389
|
value = _ref3$value === void 0 ? ['', ''] : _ref3$value,
|
|
360390
360390
|
onChange = _ref3.onChange,
|
|
360391
|
+
record = _ref3.record,
|
|
360392
|
+
rowIndex = _ref3.rowIndex,
|
|
360393
|
+
colIndex = _ref3.colIndex,
|
|
360391
360394
|
editEnum = _objectWithoutProperties$1(_ref3, _excluded3$b);
|
|
360392
360395
|
|
|
360393
360396
|
// 输入值改变
|
|
360394
|
-
var nValue = _toConsumableArray$1(value);
|
|
360395
|
-
|
|
360396
360397
|
var handleInput = function handleInput(e, type) {
|
|
360397
360398
|
var v = e.target.value;
|
|
360398
360399
|
|
|
360400
|
+
var nValue = _toConsumableArray$1(value);
|
|
360401
|
+
|
|
360399
360402
|
if (type === 'prev') {
|
|
360400
360403
|
nValue[0] = v;
|
|
360401
360404
|
}
|
|
@@ -360403,10 +360406,14 @@
|
|
|
360403
360406
|
if (type === 'next') {
|
|
360404
360407
|
nValue[1] = v;
|
|
360405
360408
|
}
|
|
360406
|
-
};
|
|
360407
360409
|
|
|
360408
|
-
|
|
360409
|
-
|
|
360410
|
+
if (lodash.isFunction(editEnum.validator)) {
|
|
360411
|
+
if (editEnum.validator(record, nValue, rowIndex, colIndex)) {
|
|
360412
|
+
onChange(nValue);
|
|
360413
|
+
}
|
|
360414
|
+
} else {
|
|
360415
|
+
onChange(nValue);
|
|
360416
|
+
}
|
|
360410
360417
|
};
|
|
360411
360418
|
|
|
360412
360419
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -360416,14 +360423,12 @@
|
|
|
360416
360423
|
}, /*#__PURE__*/React__default['default'].createElement(LmInput, _objectSpread({
|
|
360417
360424
|
value: value === null || value === void 0 ? void 0 : value[0],
|
|
360418
360425
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
360419
|
-
onBlur: handleBlur,
|
|
360420
360426
|
onChange: function onChange(e) {
|
|
360421
360427
|
return handleInput(e, 'prev');
|
|
360422
360428
|
}
|
|
360423
360429
|
}, editEnum)), "~", /*#__PURE__*/React__default['default'].createElement(LmInput, _objectSpread({
|
|
360424
360430
|
value: value === null || value === void 0 ? void 0 : value[1],
|
|
360425
360431
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
360426
|
-
onBlur: handleBlur,
|
|
360427
360432
|
onChange: function onChange(e) {
|
|
360428
360433
|
return handleInput(e, 'next');
|
|
360429
360434
|
}
|
|
@@ -360672,10 +360677,14 @@
|
|
|
360672
360677
|
}));
|
|
360673
360678
|
|
|
360674
360679
|
case 'inputRange':
|
|
360675
|
-
return /*#__PURE__*/React__default['default'].createElement(InputRange$1, _objectSpread({
|
|
360680
|
+
return /*#__PURE__*/React__default['default'].createElement(InputRange$1, _objectSpread(_objectSpread({
|
|
360676
360681
|
onChange: handleFormItemChange,
|
|
360677
360682
|
ref: inputRef
|
|
360678
|
-
}, resultComponentProps)
|
|
360683
|
+
}, resultComponentProps), {}, {
|
|
360684
|
+
record: record,
|
|
360685
|
+
rowIndex: rowIndex,
|
|
360686
|
+
colIndex: colIndex
|
|
360687
|
+
}));
|
|
360679
360688
|
|
|
360680
360689
|
case 'number':
|
|
360681
360690
|
return /*#__PURE__*/React__default['default'].createElement(CInputNumber, _objectSpread({
|
|
@@ -361397,7 +361406,7 @@
|
|
|
361397
361406
|
})), isShowAddAction && /*#__PURE__*/React__default['default'].createElement(LMButton, {
|
|
361398
361407
|
className: "lm_editTable_add_bar",
|
|
361399
361408
|
type: "dashed",
|
|
361400
|
-
onClick: handleAdd,
|
|
361409
|
+
onClick: (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.customAddClick) || handleAdd,
|
|
361401
361410
|
style: _objectSpread({
|
|
361402
361411
|
marginTop: 8
|
|
361403
361412
|
}, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
|