linkmore-design 1.1.13-alpha.7 → 1.1.13-alpha.9
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/index.umd.js +19 -12
- package/dist/index.umd.min.js +1 -1
- package/es/LmEditTable/EditTable.js +9 -3
- package/es/LmEditTable/util.js +10 -10
- package/lib/LmEditTable/EditTable.js +9 -3
- package/lib/LmEditTable/util.js +10 -10
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -313048,7 +313048,7 @@
|
|
|
313048
313048
|
return isExpandRow(children) ? children === null || children === void 0 ? void 0 : (_children$2 = children[0]) === null || _children$2 === void 0 ? void 0 : (_children$2$props = _children$2.props) === null || _children$2$props === void 0 ? void 0 : (_children$2$props$chi = _children$2$props.children) === null || _children$2$props$chi === void 0 ? void 0 : (_children$2$props$chi2 = _children$2$props$chi[1]) === null || _children$2$props$chi2 === void 0 ? void 0 : (_children$2$props$chi3 = _children$2$props$chi2.props) === null || _children$2$props$chi3 === void 0 ? void 0 : _children$2$props$chi3['aria-label'] : '';
|
|
313049
313049
|
}
|
|
313050
313050
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
313051
|
-
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4, _prevCol$componentPro5, _nextCol$componentPro5, _prevCol$componentPro6, _nextCol$componentPro6
|
|
313051
|
+
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4, _prevCol$componentPro5, _nextCol$componentPro5, _prevCol$componentPro6, _nextCol$componentPro6;
|
|
313052
313052
|
|
|
313053
313053
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
313054
313054
|
|
|
@@ -313062,14 +313062,14 @@
|
|
|
313062
313062
|
|
|
313063
313063
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'children']), lodash.pick(next, ['colIndex', 'record', 'children']))) {
|
|
313064
313064
|
return false;
|
|
313065
|
-
}
|
|
313066
|
-
|
|
313065
|
+
}
|
|
313067
313066
|
|
|
313068
|
-
if (
|
|
313067
|
+
if (prev.isEdit !== next.isEdit) {
|
|
313069
313068
|
return false;
|
|
313070
|
-
}
|
|
313069
|
+
} // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
|
|
313071
313070
|
|
|
313072
|
-
|
|
313071
|
+
|
|
313072
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.render) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.render)) && (!lodash.isEqual(lodash.omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), lodash.omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render'])) || !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'rowIndex']), lodash.pick(next, ['colIndex', 'record', 'rowIndex'])))) {
|
|
313073
313073
|
return false;
|
|
313074
313074
|
}
|
|
313075
313075
|
|
|
@@ -313077,11 +313077,11 @@
|
|
|
313077
313077
|
return false;
|
|
313078
313078
|
}
|
|
313079
313079
|
|
|
313080
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313080
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.optionOnly)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.options)) {
|
|
313081
313081
|
return false;
|
|
313082
313082
|
}
|
|
313083
313083
|
|
|
313084
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313084
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro4 = prevCol.componentProps) === null || _prevCol$componentPro4 === void 0 ? void 0 : _prevCol$componentPro4.options) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro4 = nextCol.componentProps) === null || _nextCol$componentPro4 === void 0 ? void 0 : _nextCol$componentPro4.options)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro5 = prevCol.componentProps) === null || _prevCol$componentPro5 === void 0 ? void 0 : _prevCol$componentPro5.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro5 = nextCol.componentProps) === null || _nextCol$componentPro5 === void 0 ? void 0 : _nextCol$componentPro5.options)) {
|
|
313085
313085
|
return false;
|
|
313086
313086
|
}
|
|
313087
313087
|
|
|
@@ -313106,7 +313106,7 @@
|
|
|
313106
313106
|
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
313107
313107
|
|
|
313108
313108
|
|
|
313109
|
-
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313109
|
+
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro6 = prevCol.componentProps) === null || _prevCol$componentPro6 === void 0 ? void 0 : _prevCol$componentPro6.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro6 = nextCol.componentProps) === null || _nextCol$componentPro6 === void 0 ? void 0 : _nextCol$componentPro6.quickcopy)) {
|
|
313110
313110
|
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
313111
313111
|
var p = lodash.pick(prev, pickProps);
|
|
313112
313112
|
var n = lodash.pick(next, pickProps);
|
|
@@ -313745,7 +313745,7 @@
|
|
|
313745
313745
|
}
|
|
313746
313746
|
|
|
313747
313747
|
return childNode;
|
|
313748
|
-
}, [col, isEdit, editing, getLength]); // 出现死循环找我
|
|
313748
|
+
}, [col, isEdit, editing, getLength, record]); // 出现死循环找我
|
|
313749
313749
|
|
|
313750
313750
|
React.useEffect(function () {
|
|
313751
313751
|
var editable = col.editable,
|
|
@@ -313791,10 +313791,15 @@
|
|
|
313791
313791
|
var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
|
|
313792
313792
|
var pickProps = ['record', 'colIndex'];
|
|
313793
313793
|
var p = lodash.pick(prev, pickProps);
|
|
313794
|
-
var n = lodash.pick(next, pickProps);
|
|
313794
|
+
var n = lodash.pick(next, pickProps);
|
|
313795
|
+
|
|
313796
|
+
if (next === null || next === void 0 ? void 0 : next.shouldUpdate) {
|
|
313797
|
+
return false;
|
|
313798
|
+
} // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313795
313799
|
|
|
313796
313800
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313797
313801
|
|
|
313802
|
+
|
|
313798
313803
|
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
313799
313804
|
return false;
|
|
313800
313805
|
}
|
|
@@ -313829,6 +313834,7 @@
|
|
|
313829
313834
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
313830
313835
|
recordCreatorProps = props.recordCreatorProps,
|
|
313831
313836
|
_props$shouldUpdate = props.shouldUpdate,
|
|
313837
|
+
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
313832
313838
|
resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
|
|
313833
313839
|
|
|
313834
313840
|
|
|
@@ -314254,7 +314260,7 @@
|
|
|
314254
314260
|
fixed: 'left',
|
|
314255
314261
|
render: function render(_, record) {
|
|
314256
314262
|
return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
|
|
314257
|
-
id: record[_rowKey] || (record === null || record === void 0 ? void 0 : record.id)
|
|
314263
|
+
id: (record === null || record === void 0 ? void 0 : record[_rowKey]) || (record === null || record === void 0 ? void 0 : record.id)
|
|
314258
314264
|
});
|
|
314259
314265
|
}
|
|
314260
314266
|
} : null, indexCol ? lodash.isBoolean(indexCol) ? {
|
|
@@ -314339,6 +314345,7 @@
|
|
|
314339
314345
|
editable: col.editable,
|
|
314340
314346
|
dataIndex: col.dataIndex,
|
|
314341
314347
|
itemProps: col.itemProps,
|
|
314348
|
+
shouldUpdate: shouldUpdate,
|
|
314342
314349
|
setValid: setValid,
|
|
314343
314350
|
isEdit: isEdit,
|
|
314344
314351
|
isHoverEdit: isHoverEdit,
|