linkmore-design 1.0.24 → 1.0.27

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 (139) hide show
  1. package/dist/index.umd.js +4874 -1210
  2. package/dist/index.umd.min.js +7 -7
  3. package/es/Button/index.js +1 -1
  4. package/es/Button/style/style.css +6 -0
  5. package/es/ButtonTags/style/style.css +3 -0
  6. package/es/Card/style/index.css +3 -0
  7. package/es/Checkbox/style/style.css +9 -0
  8. package/es/CkFilter/baseFilter/NestedFilter.js +137 -0
  9. package/es/CkFilter/baseFilter/filterMenu.js +15 -9
  10. package/es/CkFilter/baseFilter/index.js +5 -2
  11. package/es/CkFilter/baseFilter/moreFilters.js +20 -2
  12. package/es/CkFilter/complexFilter/drawer.js +35 -20
  13. package/es/CkFilter/complexFilter/index.js +1 -1
  14. package/es/CkFilter/components/Controls.js +8 -0
  15. package/es/CkFilter/components/DragBox/DndContainer.js +49 -0
  16. package/es/CkFilter/components/DragBox/index.js +63 -0
  17. package/es/CkFilter/components/DragBox/sortableBox.js +24 -0
  18. package/es/CkFilter/components/DragBox/sortableItem.js +111 -0
  19. package/es/CkFilter/components/Nested.js +90 -0
  20. package/es/CkFilter/components/filterTypes.js +59 -94
  21. package/es/CkFilter/components/modal.js +105 -38
  22. package/es/CkFilter/context.js +16 -3
  23. package/es/CkFilter/customFilter/drawer.js +61 -15
  24. package/es/CkFilter/customFilter/index.js +4 -1
  25. package/es/CkFilter/customFilter/radioGroup.js +4 -3
  26. package/es/CkFilter/icon_placeholder.png +0 -0
  27. package/es/CkFilter/style/style.css +45 -5
  28. package/es/CustomerService/style/style.css +3 -0
  29. package/es/Drawer/style/index.css +3 -0
  30. package/es/Dropdown/index.d.ts +2 -0
  31. package/es/Dropdown/index.js +9 -12
  32. package/es/Dropdown/style/index.css +15 -2
  33. package/es/EditTable/style/style.css +3 -0
  34. package/es/Empty/index.d.ts +7 -0
  35. package/es/Empty/index.js +3 -0
  36. package/es/Empty/style/index.css +502 -0
  37. package/es/Empty/style/index.d.ts +1 -0
  38. package/es/Empty/style/index.js +1 -0
  39. package/es/Filter/style/style.css +3 -0
  40. package/es/Input/index.js +6 -5
  41. package/es/Input/style/style.css +20 -0
  42. package/es/InputNumber/style/index.css +3 -0
  43. package/es/LeftTable/style/style.css +3 -0
  44. package/es/LmTable/ImgList/imgCell.js +3 -1
  45. package/es/LmTable/ImgList/imgTable.js +4 -4
  46. package/es/LmTable/style/style.css +65 -61
  47. package/es/Menu/index.d.ts +7 -0
  48. package/es/Menu/index.js +3 -0
  49. package/es/Menu/style/index.css +502 -0
  50. package/es/Menu/style/index.d.ts +1 -0
  51. package/es/Menu/style/index.js +1 -0
  52. package/es/Modal/index.js +1 -1
  53. package/es/Modal/style/index.css +3 -0
  54. package/es/Notification/style/index.css +3 -0
  55. package/es/Pagination/style/index.css +3 -0
  56. package/es/PopTable/style/style.css +3 -0
  57. package/es/ProTable/style/style.css +3 -0
  58. package/es/Radio/index.js +4 -2
  59. package/es/Radio/style/style.css +17 -3
  60. package/es/Select/style/index.css +3 -0
  61. package/es/Space/style/index.css +3 -0
  62. package/es/TabBar/index.js +1 -1
  63. package/es/Tree/index.d.ts +7 -0
  64. package/es/Tree/index.js +3 -0
  65. package/es/Tree/style/index.css +502 -0
  66. package/es/Tree/style/index.d.ts +1 -0
  67. package/es/Tree/style/index.js +1 -0
  68. package/es/index.js +9 -299
  69. package/es/styles/main.css +3 -0
  70. package/es/styles/resetAntd.css +3 -0
  71. package/lib/Button/index.js +1 -1
  72. package/lib/Button/style/style.css +6 -0
  73. package/lib/ButtonTags/style/style.css +3 -0
  74. package/lib/Card/style/index.css +3 -0
  75. package/lib/Checkbox/style/style.css +9 -0
  76. package/lib/CkFilter/baseFilter/NestedFilter.js +137 -0
  77. package/lib/CkFilter/baseFilter/filterMenu.js +15 -9
  78. package/lib/CkFilter/baseFilter/index.js +5 -2
  79. package/lib/CkFilter/baseFilter/moreFilters.js +20 -2
  80. package/lib/CkFilter/complexFilter/drawer.js +35 -20
  81. package/lib/CkFilter/complexFilter/index.js +1 -1
  82. package/lib/CkFilter/components/Controls.js +8 -0
  83. package/lib/CkFilter/components/DragBox/DndContainer.js +49 -0
  84. package/lib/CkFilter/components/DragBox/index.js +63 -0
  85. package/lib/CkFilter/components/DragBox/sortableBox.js +24 -0
  86. package/lib/CkFilter/components/DragBox/sortableItem.js +111 -0
  87. package/lib/CkFilter/components/Nested.js +90 -0
  88. package/lib/CkFilter/components/filterTypes.js +59 -94
  89. package/lib/CkFilter/components/modal.js +105 -38
  90. package/lib/CkFilter/context.js +16 -3
  91. package/lib/CkFilter/customFilter/drawer.js +61 -15
  92. package/lib/CkFilter/customFilter/index.js +4 -1
  93. package/lib/CkFilter/customFilter/radioGroup.js +4 -3
  94. package/lib/CkFilter/icon_placeholder.png +0 -0
  95. package/lib/CkFilter/style/style.css +45 -5
  96. package/lib/CustomerService/style/style.css +3 -0
  97. package/lib/Drawer/style/index.css +3 -0
  98. package/lib/Dropdown/index.d.ts +2 -0
  99. package/lib/Dropdown/index.js +9 -12
  100. package/lib/Dropdown/style/index.css +15 -2
  101. package/lib/EditTable/style/style.css +3 -0
  102. package/lib/Empty/index.d.ts +7 -0
  103. package/lib/Empty/index.js +15 -0
  104. package/lib/Empty/style/index.css +502 -0
  105. package/lib/Empty/style/index.d.ts +1 -0
  106. package/lib/Empty/style/index.js +3 -0
  107. package/lib/Filter/style/style.css +3 -0
  108. package/lib/Input/index.js +6 -5
  109. package/lib/Input/style/style.css +20 -0
  110. package/lib/InputNumber/style/index.css +3 -0
  111. package/lib/LeftTable/style/style.css +3 -0
  112. package/lib/LmTable/ImgList/imgCell.js +3 -1
  113. package/lib/LmTable/ImgList/imgTable.js +4 -4
  114. package/lib/LmTable/style/style.css +65 -61
  115. package/lib/Menu/index.d.ts +7 -0
  116. package/lib/Menu/index.js +15 -0
  117. package/lib/Menu/style/index.css +502 -0
  118. package/lib/Menu/style/index.d.ts +1 -0
  119. package/lib/Menu/style/index.js +3 -0
  120. package/lib/Modal/index.js +3 -3
  121. package/lib/Modal/style/index.css +3 -0
  122. package/lib/Notification/style/index.css +3 -0
  123. package/lib/Pagination/style/index.css +3 -0
  124. package/lib/PopTable/style/style.css +3 -0
  125. package/lib/ProTable/style/style.css +3 -0
  126. package/lib/Radio/index.js +4 -2
  127. package/lib/Radio/style/style.css +17 -3
  128. package/lib/Select/style/index.css +3 -0
  129. package/lib/Space/style/index.css +3 -0
  130. package/lib/TabBar/index.js +5 -5
  131. package/lib/Tree/index.d.ts +7 -0
  132. package/lib/Tree/index.js +15 -0
  133. package/lib/Tree/style/index.css +502 -0
  134. package/lib/Tree/style/index.d.ts +1 -0
  135. package/lib/Tree/style/index.js +3 -0
  136. package/lib/index.js +9 -299
  137. package/lib/styles/main.css +3 -0
  138. package/lib/styles/resetAntd.css +3 -0
  139. package/package.json +4 -1
