linkmore-design 1.1.13-alpha.6 → 1.1.13-alpha.7

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/LmEditTable/EditTable.d.ts +1 -1
  3. package/dist/index.umd.js +83 -37
  4. package/dist/index.umd.min.js +2 -2
  5. package/dist/variables.css +29 -9
  6. package/es/LmEditTable/EditTable.d.ts +1 -1
  7. package/es/LmEditTable/EditTable.js +36 -16
  8. package/es/LmEditTable/style/index.css +6 -0
  9. package/es/LmEditTable/style/variables.css +6 -0
  10. package/es/LmEditTable/util.js +12 -7
  11. package/es/LmFilter/style/index.css +6 -9
  12. package/es/LmFilter/style/variables.css +6 -9
  13. package/es/LmTable/Table.js +14 -8
  14. package/es/LmUpload/UploadList/ItemPicture.js +2 -1
  15. package/es/LmUpload/UploadList/ItemPictureCard.js +11 -2
  16. package/es/LmUpload/UploadList/ItemText.js +2 -1
  17. package/es/LmUpload/UploadList/index.js +2 -1
  18. package/es/LmUpload/body/UploadCore.js +4 -1
  19. package/es/LmUpload/style/index.css +17 -0
  20. package/es/LmUpload/style/variables.css +17 -0
  21. package/es/TreeSelect/index.js +2 -1
  22. package/es/styles/variables.css +29 -9
  23. package/lib/LmEditTable/EditTable.d.ts +1 -1
  24. package/lib/LmEditTable/EditTable.js +35 -15
  25. package/lib/LmEditTable/style/index.css +6 -0
  26. package/lib/LmEditTable/style/variables.css +6 -0
  27. package/lib/LmEditTable/util.js +11 -6
  28. package/lib/LmFilter/style/index.css +6 -9
  29. package/lib/LmFilter/style/variables.css +6 -9
  30. package/lib/LmTable/Table.js +14 -8
  31. package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
  32. package/lib/LmUpload/UploadList/ItemPictureCard.js +11 -2
  33. package/lib/LmUpload/UploadList/ItemText.js +2 -1
  34. package/lib/LmUpload/UploadList/index.js +2 -1
  35. package/lib/LmUpload/body/UploadCore.js +5 -1
  36. package/lib/LmUpload/style/index.css +17 -0
  37. package/lib/LmUpload/style/variables.css +17 -0
  38. package/lib/TreeSelect/index.js +2 -1
  39. package/lib/styles/variables.css +29 -9
  40. package/package.json +1 -1
@@ -9813,6 +9813,12 @@ p {
9813
9813
  padding-left: 8px;
9814
9814
  padding-right: 8px;
9815
9815
  }
