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> {
@@ -54,7 +54,7 @@ import { PlusCircleOutlined } from '@ant-design/icons';
54
54
  import moment from 'moment';
55
55
  import { arrayMove } from '@dnd-kit/sortable';
56
56
  import { Button, Checkbox, IconFont, Input, InputNumber, Radio, Select, Table, Switch, DatePicker, Form, Popover } from 'linkmore-design';
57
- import { get, set, isFunction, omit, isEqual, pick, isBoolean, isObject } from 'lodash';
57
+ import { get, set, isFunction, omit, isEqual, pick, isBoolean, isObject, debounce } from 'lodash';
58
58
  import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, memo, useCallback } from 'react';
59
59
  import { useControllableValue } from 'ahooks';
60
60
  import { produce } from 'immer';
@@ -640,7 +640,8 @@ var EditableCell = function EditableCell(props) {
640
640
  valuePropName: editable === 'switch' ? 'checked' : 'value',
641
641
  style: {
642
642
  margin: 0
643
- }
643
+ },
644
+ noStyle: formProps ? false : true
644
645
  }, formProps, {
645
646
  name: dataIndex
646
647
  }), Control(editable)));
@@ -652,6 +653,7 @@ var EditableCell = function EditableCell(props) {
652
653
  margin: 0
653
654
  }
654
655
  }, formProps, {
656
+ noStyle: formProps ? false : true,
655
657
  name: [dataIndex, 'value']
656
658
  }), Control(editable)));
657
659
  }
@@ -708,8 +710,7 @@ var EditableCell = function EditableCell(props) {
708
710
  var MemoEditableCell = /*#__PURE__*/memo(EditableCell, function (prev, next) {
709
711
  var pickProps = ['record', 'colIndex'];
710
712
  var p = pick(prev, pickProps);
711
- var n = pick(next, pickProps);
712
- console.log(prev, next, 222); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
713
+ var n = pick(next, pickProps); // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
713
714
 
714
715
  /** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
715
716
 
@@ -823,7 +824,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
823
824
  /** 点击添加按钮添加 */
824
825
 
825
826
 
826
- var handleAdd = function handleAdd(row) {
827
+ var handleAdd = debounce(function (row) {
827
828
  var _a;
828
829
 
829
830
  var addDataInfo = 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;
@@ -831,7 +832,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
831
832
  draft.push(Object.assign(_defineProperty({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
832
833
  });
833
834
  setDataSource(res); // onChange?.(res)
834
- };
835
+ }, 40);
835
836
  /** 本地缓存一个选择数据 */
836
837
  // useEffect(() => {
837
838
  // if (rowSelection) {
@@ -846,7 +847,6 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
846
847
  // ;(rowSelection?.onChange as any)?.(selectRows)
847
848
  // }
848
849
 
849
-
850
850
  var handleSave = function handleSave(row, options) {
851
851
  var _a, _b;
852
852
 
@@ -933,7 +933,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
933
933
  }; // @ts-ignore
934
934
 
935
935
 
936
- var handleTableRowDelete = function handleTableRowDelete(key) {
936
+ var handleTableRowDelete = debounce(function (key) {
937
937
  var _a, _b, _c;
938
938
 
939
939
  var rkey = isObject(key) ? key[_rowKey] : key;
@@ -977,16 +977,38 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
977
977
 
978
978
  setDataSource(_res);
979
979
  }
980
- };
981
- /** 快捷添加 */
980
+ }, 40);
981
+ var handleTableRowReplace = debounce(function (record, defaultRecord) {
982
+ var _a, _b;
983
+
984
+ var rkey = isObject(record) ? record[_rowKey] : record;
985
+ 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)
986
+
987
+ var deep = function deep(children) {
988
+ return children.map(function (item) {
989
+ if (item[_rowKey] === rkey) {
990
+ return defaultRecord;
991
+ } else if (preKeys.includes(item[_rowKey]) && item.children) {
992
+ var child = deep(item.children);
993
+ return Object.assign(Object.assign({}, item), {
994
+ children: child
995
+ });
996
+ } else {
997
+ return item;
998
+ }
999
+ });
1000
+ };
982
1001
 
1002
+ var res = deep(dataSourceRef.current);
1003
+ setDataSource(res);
1004
+ }, 40);
1005
+ /** 快捷添加 */
983
1006
 
984
- var handleTableRowAdd = function handleTableRowAdd(record, isAppendInChindren, defaultRecord) {
1007
+ var handleTableRowAdd = debounce(function (record, isAppendInChindren, defaultRecord) {
985
1008
  var _a, _b;
986
1009
 
987
1010
  var rkey = isObject(record) ? record[_rowKey] : record;
988
1011
  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;
989
- console.log(record, isAppendInChindren, defaultRecord, '333', preKeys);
990
1012
  var res = produce(dataSourceRef.current, function (draft) {
991
1013
  var _a, _b, _c, _d, _e;
992
1014
 
@@ -1052,10 +1074,8 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1052
1074
  !expandedRowKeys.includes((_d = draft[index]) === null || _d === void 0 ? void 0 : _d[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [(_e = draft[index]) === null || _e === void 0 ? void 0 : _e[_rowKey]]));
1053
1075
  } else {
1054
1076
  if (Array.isArray(defaultRecord)) {
1055
- console.log(1);
1056
1077
  draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray(defaultRecord)));
1057
1078
  } else {
1058
- console.log(2);
1059
1079
  draft.splice(index + 1, 0, defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
1060
1080
  }
1061
1081
  }
@@ -1063,7 +1083,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1063
1083
  }
1064
1084
  });
1065
1085
  setDataSource(res);
1066
- };
1086
+ }, 40);
1067
1087
 