@@ -43,7 +43,7 @@ var _context2 = require("../context");
43
43
 
44
44
  var _utils = require("../utils");
45
45
 
46
- var _CustomModal = _interopRequireDefault(require("../components/CustomModal"));
46
+ var _modal = _interopRequireDefault(require("../components/modal"));
47
47
 
48
48
  var _excluded = ["item"];
49
49
 
@@ -56,23 +56,68 @@ var ListItem = function ListItem(props) {
56
56
  fullData = _state$instance$fullD === void 0 ? [] : _state$instance$fullD,
57
57
  customDrawer = state.customDrawer;
58
58
  var field = props.field,
59
- value = props.value; // 单项匹配数据, 根据字段名查找
59
+ value = props.value; // 单项匹配数据, 根据字段名查找, 嵌套筛选时查询父级
60
60
 
61
61
  var getItem = (0, _react.useMemo)(function () {
62
62
  return fullData.find(function (v) {
63
- return v.field === field;
63
+ return [field, value.originField].includes(v.field);
64
64
  });
65
- }, [field, fullData]); // 选中的数据
65
+ }, [props, fullData]); // 选中值的处理
66
+
67
+ var resetValue = (0, _react.useMemo)(function () {
68
+ if (getItem.type === 'cascader') {
69
+ var _value$value;
70
+
71
+ return (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.map(function (v) {
72
+ return v[v.length - 1];
73
+ });
74
+ }
75
+
76
+ return value.value;
77
+ }, [props]); // 遍历树结构
78
+
79
+ var deepChildren = function deepChildren(arr, preArr) {
80
+ arr.forEach(function (item) {
81
+ var _item$children;
82
+
83
+ if (resetValue.includes(item.value)) {
84
+ preArr.push(item);
85
+ }
86
+
87
+ if ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) {
88
+ deepChildren(item.children, preArr);
89
+ }
90
+ });
91
+ }; // 选中的数据
92
+
66
93
 