9816
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
9817
+ background-color: rgba(0, 0, 0, 0.06) !important;
9818
+ }
9819
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
9820
+ background-color: rgba(0, 0, 0, 0.06) !important;
9821
+ }
9816
9822
  .lm_editTable_warpper .ant-picker {
9817
9823
  height: 24px !important;
9818
9824
  padding: 2px 8px;
@@ -9968,15 +9974,6 @@ p {
9968
9974
  }
9969
9975
  .lm_filter_basic_item .filter_item_icon .icon_clear {
9970
9976
  display: none;
9971
- opacity: 0;
9972
- }
9973
- .lm_filter_basic_item .filter_item_icon:hover .icon_down {
9974
- display: none;
9975
- opacity: 0;
9976
- }
9977
- .lm_filter_basic_item .filter_item_icon:hover .icon_clear {
9978
- display: inline-block;
9979
- opacity: 1;
9980
9977
  }
9981
9978
  .lm_filter_basic_item.expand .filter_item_icon.addon_after {
9982
9979
  transform: rotateX(180deg);
@@ -9991,6 +9988,12 @@ p {
9991
9988
  .lm_filter_basic_item.active.lm_filter_complex_item .filter_item_label {
9992
9989
  color: var(--primary-color);
9993
9990
  }
9991
+ .lm_filter_basic_item.active:hover .icon_down {
9992
+ display: none;
9993
+ }
9994
+ .lm_filter_basic_item.active:hover .icon_clear {
9995
+ display: inline-block;
9996
+ }
9994
9997
  .ant-dropdown.filter_dropdown_container_cascader > div {
9995
9998
  transform: translateY(-4px);
9996
9999
  }
@@ -11909,6 +11912,7 @@ button.ant-table-row-expand-icon::after {
11909
11912
  gap: 8px;
11910
11913
  }
11911
11914
  .lm_upload_wrapper .lm_upload_core {
11915
+ position: relative;
11912
11916
  display: inline-flex;
11913
11917
  vertical-align: middle;
11914
11918
  }
@@ -11923,6 +11927,12 @@ button.ant-table-row-expand-icon::after {
11923
11927
  cursor: pointer;
11924
11928
  transition: all 0.3s;
11925
11929
  }
11930
+ .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture::after {
11931
+ position: absolute;
11932
+ background-color: var(--disabled-bg-color);
11933
+ cursor: not-allowed;
11934
+ inset: 0;
11935
+ }
11926
11936
  .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture:hover {
11927
11937
  border-color: var(--primary-color);
11928
11938
  }
@@ -11938,6 +11948,16 @@ button.ant-table-row-expand-icon::after {
11938
11948
  margin-top: var(--gap);
11939
11949
  color: var(--color-45);
11940
11950
  }
11951
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture {
11952
+ border-color: var(--disabled-border-color);
11953
+ }
11954
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture::after {
11955
+ content: '';
11956
+ }
11957
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .action_plus,
11958
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .tip {
11959
+ color: var(--disabled-font-color);
11960
+ }
11941
11961
  .lm_upload_wrapper .lm_upload_progress {
11942
11962
  width: 100%;
11943
11963
  height: 2px;
@@ -33,7 +33,7 @@ export interface CountdownHandle {
33
33
  clearSelect: () => void;
34
34
  customSetCheckboxRecords: (data: any[]) => void;
35
35
  deleteRowData: (record: string | Record<string, any>) => void;
36
- addRowData: (record: string | Record<string, any>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean) => void;
36
+ addRowData: (record: string | Record<string, any>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean | 'replace') => void;
37
37
  valid: () => void;
38
38
  }
39
39
  interface ILmColumns extends TableColumnType<any> {
@@ -673,7 +673,8 @@ var EditableCell = function EditableCell(props) {
673
673
  valuePropName: editable === 'switch' ? 'checked' : 'value',
674
674
  style: {
675
675
  margin: 0
676
- }
676
+ },
677
+ noStyle: formProps ? false : true
677
678
  }, formProps, {
678
679
  name: dataIndex
679
680
  }), Control(editable)));
@@ -685,6 +686,7 @@ var EditableCell = function EditableCell(props) {
685
686
  margin: 0
686
687
  }
687
688
  }, formProps, {
689
+ noStyle: formProps ? false : true,
688
690
  name: [dataIndex, 'value']
689
691
  }), Control(editable)));
690
692
  }