1068
1088
  var handleCopy = function handleCopy(key, value, type, rowIndex) {
1069
1089
  var res = produce(dataSourceRef.current, function (draft) {
@@ -1301,7 +1321,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
1301
1321
  return handleTableRowDelete(data);
1302
1322
  },
1303
1323
  addRowData: function addRowData(data, defaultValue, addInChild) {
1304
- return handleTableRowAdd(data, addInChild, defaultValue);
1324
+ return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
1305
1325
  },
1306
1326
  clearSelect: function clearSelect() {
1307
1327
  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;
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import { keyBy, isEqual, pick, isFunction } from 'lodash';
3
+ import { keyBy, isEqual, pick, isFunction, omit } from 'lodash';
4
4
  export function isObjEmpty(obj) {
5
5
  var _a;
6
6
 
@@ -61,7 +61,7 @@ export function getExpandStatus(children) {
61
61
  return isExpandRow(children) ? (_e = (_d = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[0]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e['aria-label'] : '';
62
62
  }
63
63
  export function checkMemoShouldUploadSpecialFun(prev, next) {
64
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
64
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
65
65
 
66
66
  var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
67
67
 
@@ -75,9 +75,14 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
75
75
 
76
76
  if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !isEqual(pick(prev, ['colIndex', 'record', 'children']), pick(next, ['colIndex', 'record', 'children']))) {
77
77
  return false;
78
+ } // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
79
+
80
+
81
+ 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)) && !isEqual(omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render']))) {
82
+ return false;
78
83
  }
79
84
 
80
- 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)) && !isEqual(pick(prev, ['colIndex', 'record', 'rowIndex']), pick(next, ['colIndex', 'record', 'rowIndex']))) {
85
+ 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)) && !isEqual(pick(prev, ['colIndex', 'record', 'rowIndex']), pick(next, ['colIndex', 'record', 'rowIndex']))) {
81
86
  return false;
82
87
  }
83
88
 
@@ -85,11 +90,11 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
85
90
  return false;
86
91
  }
87
92
 
88
- 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)) && !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)) {
93
+ 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)) && !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)) {
89
94
  return false;
90
95
  }
91
96
 
92
- 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)) && !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)) {
97
+ 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)) && !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)) {
93
98
  return false;
94
99
  }
95
100
 
@@ -107,12 +112,12 @@ export function checkMemoShouldUploadSpecialFun(prev, next) {
107
112
  }
108
113
 
109
114
  if (next.className.indexOf('ant-table-selection-column') > -1) {
110
- return 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);
115
+ return 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);
111
116
  }