67
94
  var checkedValues = (0, _react.useMemo)(function () {
95
+ console.log('value', value);
68
96
  var checkedValue = value.value;
69
97
 
70
98
  if (Array.isArray(checkedValue)) {
99
+ if (getItem.type === 'nested') {
100
+ return checkedValue;
101
+ }
102
+
103
+ if (getItem.type === 'cascader') {
104
+ var arr = [];
105
+ deepChildren(getItem.data, arr);
106
+ return arr;
107
+ }
108
+
71
109
  return getItem.data.filter(function (v) {
72
110
  return checkedValue.includes(v.value);
73
111
  });
74
112
  }
75
113
 
114
+ if (getItem.type === 'input') {
115
+ return resetValue ? [{
116
+ value: resetValue,
117
+ label: resetValue
118
+ }] : [];
119
+ }
120
+
76
121
  var filterValue = getItem.data.find(function (v) {
77
122
  return v.value === checkedValue;
78
123
  });
@@ -87,6 +132,7 @@ var ListItem = function ListItem(props) {
87
132
  type: 'changeModal',
88
133
  customModal: {
89
134
  visible: true,
135
+ type: 'custom',
90
136
  data: (0, _objectSpread3.default)((0, _objectSpread3.default)({}, getItem), value)
91
137
  }
92
138
  });
@@ -126,7 +172,12 @@ var ListItem = function ListItem(props) {
126
172
 
127
173
 
128
174
  var tagElem = function tagElem() {
129
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.map(function (v) {
175
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_tag.default, {
176
+ className: "site-tag-plus",
177
+ onClick: handleAdd
178
+ }, /*#__PURE__*/_react.default.createElement(_IconFont.default, {
179
+ type: "lmweb-plus-circle"
180
+ }), " \u65B0\u589E"), checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.map(function (v) {
130
181
  return /*#__PURE__*/_react.default.createElement(_tag.default, {
131
182
  key: v.value,
132
183
  closable: true,
@@ -134,12 +185,7 @@ var ListItem = function ListItem(props) {
134
185
  return onTagClose(v.value);
135
186
  }
136
187
  }, v.label);
137
- }), /*#__PURE__*/_react.default.createElement(_tag.default, {
138
- className: "site-tag-plus",
139
- onClick: handleAdd
140
- }, /*#__PURE__*/_react.default.createElement(_IconFont.default, {
141
- type: "lmweb-plus-circle"
142
- }), " \u65B0\u589E"));
188
+ }));
143
189
  }; // 模式