@@ -741,8 +743,7 @@ var EditableCell = function EditableCell(props) {
741
743
  var MemoEditableCell = /*#__PURE__*/(0, _react.memo)(EditableCell, function (prev, next) {
742
744
  var pickProps = ['record', 'colIndex'];
743
745
  var p = (0, _lodash.pick)(prev, pickProps);
744
- var n = (0, _lodash.pick)(next, pickProps);
745
- console.log(prev, next, 222); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
746
+ var n = (0, _lodash.pick)(next, pickProps); // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
746
747
 
747
748
  /** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
748
749
 
@@ -856,7 +857,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
856
857
  /** 点击添加按钮添加 */
857
858
 
858
859
 
859
- var handleAdd = function handleAdd(row) {
860
+ var handleAdd = (0, _lodash.debounce)(function (row) {
860
861
  var _a;
861
862
 
862
863
  var addDataInfo = (0, _lodash.isFunction)(recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) ? (_a = recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) === null || _a === void 0 ? void 0 : _a.call(recordCreatorProps) : recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData;
@@ -864,7 +865,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
864
865
  draft.push(Object.assign((0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
865
866
  });
866
867
  setDataSource(res); // onChange?.(res)
867
- };
868
+ }, 40);
868
869
  /** 本地缓存一个选择数据 */
869
870
  // useEffect(() => {
870
871
  // if (rowSelection) {
@@ -879,7 +880,6 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
879
880
  // ;(rowSelection?.onChange as any)?.(selectRows)
880
881
  // }
881
882
 
882
-
883
883
  var handleSave = function handleSave(row, options) {
884
884
  var _a, _b;
885
885
 
@@ -966,7 +966,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
966
966
  }; // @ts-ignore
967
967
 
968
968
 
969
- var handleTableRowDelete = function handleTableRowDelete(key) {
969
+ var handleTableRowDelete = (0, _lodash.debounce)(function (key) {
970
970
  var _a, _b, _c;
971
971
 
972
972
  var rkey = (0, _lodash.isObject)(key) ? key[_rowKey] : key;
@@ -1010,16 +1010,38 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1010
1010
 
1011
1011
  setDataSource(_res);
1012
1012
  }
1013
- };
1014
- /** 快捷添加 */
1013
+ }, 40);
1014
+ var handleTableRowReplace = (0, _lodash.debounce)(function (record, defaultRecord) {
1015
+ var _a, _b;
1016
+
1017
+ var rkey = (0, _lodash.isObject)(record) ? record[_rowKey] : record;
1018
+ var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys; // const res = cloneDeep(dataSourceRef.current)
1019
+
1020
+ var deep = function deep(children) {
1021
+ return children.map(function (item) {
1022
+ if (item[_rowKey] === rkey) {
1023
+ return defaultRecord;
1024
+ } else if (preKeys.includes(item[_rowKey]) && item.children) {
1025
+ var child = deep(item.children);
1026
+ return Object.assign(Object.assign({}, item), {
1027
+ children: child
1028
+ });
1029
+ } else {
1030
+ return item;
1031
+ }
1032
+ });
1033
+ };
1015
1034
 
1035
+ var res = deep(dataSourceRef.current);
1036
+ setDataSource(res);
1037
+ }, 40);
1038
+ /** 快捷添加 */
1016
1039
 
1017
- var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren, defaultRecord) {
1040
+ var handleTableRowAdd = (0, _lodash.debounce)(function (record, isAppendInChindren, defaultRecord) {
1018
1041
  var _a, _b;
1019
1042
 
1020
1043
  var rkey = (0, _lodash.isObject)(record) ? record[_rowKey] : record;
1021
1044
  var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
1022
- console.log(record, isAppendInChindren, defaultRecord, '333', preKeys);
1023
1045
  var res = (0, _immer.produce)(dataSourceRef.current, function (draft) {
1024
1046
  var _a, _b, _c, _d, _e;
1025
1047
 
@@ -1085,10 +1107,8 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1085
1107
  !expandedRowKeys.includes((_d = draft[index]) === null || _d === void 0 ? void 0 : _d[_rowKey]) && setExpandedRowKeys([].concat((0, _toConsumableArray2.default)(expandedRowKeys), [(_e = draft[index]) === null || _e === void 0 ? void 0 : _e[_rowKey]]));
1086
1108
  } else {
1087
1109
  if (Array.isArray(defaultRecord)) {
1088
- console.log(1);
1089
1110
  draft.splice.apply(draft, [index + 1, 0].concat((0, _toConsumableArray2.default)(defaultRecord)));
1090
1111
  } else {
1091
- console.log(2);
1092
1112
  draft.splice(index + 1, 0, defaultRecord || (0, _defineProperty2.default)({}, _rowKey, "".concat(Date.now())));
1093
1113
  }
1094
1114
  }
@@ -1096,7 +1116,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1096
1116
  }
1097
1117
  });
1098
1118
  setDataSource(res);
1099
- };
1119
+ }, 40);
1100
1120
 