112
117
  /** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
113
118
 
114
119
 
115
- 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)) {
120
+ 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)) {
116
121
  var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
117
122
  var p = pick(prev, pickProps);
118
123
  var n = 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({
@@ -6,6 +6,7 @@ var PictureItem = function PictureItem(_ref) {
6
6
  var file = _ref.file,
7
7
  instance = _ref.instance;
8
8
  var readOnly = instance.readOnly,
9
+ disabled = instance.disabled,
9
10
  remove = instance.remove,
10
11
  preview = instance.preview,
11
12
  download = instance.download,
@@ -27,7 +28,7 @@ var PictureItem = function PictureItem(_ref) {
27
28
  onClick: function onClick() {
28
29
  return download(file);
29
30
  }
30
- }, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
31
+ }, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
31
32
  className: "picture_right lm_upload_item_action"
32
33
  }, /*#__PURE__*/React.createElement("div", {
33
34
  className: "action_delete",
@@ -67,6 +67,7 @@ var PictureItem = function PictureItem(_ref) {
67
67
  instance = _ref.instance,
68
68
  listeners = _ref.listeners;
69
69
  var dispatch = instance.dispatch,
70
+ disabled = instance.disabled,
70
71
  readOnly = instance.readOnly,
71
72
  size = instance.size,
72
73
  remove = instance.remove,
@@ -140,7 +141,15 @@ var PictureItem = function PictureItem(_ref) {
140
141
  })), /*#__PURE__*/React.createElement("div", {
141
142
  className: "lm_upload_item_mask"
142
143
  }, /*#__PURE__*/React.createElement("div", {
143
- className: "lm_upload_item_action"
144
+ className: "lm_upload_item_action",
145
+ onKeyDown: function onKeyDown(e) {
146
+ e.stopPropagation();
147
+ e.preventDefault();
148
+ },
149
+ onPointerDown: function onPointerDown(e) {
150
+ e.stopPropagation();
151
+ e.preventDefault();
152
+ }
144
153
  }, /*#__PURE__*/React.createElement("div", {
145
154
  className: "action_preview",
146
155
  onClick: handlePreview
@@ -149,7 +158,7 @@ var PictureItem = function PictureItem(_ref) {
149
158
  style: {
150
159
  fontSize: resetSize.fontSize
151
160
  }
152
- })), !readOnly && /*#__PURE__*/React.createElement("div", {
161
+ })), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
153
162
  className: "action_delete",
154
163
  onClick: function onClick() {
155
164
  return remove(file);
@@ -6,6 +6,7 @@ var TextItem = function TextItem(_ref) {
6
6
  var file = _ref.file,
7
7
  instance = _ref.instance;
8
8
  var readOnly = instance.readOnly,
9
+ disabled = instance.disabled,
9
10
  remove = instance.remove,
10
11
  download = instance.download,
11
12
  fileNames = instance.fileNames;
@@ -22,7 +23,7 @@ var TextItem = function TextItem(_ref) {
22
23
  onClick: function onClick() {
23
24
  return download(file);
24
25
  }
25
- }, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
26
+ }, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
26
27
  className: "text_right lm_upload_item_text_action"
27
28
  }, /*#__PURE__*/React.createElement("div", {
28
29
  className: "action_delete",
@@ -11,6 +11,7 @@ var LmUploadList = function LmUploadList(_ref) {
11
11
  itemRender = instance.itemRender,
12
12
  listType = instance.listType,
13
13
  showUploadList = instance.showUploadList,
14
+ disabled = instance.disabled,
14
15
  enableDrag = instance.enableDrag,
15
16
  fileNames = instance.fileNames,
16
17
  move = instance.move;
@@ -46,7 +47,7 @@ var LmUploadList = function LmUploadList(_ref) {
46
47
  }
47
48
  };
48
49
 
49
- if (enableDrag) {
50
+ if (!disabled && enableDrag) {
50
51
  return /*#__PURE__*/React.createElement(LmDrag, {
51
52
  options: fileList,
52
53
  rowKey: uid,
@@ -1,4 +1,5 @@
1
1
  import React, { useCallback } from 'react';
2
+ import cn from 'classnames';
2
3
  import UploadPicture from './UploadPicture'; // 上传核心
3
4
  // 渲染上传区域样式, 仅用于触发上传事件
4
5
  // type: 'card' 图片 | 'drag' 拖拽
@@ -10,6 +11,7 @@ var UploadCore = function UploadCore(_ref) {
10
11
 
11
12
  var inputRef = React.useRef(null);
12
13
  var accept = instance.accept,
14
+ disabled = instance.disabled,
13
15
  children = instance.children,
14
16
  beforeUpload = instance.beforeUpload,
15
17
  getUploadStatus = instance.getUploadStatus,
@@ -18,6 +20,7 @@ var UploadCore = function UploadCore(_ref) {
18
20
  var handleClick = useCallback(function () {
19
21
  var _a;
20
22
 
23
+ if (disabled) return;
21
24
  var isUploading = getUploadStatus().uploading;
22
25
  if (isUploading) return;
23
26
  (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
@@ -43,7 +46,7 @@ var UploadCore = function UploadCore(_ref) {
43
46
  };
44
47
  return !getIsMaxCount() && /*#__PURE__*/React.createElement("div", {
45
48
  onClick: handleClick,
46
- className: "lm_upload_core"
49
+ className: cn('lm_upload_core', disabled && 'disabled')
47
50
  }, children || /*#__PURE__*/React.createElement(UploadPicture, {
48
51
  instance: instance
49
52
  }), /*#__PURE__*/React.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;
@@ -82,7 +82,8 @@ var CLMTreeSelect = /*#__PURE__*/forwardRef(function (props, ref) {
82
82
  className: 'lm_tree_select',
83
83
  value: resetValue,
84
84
  size: mergeSize,
85
- disabled: mergedDisabled
85
+ disabled: mergedDisabled,
86
+ treeData: treeData
86
87
  }, resetProps), children);
87
88
  });
88
89
  var LMTreeSelect = CLMTreeSelect;