144
190
 
145
191
 
@@ -180,7 +226,8 @@ var Index = function Index() {
180
226
 
181
227
  var filterItem = (0, _react.useMemo)(function () {
182
228
  return customDrawer.data;
183
- }, [customDrawer.data]); // 过滤的内容转数组
229
+ }, [customDrawer.data]);
230
+ console.log('customDrawer', customDrawer); // 过滤的内容转数组
184
231
 
185
232
  var filterItemData = (0, _react.useMemo)(function () {
186
233
  return (0, _utils.getIsHas)(filterItem === null || filterItem === void 0 ? void 0 : filterItem.filterValues) ? Object.entries(filterItem.filterValues).map(function (v) {
@@ -271,7 +318,7 @@ var Index = function Index() {
271
318
  width: 440,
272
319
  placement: 'right',
273
320
  destroyOnClose: true,
274
- className: 'filter_drawer',
321
+ className: 'lm_filter_drawer',
275
322
  extra: /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Space, null, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
276
323
  onClick: onClose,
277
324
  size: "small"
@@ -325,7 +372,6 @@ var Index = function Index() {
325
372
  }, /*#__PURE__*/_react.default.createElement("div", {
326
373
  className: "filter_drawer_group_add"
327
374
  }, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
328
- type: "dashed",
329
375
  block: true,
330
376
  onClick: addEvent,
331
377
  icon: /*#__PURE__*/_react.default.createElement(_IconFont.default, {
@@ -341,7 +387,7 @@ var Index = function Index() {
341
387
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, resetProps, {
342
388
  className: "filter_drawer_group_item"
343
389
  }), /*#__PURE__*/_react.default.createElement(ListItem, item));
344
- }))), /*#__PURE__*/_react.default.createElement(_CustomModal.default, null)));
390
+ }))), /*#__PURE__*/_react.default.createElement(_modal.default, null)));
345
391
  };
346
392
 
347
393
  var _default = Index;