1101
1121
  var handleCopy = function handleCopy(key, value, type, rowIndex) {
1102
1122
  var res = (0, _immer.produce)(dataSourceRef.current, function (draft) {
@@ -1333,7 +1353,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1333
1353
  return handleTableRowDelete(data);
1334
1354
  },
1335
1355
  addRowData: function addRowData(data, defaultValue, addInChild) {
1336
- return handleTableRowAdd(data, addInChild, defaultValue);
1356
+ return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
1337
1357
  },
1338
1358
  clearSelect: function clearSelect() {
1339
1359
  setLocalRowSelectList({
@@ -613,6 +613,12 @@ p {
613
613
  padding-left: 8px;
614
614
  padding-right: 8px;
615
615
  }
616
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
617
+ background-color: rgba(0, 0, 0, 0.06) !important;
618
+ }
619
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
620
+ background-color: rgba(0, 0, 0, 0.06) !important;
621
+ }
616
622
  .lm_editTable_warpper .ant-picker {
617
623
  height: 24px !important;
618
624
  padding: 2px 8px;
@@ -101,6 +101,12 @@
101
101
  padding-left: 8px;
102
102
  padding-right: 8px;
103
103
  }
104
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
105
+ background-color: rgba(0, 0, 0, 0.06) !important;
106
+ }
107
+ .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
108
+ background-color: rgba(0, 0, 0, 0.06) !important;
109
+ }
104
110
  .lm_editTable_warpper .ant-picker {
105
111
  height: 24px !important;
106
112
  padding: 2px 8px;
@@ -84,7 +84,7 @@ function getExpandStatus(children) {
84
84
  }
85
85
 
86
86
  function checkMemoShouldUploadSpecialFun(prev, next) {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
88
88
 
89
89
  var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
90
90
 
@@ -98,9 +98,14 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
98
98
 
99
99
  if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'children']), (0, _lodash.pick)(next, ['colIndex', 'record', 'children']))) {
100
100
  return false;
101
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
102
+
103
+
104
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.render) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.render)) && !(0, _lodash.isEqual)((0, _lodash.omit)(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), (0, _lodash.omit)(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render']))) {
105
+ return false;
101
106
  }
102
107
 
103
- if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_a = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _a === void 0 ? void 0 : _a.render) || ((_b = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _b === void 0 ? void 0 : _b.render)) && !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'rowIndex']), (0, _lodash.pick)(next, ['colIndex', 'record', 'rowIndex']))) {
108
+ if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && (((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.render) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.render)) && !(0, _lodash.isEqual)((0, _lodash.pick)(prev, ['colIndex', 'record', 'rowIndex']), (0, _lodash.pick)(next, ['colIndex', 'record', 'rowIndex']))) {
104
109
  return false;
105
110
  }
106
111
 
@@ -108,11 +113,11 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
108
113
  return false;
109
114
  }
110
115
 
111
- if ((((_c = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _c === void 0 ? void 0 : _c.optionOnly) || ((_d = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _d === void 0 ? void 0 : _d.optionOnly)) && !(0, _lodash.isEqual)((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.options, (_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.options)) {
116
+ if ((((_e = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _e === void 0 ? void 0 : _e.optionOnly) || ((_f = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _f === void 0 ? void 0 : _f.optionOnly)) && !(0, _lodash.isEqual)((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options, (_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) {
112
117
  return false;
113
118
  }
114
119
 
115
- if ((((_g = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _g === void 0 ? void 0 : _g.options) || ((_h = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _h === void 0 ? void 0 : _h.options)) && !(0, _lodash.isEqual)((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options, (_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) {
120
+ if ((((_j = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _j === void 0 ? void 0 : _j.options) || ((_k = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _k === void 0 ? void 0 : _k.options)) && !(0, _lodash.isEqual)((_l = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _l === void 0 ? void 0 : _l.options, (_m = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _m === void 0 ? void 0 : _m.options)) {
116
121
  return false;
117
122
  }
118
123
 
@@ -130,12 +135,12 @@ function checkMemoShouldUploadSpecialFun(prev, next) {
130
135
  }
131
136
 
132
137
  if (next.className.indexOf('ant-table-selection-column') > -1) {
133
- return (0, _lodash.isEqual)((_m = (_l = prev.children) === null || _l === void 0 ? void 0 : _l[1]) === null || _m === void 0 ? void 0 : _m.props, (_p = (_o = next.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props);
138
+ return (0, _lodash.isEqual)((_p = (_o = prev.children) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.props, (_r = (_q = next.children) === null || _q === void 0 ? void 0 : _q[1]) === null || _r === void 0 ? void 0 : _r.props);
134
139
  }
135
140
  /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
136
141
 
137
142
 
138
- if (((_q = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _q === void 0 ? void 0 : _q.quickcopy) || ((_r = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _r === void 0 ? void 0 : _r.quickcopy)) {
143
+ if (((_s = prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) === null || _s === void 0 ? void 0 : _s.quickcopy) || ((_t = nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps) === null || _t === void 0 ? void 0 : _t.quickcopy)) {
139
144
  var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
140
145
  var p = (0, _lodash.pick)(prev, pickProps);
141
146
  var n = (0, _lodash.pick)(next, pickProps);
@@ -110,15 +110,6 @@
110
110
  }
111
111
  .lm_filter_basic_item .filter_item_icon .icon_clear {
112
112
  display: none;
113
- opacity: 0;
114
- }
115
- .lm_filter_basic_item .filter_item_icon:hover .icon_down {
116
- display: none;
117
- opacity: 0;
118
- }
119
- .lm_filter_basic_item .filter_item_icon:hover .icon_clear {
120
- display: inline-block;
121
- opacity: 1;
122
113
  }
123
114
  .lm_filter_basic_item.expand .filter_item_icon.addon_after {
124
115
  transform: rotateX(180deg);
@@ -133,6 +124,12 @@
133
124
  .lm_filter_basic_item.active.lm_filter_complex_item .filter_item_label {
134
125
  color: var(--primary-color);
135
126
  }
127
+ .lm_filter_basic_item.active:hover .icon_down {
128
+ display: none;
129
+ }
130
+ .lm_filter_basic_item.active:hover .icon_clear {
131
+ display: inline-block;
132
+ }
136
133
  .ant-dropdown.filter_dropdown_container_cascader > div {
137
134
  transform: translateY(-4px);
138
135
  }
@@ -110,15 +110,6 @@
110
110
  }
111
111
  .lm_filter_basic_item .filter_item_icon .icon_clear {
112
112
  display: none;
113
- opacity: 0;
114
- }
115
- .lm_filter_basic_item .filter_item_icon:hover .icon_down {
116
- display: none;
117
- opacity: 0;
118
- }
119
- .lm_filter_basic_item .filter_item_icon:hover .icon_clear {
120
- display: inline-block;
121
- opacity: 1;
122
113
  }
123
114
  .lm_filter_basic_item.expand .filter_item_icon.addon_after {
124
115
  transform: rotateX(180deg);
@@ -133,6 +124,12 @@
133
124
  .lm_filter_basic_item.active.lm_filter_complex_item .filter_item_label {
134
125
  color: var(--primary-color);
135
126
  }
127
+ .lm_filter_basic_item.active:hover .icon_down {
128
+ display: none;
129
+ }
130
+ .lm_filter_basic_item.active:hover .icon_clear {
131
+ display: inline-block;
132
+ }
136
133
  .ant-dropdown.filter_dropdown_container_cascader > div {
137
134
  transform: translateY(-4px);
138
135
  }
@@ -1086,13 +1086,19 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1086
1086
  var selectedRows = useSelectedRows.selectedRows;
1087
1087
 
1088
1088
  if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
1089
- var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
1090
- return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
1091
- });
1092
- selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
1093
- setSelectedRows({
1094
- selectedRows: (0, _lodash.cloneDeep)(selectedRows)
1095
- }); // rowClick?.(selectedRows)
1089
+ if ((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) === 'radio') {
1090
+ setSelectedRows({
1091
+ selectedRows: [(0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]]
1092
+ });
1093
+ } else {
1094
+ var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
1095
+ return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
1096
+ });
1097
+ selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
1098
+ setSelectedRows({
1099
+ selectedRows: (0, _lodash.cloneDeep)(selectedRows)
1100
+ });
1101
+ }
1096
1102
  }
1097
1103
  } else {
1098
1104
  rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
@@ -1176,7 +1182,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1176
1182
  }); // rowClick?.(reulstSelect)
1177
1183
  } : undefined,
1178
1184
  onSelect: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) ? function (record, selected) {
1179
- var reulstSelect = selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
1185
+ var reulstSelect = rowSelection.type === 'radio' ? [record] : selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
1180
1186
  return item[rowKey] !== record[rowKey];
1181
1187
  });
1182
1188
  setSelectedRows({
@@ -20,6 +20,7 @@ var PictureItem = function PictureItem(_ref) {
20
20
  var file = _ref.file,
21
21
  instance = _ref.instance;
22
22
  var readOnly = instance.readOnly,
23
+ disabled = instance.disabled,
23
24
  remove = instance.remove,
24
25
  preview = instance.preview,
25
26
  download = instance.download,
@@ -41,7 +42,7 @@ var PictureItem = function PictureItem(_ref) {
41
42
  onClick: function onClick() {
42
43
  return download(file);
43
44
  }
44
- }, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
45
+ }, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
45
46
  className: "picture_right lm_upload_item_action"
46
47
  }, /*#__PURE__*/React.createElement("div", {
47
48
  className: "action_delete",
@@ -81,6 +81,7 @@ var PictureItem = function PictureItem(_ref) {
81
81
  instance = _ref.instance,
82
82
  listeners = _ref.listeners;
83
83
  var dispatch = instance.dispatch,
84
+ disabled = instance.disabled,
84
85
  readOnly = instance.readOnly,
85
86
  size = instance.size,
86
87
  remove = instance.remove,
@@ -154,7 +155,15 @@ var PictureItem = function PictureItem(_ref) {
154
155
  })), /*#__PURE__*/_react.default.createElement("div", {
155
156
  className: "lm_upload_item_mask"
156
157
  }, /*#__PURE__*/_react.default.createElement("div", {
157
- className: "lm_upload_item_action"
158
+ className: "lm_upload_item_action",
159
+ onKeyDown: function onKeyDown(e) {
160
+ e.stopPropagation();
161
+ e.preventDefault();
162
+ },
163
+ onPointerDown: function onPointerDown(e) {
164
+ e.stopPropagation();
165
+ e.preventDefault();
166
+ }
158
167
  }, /*#__PURE__*/_react.default.createElement("div", {
159
168
  className: "action_preview",
160
169
  onClick: handlePreview
@@ -163,7 +172,7 @@ var PictureItem = function PictureItem(_ref) {
163
172
  style: {
164
173
  fontSize: resetSize.fontSize
165
174
  }
166
- })), !readOnly && /*#__PURE__*/_react.default.createElement("div", {
175
+ })), !readOnly && !disabled && /*#__PURE__*/_react.default.createElement("div", {
167
176
  className: "action_delete",
168
177
  onClick: function onClick() {
169
178
  return remove(file);
@@ -19,6 +19,7 @@ var TextItem = function TextItem(_ref) {
19
19
  var file = _ref.file,
20
20
  instance = _ref.instance;
21
21
  var readOnly = instance.readOnly,
22
+ disabled = instance.disabled,
22
23
  remove = instance.remove,
23
24
  download = instance.download,
24
25
  fileNames = instance.fileNames;
@@ -35,7 +36,7 @@ var TextItem = function TextItem(_ref) {
35
36
  onClick: function onClick() {
36
37
  return download(file);
37
38
  }
38
- }, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
39
+ }, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
39
40
  className: "text_right lm_upload_item_text_action"
40
41
  }, /*#__PURE__*/React.createElement("div", {
41
42
  className: "action_delete",
@@ -25,6 +25,7 @@ var LmUploadList = function LmUploadList(_ref) {
25
25
  itemRender = instance.itemRender,
26
26
  listType = instance.listType,
27
27
  showUploadList = instance.showUploadList,
28
+ disabled = instance.disabled,
28
29
  enableDrag = instance.enableDrag,
29
30
  fileNames = instance.fileNames,
30
31
  move = instance.move;
@@ -60,7 +61,7 @@ var LmUploadList = function LmUploadList(_ref) {
60
61
  }
61
62
  };
62
63
 
63
- if (enableDrag) {
64
+ if (!disabled && enableDrag) {
64
65
  return /*#__PURE__*/_react.default.createElement(_linkmoreDesign.LmDrag, {
65
66
  options: fileList,
66
67
  rowKey: uid,
@@ -11,6 +11,8 @@ exports.default = void 0;
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
14
16
  var _UploadPicture = _interopRequireDefault(require("./UploadPicture"));
15
17
 
16
18
  // 上传核心
@@ -24,6 +26,7 @@ var UploadCore = function UploadCore(_ref) {
24
26
  var inputRef = _react.default.useRef(null);
25
27
 
26
28
  var accept = instance.accept,
29
+ disabled = instance.disabled,
27
30
  children = instance.children,
28
31
  beforeUpload = instance.beforeUpload,
29
32
  getUploadStatus = instance.getUploadStatus,
@@ -32,6 +35,7 @@ var UploadCore = function UploadCore(_ref) {
32
35
  var handleClick = (0, _react.useCallback)(function () {
33
36
  var _a;
34
37
 
38
+ if (disabled) return;
35
39
  var isUploading = getUploadStatus().uploading;
36
40
  if (isUploading) return;
37
41
  (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
@@ -57,7 +61,7 @@ var UploadCore = function UploadCore(_ref) {
57
61
  };
58
62
  return !getIsMaxCount() && /*#__PURE__*/_react.default.createElement("div", {
59
63
  onClick: handleClick,
60
- className: "lm_upload_core"
64
+ className: (0, _classnames.default)('lm_upload_core', disabled && 'disabled')
61
65
  }, children || /*#__PURE__*/_react.default.createElement(_UploadPicture.default, {
62
66
  instance: instance
63
67
  }), /*#__PURE__*/_react.default.createElement("input", Object.assign({
@@ -122,6 +122,7 @@
122
122
  gap: 8px;
123
123
  }
124
124
  .lm_upload_wrapper .lm_upload_core {
125
+ position: relative;
125
126
  display: inline-flex;
126
127
  vertical-align: middle;
127
128
  }
@@ -136,6 +137,12 @@
136
137
  cursor: pointer;
137
138
  transition: all 0.3s;
138
139
  }
140
+ .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture::after {
141
+ position: absolute;
142
+ background-color: var(--disabled-bg-color);
143
+ cursor: not-allowed;
144
+ inset: 0;
145
+ }
139
146
  .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture:hover {
140
147
  border-color: var(--primary-color);
141
148
  }
@@ -151,6 +158,16 @@
151
158
  margin-top: var(--gap);
152
159
  color: var(--color-45);
153
160
  }
161
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture {
162
+ border-color: var(--disabled-border-color);
163
+ }
164
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture::after {
165
+ content: '';
166
+ }
167
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .action_plus,
168
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .tip {
169
+ color: var(--disabled-font-color);
170
+ }
154
171
  .lm_upload_wrapper .lm_upload_progress {
155
172
  width: 100%;
156
173
  height: 2px;
@@ -122,6 +122,7 @@
122
122
  gap: 8px;
123
123
  }
124
124
  .lm_upload_wrapper .lm_upload_core {
125
+ position: relative;
125
126
  display: inline-flex;
126
127
  vertical-align: middle;
127
128
  }
@@ -136,6 +137,12 @@
136
137
  cursor: pointer;
137
138
  transition: all 0.3s;
138
139
  }
140
+ .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture::after {
141
+ position: absolute;
142
+ background-color: var(--disabled-bg-color);
143
+ cursor: not-allowed;
144
+ inset: 0;
145
+ }
139
146
  .lm_upload_wrapper .lm_upload_core .lm_upload_core_picture:hover {
140
147
  border-color: var(--primary-color);
141
148
  }
@@ -151,6 +158,16 @@
151
158
  margin-top: var(--gap);
152
159
  color: var(--color-45);
153
160
  }
161
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture {
162
+ border-color: var(--disabled-border-color);
163
+ }
164
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture::after {
165
+ content: '';
166
+ }
167
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .action_plus,
168
+ .lm_upload_wrapper .lm_upload_core.disabled .lm_upload_core_picture .lm_upload_core_picture_action .tip {
169
+ color: var(--disabled-font-color);
170
+ }
154
171
  .lm_upload_wrapper .lm_upload_progress {
155
172
  width: 100%;
156
173
  height: 2px;
@@ -101,7 +101,8 @@ var CLMTreeSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
101
101
  className: 'lm_tree_select',
102
102
  value: resetValue,
103
103
  size: mergeSize,
104
- disabled: mergedDisabled
104
+ disabled: mergedDisabled,
105
+ treeData: treeData
105
106
  }, resetProps), children);
106
107
  });
107
108
  var LMTreeSelect = CLMTreeSelect;