@@ -34,6 +34,8 @@ var Custom = function Custom() {
34
34
  state = _useStore.state,
35
35
  dispatch = _useStore.dispatch;
36
36
 
37
+ var size = state.instance.size;
38
+
37
39
  var _useState = (0, _react.useState)(false),
38
40
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
39
41
  visible = _useState2[0],
@@ -107,7 +109,8 @@ var Custom = function Custom() {
107
109
  }
108
110
  }, /*#__PURE__*/_react.default.createElement("div", {
109
111
  className: (0, _classnames.default)('filter_custom', {
110
- active: visible
112
+ active: visible,
113
+ small: size === 'small'
111
114
  })
112
115
  }, /*#__PURE__*/_react.default.createElement("div", {
113
116
  className: "custom_label"
@@ -24,7 +24,8 @@ var CustomGroup = function CustomGroup() {
24
24
 
25
25
  var _state$instance = state.instance,
26
26
  levelGroup = _state$instance.levelGroup,
27
- levelGroupKey = _state$instance.levelGroupKey;
27
+ levelGroupKey = _state$instance.levelGroupKey,
28
+ size = _state$instance.size;
28
29
  var defaultValue = (0, _react.useMemo)(function () {
29
30
  var _levelGroup$find;
30
31
 
@@ -50,8 +51,8 @@ var CustomGroup = function CustomGroup() {
50
51
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Radio.Group, {
51
52
  defaultValue: defaultValue,
52
53
  onChange: onChange,
53
- size: "small"
54
- }, levelGroup.map(function (v) {
54
+ size: size
55
+ }, size, levelGroup.map(function (v) {
55
56
  return /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Radio.Button, {
56
57
  key: v.value,
57
58
  value: v.value
@@ -75,6 +75,9 @@
75
75
  font-size: 14px;
76
76
  font-weight: 500;
77
77
  }
78
+ .ant-notification-notice .ant-notification-notice-content > div > div:last-child {
79
+ margin-bottom: 8px;
80
+ }
78
81
  .ant-notification-notice .ant-notification-notice-description {
79
82
  font-size: 12px;
80
83
  }
@@ -508,7 +511,7 @@ html {
508
511
  display: inline-flex;
509
512
  align-items: center;
510
513
  justify-content: space-between;
511
- height: 24px;
514
+ height: 32px;
512
515
  min-width: 100px;
513
516
  border: 1px solid var(--box-shadow-color);
514
517
  border-radius: 2px;
@@ -517,6 +520,9 @@ html {
517
520
  cursor: pointer;
518
521
  transition: 0.3s;
519
522
  }
523
+ .lm_filter_base .filter_custom.small {
524
+ height: 24px;
525
+ }
520
526
  .lm_filter_base .filter_custom .custom_label {
521
527
  padding-right: 16px;
522
528
  }
@@ -528,7 +534,7 @@ html {
528
534
  }
529
535
  .lm_filter_base .line {
530
536
  display: inline-block;
531
- height: var(--basic-height);
537
+ height: 32px;
532
538
  border-right: 1px solid #eee;
533
539
  }
534
540
  .lm_filter_base .ant-radio-button-wrapper {
@@ -540,7 +546,7 @@ html {
540
546
  .lm_filter_base .filter_item {
541
547
  display: inline-flex;
542
548
  align-items: center;
543
- height: 24px;
549
+ height: 32px;
544
550
  line-height: 1;
545
551
  border-radius: 1px;
546
552
  padding: 0 8px;
@@ -670,7 +676,7 @@ html {
670
676
  width: 100%;
671
677
  }
672
678
  .filter_dropdown .filter_body .virtual_list {
673
- min-width: 160px;
679
+ min-width: 168px;
674
680
  max-height: 224px;
675
681
  overflow: auto;
676
682
  }
@@ -685,6 +691,7 @@ html {
685
691
  transition: 0.3s;
686
692
  white-space: nowrap;
687
693
  cursor: pointer;
694
+ gap: 8px;
688
695
  }
689
696
  .filter_dropdown .filter_body .filter_item.add_more {
690
697
  border-top: 1px solid var(--stripe-color);
@@ -739,14 +746,25 @@ html {
739
746
  }
740
747
  .filter_dropdown .filter_empty {
741
748
  display: flex;
749
+ flex-flow: column;
742
750
  align-items: center;
743
751
  justify-content: center;
744
752
  font-size: 12px;
745
753
  min-height: 40px;
746
754
  color: #666;
747
- padding: 0 8px;
755
+ padding: 16px 8px;
756
+ margin: auto;
757
+ gap: 4px;
758
+ }
759
+ .filter_dropdown .filter_empty .filter_empty_text {
760
+ display: inline-flex;
761
+ align-items: center;
762
+ justify-content: center;
763
+ min-height: 20px;
764
+ color: var(--font-color);
748
765
  }
749
766
  .filter_dropdown .ant-checkbox-wrapper {
767
+ flex: 1;
750
768
  font-size: 12px;
751
769
  align-items: center;
752
770
  }
@@ -794,6 +812,7 @@ html {
794
812
  }
795
813
  .ant-drawer.lm_filter_drawer .filter_drawer_group_add .ant-btn {
796
814
  font-size: 12px;
815
+ max-width: initial;
797
816
  }
798
817
  .ant-drawer.lm_filter_drawer .filter_drawer_group_list .filter_drawer_group_item {
799
818
  margin-bottom: var(--gap);
@@ -815,6 +834,7 @@ html {
815
834
  justify-content: space-between;
816
835
  }
817
836
  .ant-drawer.lm_filter_drawer .filter_drawer_group_list .filter_drawer_group_item .item_box .item_header .item_header_title {
837
+ font-size: 12px;
818
838
  font-weight: 500;
819
839
  }
820
840
  .ant-drawer.lm_filter_drawer .filter_drawer_group_list .filter_drawer_group_item .item_box .item_header .item_header_icon {
@@ -953,6 +973,23 @@ html {
953
973
  }
954
974
  .ant-drawer.lm_det_drawer .ant-select {
955
975
  font-size: 12px;
976
+ width: 100%;
977
+ }
978
+ .ant-drawer.lm_det_drawer .custom_form {
979
+ display: flex;
980
+ flex-flow: column;
981
+ height: 100%;
982
+ gap: 24px;
983
+ }
984
+ .ant-drawer.lm_det_drawer .custom_form .custom_label {
985
+ font-size: 14px;
986
+ font-weight: 500;
987
+ margin-bottom: 16px;
988
+ }
989
+ .ant-drawer.lm_det_drawer .custom_form .custom_full {
990
+ display: flex;
991
+ flex-flow: column;
992
+ flex: 1;
956
993
  }
957
994
  .ant-modal .custom_modal .checkbox_tag {
958
995
  display: inline-flex;
@@ -1033,3 +1070,6 @@ html {
1033
1070
  .ant-select-dropdown.ant-cascader-dropdown {
1034
1071
  padding: 0;
1035
1072
  }
1073
+ .ant-select-dropdown.ant-cascader-dropdown .ant-cascader-menu-item {
1074
+ padding: 5px 8px;
1075
+ }
@@ -75,6 +75,9 @@
75
75
  font-size: 14px;
76
76
  font-weight: 500;
77
77
  }
78
+ .ant-notification-notice .ant-notification-notice-content > div > div:last-child {
79
+ margin-bottom: 8px;
80
+ }
78
81
  .ant-notification-notice .ant-notification-notice-description {
79
82
  font-size: 12px;
80
83
  }
@@ -75,6 +75,9 @@
75
75
  font-size: 14px;
76
76
  font-weight: 500;
77
77
  }
78
+ .ant-notification-notice .ant-notification-notice-content > div > div:last-child {
79
+ margin-bottom: 8px;
80
+ }
78
81
  .ant-notification-notice .ant-notification-notice-description {
79
82
  font-size: 12px;
80
83
  }
@@ -4,9 +4,11 @@ export interface IDropdownProps extends DropdownProps {
4
4
  className?: string;
5
5
  style?: React.CSSProperties;
6
6
  dropdownmatchwidth?: boolean;
7
+ onlyIcon?: boolean;
7
8
  }
8
9
  interface LmDropdownInterface extends React.FC<IDropdownProps> {
9
10
  Button?: typeof Dropdown.Button;
11
+ IconButton?: typeof Dropdown.Button;
10
12
  }
11
13
  declare const LMDropdown: LmDropdownInterface;
12
14
  export default LMDropdown;
@@ -40,7 +40,9 @@ var CLMDropdown = function CLMDropdown(props) {
40
40
  overlayClassName = props.overlayClassName,
41
41
  _props$dropdownmatchw = props.dropdownmatchwidth,
42
42
  dropdownmatchwidth = _props$dropdownmatchw === void 0 ? false : _props$dropdownmatchw,
43
- others = __rest(props, ["children", "className", "overlayClassName", "dropdownmatchwidth"]);
43
+ _props$onlyIcon = props.onlyIcon,
44
+ onlyIcon = _props$onlyIcon === void 0 ? false : _props$onlyIcon,
45
+ others = __rest(props, ["children", "className", "overlayClassName", "dropdownmatchwidth", "onlyIcon"]);
44
46
 
45
47
  var dropdownRef = (0, _react.useRef)(null);
46
48
 
@@ -50,21 +52,20 @@ var CLMDropdown = function CLMDropdown(props) {
50
52
  setMinWidth = _useState2[1];
51
53
 
52
54
  (0, _react.useEffect)(function () {
53
- var _a, _b, _c;
55
+ var _a, _b;
54
56
 
55
57
  if (dropdownmatchwidth) {
56
58
  var dropdown_dom = (_a = dropdownRef.current.getElementsByClassName("lm_dropdown")) === null || _a === void 0 ? void 0 : _a[0];
57
59
 
58
60
  if (dropdown_dom) {
59
- console.log((_b = dropdown_dom.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width);
60
- setMinWidth(((_c = dropdown_dom.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width) || '');
61
+ setMinWidth(((_b = dropdown_dom.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) || '');
61
62
  }
62
63
  }
63
64
  }, []);
64
65
 
65
66
  if (!dropdownmatchwidth) {
66
67
  return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
67
- className: (0, _classnames.default)(className, prefixCls)
68
+ className: (0, _classnames.default)(className, prefixCls, onlyIcon && 'only_icon')
68
69
  }, others, {
69
70
  overlayClassName: (0, _classnames.default)(overlayClassName, 'lm_dropdown_overlay')
70
71
  }), children);
@@ -73,7 +74,7 @@ var CLMDropdown = function CLMDropdown(props) {
73
74
  return /*#__PURE__*/_react.default.createElement("div", {
74
75
  ref: dropdownRef
75
76
  }, /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
76
- className: (0, _classnames.default)(className, prefixCls)
77
+ className: (0, _classnames.default)(className, prefixCls, onlyIcon && 'only_icon')
77
78
  }, others, {
78
79
  overlayClassName: (0, _classnames.default)(overlayClassName, 'lm_dropdown_overlay'),
79
80
  overlayStyle: minwidth ? Object.assign({
@@ -107,9 +108,7 @@ LMDropdown.Button = function (props) {
107
108
  }, []);
108
109
 
109
110
  if (!dropdownmatchwidth) {
110
- return /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({
111
- size: 'small'
112
- }, props, {
111
+ return /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({}, props, {
113
112
  overlayClassName: (0, _classnames.default)(props.overlayClassName, 'lm_dropdown_overlay'),
114
113
  className: (0, _classnames.default)(props.className, 'lm_dropdown_button', props.disabled ? 'disabled' : '')
115
114
  }));
@@ -117,9 +116,7 @@ LMDropdown.Button = function (props) {
117
116
 
118
117
  return /*#__PURE__*/_react.default.createElement("div", {
119
118
  ref: dropdownRef
120
- }, /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({
121
- size: 'small'
122
- }, props, {
119
+ }, /*#__PURE__*/_react.default.createElement(_dropdown.default.Button, Object.assign({}, props, {
123
120
  overlayClassName: (0, _classnames.default)(props.overlayClassName, 'lm_dropdown_overlay'),
124
121
  overlayStyle: minwidth ? Object.assign({
125
122
  minWidth: minwidth
@@ -75,6 +75,9 @@
75
75
  font-size: 14px;
76
76
  font-weight: 500;
77
77
  }
78
+ .ant-notification-notice .ant-notification-notice-content > div > div:last-child {
79
+ margin-bottom: 8px;
80
+ }
78
81
  .ant-notification-notice .ant-notification-notice-description {
79
82
  font-size: 12px;
80
83
  }
@@ -497,11 +500,19 @@ html {
497
500
  .card_cell_content:hover .card_cell_body .card_cell_checkbox {
498
501
  opacity: 1;
499
502
  }
503
+ .lm_dropdown.only_icon {
504
+ padding: 6px 8px;
505
+ }
506
+ .lm_dropdown_overlay > * {
507
+ max-height: 552px;
508
+ max-width: 552px;
509
+ overflow-y: auto;
510
+ }
500
511
  .lm_dropdown_overlay .ant-dropdown-menu {
501
512
  padding: 0;
502
513
  }
503
514
  .lm_dropdown_overlay .ant-dropdown-menu .ant-dropdown-menu-item {
504
- height: 32px;
515
+ min-height: 32px;
505
516
  font-size: 12px;
506
517
  }
507
518
  .lm_dropdown_overlay .ant-dropdown-menu .ant-dropdown-menu-item:hover {
@@ -519,7 +530,7 @@ html {
519
530
  box-sizing: content-box;
520
531
  }
521
532
  .lm_dropdown_button .ant-btn {
522
- height: 22px;
533
+ height: 30px;
523
534
  border-top: 0px;
524
535
  border-bottom: 0px;
525
536
  }
@@ -528,6 +539,8 @@ html {
528
539
  }
529
540
  .lm_dropdown_button .ant-btn:first-child {
530
541
  border-left: 0px;
542
+ padding-left: 12px;
543
+ padding-right: 12px;
531
544
  }
532
545
  .lm_dropdown_button .ant-btn:last-child {
533
546
  border-right: 0px;
@@ -75,6 +75,9 @@
75
75
  font-size: 14px;
76
76
  font-weight: 500;
77
77
  }
78
+ .ant-notification-notice .ant-notification-notice-content > div > div:last-child {
79
+ margin-bottom: 8px;
80
+ }
78
81
  .ant-notification-notice .ant-notification-notice-description {
79
82
  font-size: 12px;
80
83
  }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { Empty } from 'antd';
3
+ export interface IEmptyProps {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ }
7
+ export default Empty;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ require("antd/es/empty/style");
11
+
12
+ var _empty = _interopRequireDefault(require("antd/es/empty"));
13
+
14
+ var _default = _empty.default;
15
+ exports.default = _default;