linkmore-design 1.0.68 → 1.0.71

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 (314) hide show
  1. package/README.md +11 -7
  2. package/dist/Approval/demos/basic.d.ts +1 -0
  3. package/dist/ImageViewer/LmImageViewer.d.ts +5 -0
  4. package/dist/ImageViewer/demos/basic.d.ts +2 -0
  5. package/dist/ImageViewer/index.d.ts +2 -0
  6. package/dist/ImageViewer/style/index.d.ts +1 -0
  7. package/dist/ImageViewer/wrapeer/Root.d.ts +3 -0
  8. package/dist/LmFilter/components/InputFilter.d.ts +2 -2
  9. package/dist/LmFilter/filterFns/index.d.ts +1 -1
  10. package/dist/LmFilter/localization.d.ts +1 -0
  11. package/dist/LmFilter/utils.d.ts +1 -1
  12. package/dist/LmSelect/useCheckboxOptions.d.ts +1 -0
  13. package/dist/LmUpload/LmUpload.d.ts +2 -0
  14. package/dist/LmUpload/UploadList/ItemPicture.d.ts +2 -1
  15. package/dist/LmUpload/UploadList/ItemText.d.ts +2 -1
  16. package/dist/LmUpload/UploadList/RenderItem.d.ts +1 -5
  17. package/dist/LmUpload/UploadList/index.d.ts +4 -3
  18. package/dist/LmUpload/demos/card.d.ts +2 -0
  19. package/dist/LmUpload/demos/picture.d.ts +2 -0
  20. package/dist/LmUpload/fns/index.d.ts +5 -0
  21. package/dist/LmUpload/utils.d.ts +1 -0
  22. package/dist/LmUpload/wrapper/UploadContainer.d.ts +4 -3
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.umd.js +4081 -603
  25. package/dist/index.umd.min.js +6 -6
  26. package/es/Affix/style/index.css +6 -0
  27. package/es/Alert/style/index.css +6 -0
  28. package/es/Approval/index.js +4 -4
  29. package/es/Approval/style/index.css +18 -4
  30. package/es/AutoComplete/style/index.css +6 -0
  31. package/es/Avatar/style/index.css +6 -0
  32. package/es/Breadcrumb/style/index.css +6 -0
  33. package/es/ButtonTags/style/index.css +6 -0
  34. package/es/Calendar/style/index.css +6 -0
  35. package/es/Card/style/index.css +6 -0
  36. package/es/CardTable/fns/index.js +5 -8
  37. package/es/CardTable/table/TableRoot.js +2 -1
  38. package/es/Carousel/style/index.css +6 -0
  39. package/es/Cascader/style/index.css +6 -0
  40. package/es/CkFilter/complexFilter/drawer.js +1 -4
  41. package/es/CkFilter/complexFilter/saveModal.js +5 -7
  42. package/es/CkFilter/components/CustomModal.js +2 -3
  43. package/es/CkFilter/components/filterTypes.js +1 -3
  44. package/es/CkFilter/components/modal.js +2 -5
  45. package/es/CkFilter/components/modalBack.js +2 -3
  46. package/es/CkFilter/customFilter/drawer.js +6 -11
  47. package/es/CkFilter/style/index.css +6 -0
  48. package/es/Col/style/index.css +6 -0
  49. package/es/Collapse/style/index.css +6 -0
  50. package/es/Comment/style/index.css +6 -0
  51. package/es/CustomTableOption/style/index.css +6 -0
  52. package/es/CustomerService/style/index.css +6 -0
  53. package/es/DatePicker/style/index.css +6 -0
  54. package/es/Descriptions/style/index.css +6 -0
  55. package/es/Drawer/style/index.css +6 -0
  56. package/es/Dropdown/style/index.css +6 -0
  57. package/es/EditTable/style/index.css +6 -0
  58. package/es/Empty/style/index.css +6 -0
  59. package/es/Filter/baseFilter/Popover.js +0 -1
  60. package/es/Filter/baseFilter/ToggleFilter.js +0 -1
  61. package/es/Filter/edit/editFilter.js +2 -6
  62. package/es/Filter/remember.js +0 -1
  63. package/es/Filter/style/index.css +6 -0
  64. package/es/Form/style/index.css +6 -0
  65. package/es/Grid/style/index.css +6 -0
  66. package/es/Icon/style/index.css +6 -0
  67. package/es/IconFont/font/iconfont.js +1 -1
  68. package/es/Image/style/index.css +6 -0
  69. package/es/ImageViewer/LmImageViewer.d.ts +5 -0
  70. package/es/ImageViewer/LmImageViewer.js +26 -0
  71. package/es/ImageViewer/index.d.ts +2 -0
  72. package/es/ImageViewer/index.js +2 -0
  73. package/es/ImageViewer/style/index.css +211 -0
  74. package/es/ImageViewer/style/index.js +3 -0
  75. package/es/ImageViewer/wrapeer/Root.d.ts +3 -0
  76. package/es/ImageViewer/wrapeer/Root.js +12 -0
  77. package/es/Input/style/index.css +6 -0
  78. package/es/InputNumber/style/index.css +6 -0
  79. package/es/Layout/style/index.css +6 -0
  80. package/es/LeftTable/style/index.css +6 -0
  81. package/es/List/style/index.css +6 -0
  82. package/es/LmEditTable/style/index.css +6 -0
  83. package/es/LmFilter/complexFilter/drawer.js +2 -7
  84. package/es/LmFilter/complexFilter/valueDrawer.js +2 -5
  85. package/es/LmFilter/components/CascaderFilter.js +3 -2
  86. package/es/LmFilter/components/CheckboxFilter.js +3 -3
  87. package/es/LmFilter/components/DropdownFIlter.js +71 -65
  88. package/es/LmFilter/components/InputFilter.js +1 -2
  89. package/es/LmFilter/components/SelectFilter.js +2 -2
  90. package/es/LmFilter/components/index.js +7 -5
  91. package/es/LmFilter/customFilter/drawer.js +7 -25
  92. package/es/LmFilter/customFilter/saveModal.js +2 -3
  93. package/es/LmFilter/customFilter/valueDrawer.js +2 -5
  94. package/es/LmFilter/filterFns/index.js +4 -6
  95. package/es/LmFilter/localization.d.ts +1 -0
  96. package/es/LmFilter/localization.js +2 -1
  97. package/es/LmFilter/utils.js +41 -22
  98. package/es/LmFilter/wrapper/FilterRoot.js +0 -2
  99. package/es/LmSelect/style/index.css +6 -0
  100. package/es/LmSelect/useCheckboxOptions.d.ts +1 -0
  101. package/es/LmSelect/useCheckboxOptions.js +4 -3
  102. package/es/LmTable/Table.js +0 -1
  103. package/es/LmTable/autosize.js +0 -3
  104. package/es/LmTable/style/index.css +6 -0
  105. package/es/LmUpload/LmUpload.d.ts +2 -0
  106. package/es/LmUpload/LmUpload.js +54 -22
  107. package/es/LmUpload/UploadList/ItemPicture.d.ts +2 -1
  108. package/es/LmUpload/UploadList/ItemPicture.js +23 -8
  109. package/es/LmUpload/UploadList/ItemPictureCard.js +18 -9
  110. package/es/LmUpload/UploadList/ItemText.d.ts +2 -1
  111. package/es/LmUpload/UploadList/ItemText.js +13 -7
  112. package/es/LmUpload/UploadList/RenderItem.d.ts +1 -5
  113. package/es/LmUpload/UploadList/RenderItem.js +3 -3
  114. package/es/LmUpload/UploadList/index.d.ts +4 -3
  115. package/es/LmUpload/UploadList/index.js +14 -8
  116. package/es/LmUpload/body/Progress.js +2 -2
  117. package/es/LmUpload/body/UploadCore.js +5 -4
  118. package/es/LmUpload/body/UploadPicture.js +4 -4
  119. package/es/LmUpload/fns/index.d.ts +5 -0
  120. package/es/LmUpload/fns/index.js +138 -42
  121. package/es/LmUpload/style/index.css +6 -0
  122. package/es/LmUpload/utils.d.ts +1 -0
  123. package/es/LmUpload/utils.js +14 -1
  124. package/es/LmUpload/view/index.js +2 -2
  125. package/es/LmUpload/wrapper/UploadContainer.d.ts +4 -3
  126. package/es/LmUpload/wrapper/UploadContainer.js +19 -3
  127. package/es/LmUpload/wrapper/UploadRoot.js +9 -1
  128. package/es/LmUpload/wrapper/UploadWrapper.js +4 -8
  129. package/es/LmUpload/wrapper/reducer.js +2 -1
  130. package/es/Mentions/style/index.css +6 -0
  131. package/es/Menu/style/index.css +6 -0
  132. package/es/Modal/style/index.css +6 -0
  133. package/es/PageHeader/style/index.css +6 -0
  134. package/es/Pagination/style/index.css +6 -0
  135. package/es/PopTable/style/index.css +6 -0
  136. package/es/Popconfirm/style/index.css +6 -0
  137. package/es/Popover/style/index.css +6 -0
  138. package/es/ProTable/Table.js +0 -1
  139. package/es/ProTable/autosize.js +0 -3
  140. package/es/ProTable/style/index.css +6 -0
  141. package/es/Progress/style/index.css +6 -0
  142. package/es/QuickMenu/style/index.css +6 -0
  143. package/es/Rate/style/index.css +6 -0
  144. package/es/Row/style/index.css +6 -0
  145. package/es/Segmented/style/index.css +6 -0
  146. package/es/Select/style/index.css +6 -0
  147. package/es/Slider/style/index.css +6 -0
  148. package/es/Space/style/index.css +6 -0
  149. package/es/Spin/style/index.css +6 -0
  150. package/es/Statistic/style/index.css +6 -0
  151. package/es/Steps/style/index.css +6 -0
  152. package/es/Switch/style/index.css +6 -0
  153. package/es/Table/style/index.css +6 -0
  154. package/es/Tabs/style/index.css +6 -0
  155. package/es/Tag/style/index.css +6 -0
  156. package/es/TimePicker/style/index.css +6 -0
  157. package/es/Timeline/style/index.css +6 -0
  158. package/es/Tooltip/style/index.css +6 -0
  159. package/es/Transfer/style/index.css +6 -0
  160. package/es/Tree/style/index.css +6 -0
  161. package/es/TreeSelect/style/index.css +6 -0
  162. package/es/Typography/style/index.css +6 -0
  163. package/es/Upload/style/index.css +6 -0
  164. package/es/index.d.ts +1 -0
  165. package/es/index.js +1 -0
  166. package/es/message/style/index.css +6 -0
  167. package/es/notification/style/index.css +6 -0
  168. package/es/styles/main.css +6 -0
  169. package/es/styles/resetAntd.css +3 -0
  170. package/lib/Affix/style/index.css +6 -0
  171. package/lib/Alert/style/index.css +6 -0
  172. package/lib/Approval/index.js +4 -4
  173. package/lib/Approval/style/index.css +18 -4
  174. package/lib/AutoComplete/style/index.css +6 -0
  175. package/lib/Avatar/style/index.css +6 -0
  176. package/lib/Breadcrumb/style/index.css +6 -0
  177. package/lib/ButtonTags/style/index.css +6 -0
  178. package/lib/Calendar/style/index.css +6 -0
  179. package/lib/Card/style/index.css +6 -0
  180. package/lib/CardTable/fns/index.js +5 -8
  181. package/lib/CardTable/table/TableRoot.js +2 -1
  182. package/lib/Carousel/style/index.css +6 -0
  183. package/lib/Cascader/style/index.css +6 -0
  184. package/lib/CkFilter/complexFilter/drawer.js +1 -4
  185. package/lib/CkFilter/complexFilter/saveModal.js +5 -7
  186. package/lib/CkFilter/components/CustomModal.js +2 -3
  187. package/lib/CkFilter/components/filterTypes.js +1 -3
  188. package/lib/CkFilter/components/modal.js +2 -5
  189. package/lib/CkFilter/components/modalBack.js +2 -3
  190. package/lib/CkFilter/customFilter/drawer.js +6 -11
  191. package/lib/CkFilter/style/index.css +6 -0
  192. package/lib/Col/style/index.css +6 -0
  193. package/lib/Collapse/style/index.css +6 -0
  194. package/lib/Comment/style/index.css +6 -0
  195. package/lib/CustomTableOption/style/index.css +6 -0
  196. package/lib/CustomerService/style/index.css +6 -0
  197. package/lib/DatePicker/style/index.css +6 -0
  198. package/lib/Descriptions/style/index.css +6 -0
  199. package/lib/Drawer/style/index.css +6 -0
  200. package/lib/Dropdown/style/index.css +6 -0
  201. package/lib/EditTable/style/index.css +6 -0
  202. package/lib/Empty/style/index.css +6 -0
  203. package/lib/Filter/baseFilter/Popover.js +0 -1
  204. package/lib/Filter/baseFilter/ToggleFilter.js +0 -1
  205. package/lib/Filter/edit/editFilter.js +2 -6
  206. package/lib/Filter/remember.js +0 -1
  207. package/lib/Filter/style/index.css +6 -0
  208. package/lib/Form/style/index.css +6 -0
  209. package/lib/Grid/style/index.css +6 -0
  210. package/lib/Icon/style/index.css +6 -0
  211. package/lib/IconFont/font/iconfont.js +1 -1
  212. package/lib/Image/style/index.css +6 -0
  213. package/lib/ImageViewer/LmImageViewer.d.ts +5 -0
  214. package/lib/ImageViewer/LmImageViewer.js +40 -0
  215. package/lib/ImageViewer/index.d.ts +2 -0
  216. package/lib/ImageViewer/index.js +13 -0
  217. package/lib/ImageViewer/style/index.css +211 -0
  218. package/lib/ImageViewer/style/index.js +3 -0
  219. package/lib/ImageViewer/wrapeer/Root.d.ts +3 -0
  220. package/lib/ImageViewer/wrapeer/Root.js +23 -0
  221. package/lib/Input/style/index.css +6 -0
  222. package/lib/InputNumber/style/index.css +6 -0
  223. package/lib/Layout/style/index.css +6 -0
  224. package/lib/LeftTable/style/index.css +6 -0
  225. package/lib/List/style/index.css +6 -0
  226. package/lib/LmEditTable/style/index.css +6 -0
  227. package/lib/LmFilter/complexFilter/drawer.js +2 -7
  228. package/lib/LmFilter/complexFilter/valueDrawer.js +2 -5
  229. package/lib/LmFilter/components/CascaderFilter.js +3 -2
  230. package/lib/LmFilter/components/CheckboxFilter.js +3 -3
  231. package/lib/LmFilter/components/DropdownFIlter.js +71 -65
  232. package/lib/LmFilter/components/InputFilter.js +1 -2
  233. package/lib/LmFilter/components/SelectFilter.js +2 -2
  234. package/lib/LmFilter/components/index.js +7 -5
  235. package/lib/LmFilter/customFilter/drawer.js +7 -25
  236. package/lib/LmFilter/customFilter/saveModal.js +2 -3
  237. package/lib/LmFilter/customFilter/valueDrawer.js +2 -5
  238. package/lib/LmFilter/filterFns/index.js +4 -6
  239. package/lib/LmFilter/localization.d.ts +1 -0
  240. package/lib/LmFilter/localization.js +4 -2
  241. package/lib/LmFilter/utils.js +41 -22
  242. package/lib/LmFilter/wrapper/FilterRoot.js +0 -2
  243. package/lib/LmSelect/style/index.css +6 -0
  244. package/lib/LmSelect/useCheckboxOptions.d.ts +1 -0
  245. package/lib/LmSelect/useCheckboxOptions.js +7 -5
  246. package/lib/LmTable/Table.js +0 -1
  247. package/lib/LmTable/autosize.js +0 -3
  248. package/lib/LmTable/style/index.css +6 -0
  249. package/lib/LmUpload/LmUpload.d.ts +2 -0
  250. package/lib/LmUpload/LmUpload.js +53 -22
  251. package/lib/LmUpload/UploadList/ItemPicture.d.ts +2 -1
  252. package/lib/LmUpload/UploadList/ItemPicture.js +26 -8
  253. package/lib/LmUpload/UploadList/ItemPictureCard.js +18 -9
  254. package/lib/LmUpload/UploadList/ItemText.d.ts +2 -1
  255. package/lib/LmUpload/UploadList/ItemText.js +16 -7
  256. package/lib/LmUpload/UploadList/RenderItem.d.ts +1 -5
  257. package/lib/LmUpload/UploadList/RenderItem.js +3 -3
  258. package/lib/LmUpload/UploadList/index.d.ts +4 -3
  259. package/lib/LmUpload/UploadList/index.js +15 -10
  260. package/lib/LmUpload/body/Progress.js +2 -2
  261. package/lib/LmUpload/body/UploadCore.js +10 -9
  262. package/lib/LmUpload/body/UploadPicture.js +4 -4
  263. package/lib/LmUpload/fns/index.d.ts +5 -0
  264. package/lib/LmUpload/fns/index.js +138 -42
  265. package/lib/LmUpload/style/index.css +6 -0
  266. package/lib/LmUpload/utils.d.ts +1 -0
  267. package/lib/LmUpload/utils.js +16 -1
  268. package/lib/LmUpload/view/index.js +2 -2
  269. package/lib/LmUpload/wrapper/UploadContainer.d.ts +4 -3
  270. package/lib/LmUpload/wrapper/UploadContainer.js +21 -3
  271. package/lib/LmUpload/wrapper/UploadRoot.js +9 -1
  272. package/lib/LmUpload/wrapper/UploadWrapper.js +5 -12
  273. package/lib/LmUpload/wrapper/reducer.js +2 -1
  274. package/lib/Mentions/style/index.css +6 -0
  275. package/lib/Menu/style/index.css +6 -0
  276. package/lib/Modal/style/index.css +6 -0
  277. package/lib/PageHeader/style/index.css +6 -0
  278. package/lib/Pagination/style/index.css +6 -0
  279. package/lib/PopTable/style/index.css +6 -0
  280. package/lib/Popconfirm/style/index.css +6 -0
  281. package/lib/Popover/style/index.css +6 -0
  282. package/lib/ProTable/Table.js +0 -1
  283. package/lib/ProTable/autosize.js +0 -3
  284. package/lib/ProTable/style/index.css +6 -0
  285. package/lib/Progress/style/index.css +6 -0
  286. package/lib/QuickMenu/style/index.css +6 -0
  287. package/lib/Rate/style/index.css +6 -0
  288. package/lib/Row/style/index.css +6 -0
  289. package/lib/Segmented/style/index.css +6 -0
  290. package/lib/Select/style/index.css +6 -0
  291. package/lib/Slider/style/index.css +6 -0
  292. package/lib/Space/style/index.css +6 -0
  293. package/lib/Spin/style/index.css +6 -0
  294. package/lib/Statistic/style/index.css +6 -0
  295. package/lib/Steps/style/index.css +6 -0
  296. package/lib/Switch/style/index.css +6 -0
  297. package/lib/Table/style/index.css +6 -0
  298. package/lib/Tabs/style/index.css +6 -0
  299. package/lib/Tag/style/index.css +6 -0
  300. package/lib/TimePicker/style/index.css +6 -0
  301. package/lib/Timeline/style/index.css +6 -0
  302. package/lib/Tooltip/style/index.css +6 -0
  303. package/lib/Transfer/style/index.css +6 -0
  304. package/lib/Tree/style/index.css +6 -0
  305. package/lib/TreeSelect/style/index.css +6 -0
  306. package/lib/Typography/style/index.css +6 -0
  307. package/lib/Upload/style/index.css +6 -0
  308. package/lib/index.d.ts +1 -0
  309. package/lib/index.js +8 -0
  310. package/lib/message/style/index.css +6 -0
  311. package/lib/notification/style/index.css +6 -0
  312. package/lib/styles/main.css +6 -0
  313. package/lib/styles/resetAntd.css +3 -0
  314. package/package.json +2 -1
@@ -14,11 +14,11 @@ var __rest = this && this.__rest || function (s, e) {
14
14
  return t;
15
15
  };
16
16
 
17
- import { useEvent } from '../hooks';
18
17
  import { useControllableValue } from 'ahooks';
19
18
  import classNames from 'classnames';
20
19
  import { Checkbox, VirtualList } from 'linkmore-design';
21
20
  import React, { useMemo } from 'react';
21
+ import { useEvent } from '../hooks';
22
22
  import { onStringSearch } from './utils';
23
23
 
24
24
  var imgEmpty = require('./icon_placeholder.png');
@@ -53,7 +53,7 @@ export var useCheckboxOptions = function useCheckboxOptions(options, _ref) {
53
53
 
54
54
  var renderOptions = useMemo(function () {
55
55
  return options.filter(function (v) {
56
- return onStringSearch(filter, v.label);
56
+ return !v.disabled && onStringSearch(filter, v.label);
57
57
  });
58
58
  }, [options, filter]); // 是否全选: 选中的数据大于等于筛选后的数据 && 筛选后的数据全部存在于选中的数据中
59
59
 
@@ -124,4 +124,5 @@ export var useCheckboxOptions = function useCheckboxOptions(options, _ref) {
124
124
  className: "filter_item-content"
125
125
  }, item.label));
126
126
  }), !renderOptions.length && /*#__PURE__*/React.createElement(FilterEmpty, null)));
127
- };
127
+ };
128
+ export default useCheckboxOptions;
@@ -158,7 +158,6 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
158
158
  var newIndex = columns.findIndex(function (item) {
159
159
  return item.dataIndex === over;
160
160
  });
161
- console.log((0, _sortable.arrayMove)(columns, oldIndex, newIndex), 222);
162
161
  filterChange === null || filterChange === void 0 ? void 0 : filterChange((0, _sortable.arrayMove)(columns, oldIndex, newIndex).map(function (item, index) {
163
162
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
164
163
  order: index
@@ -48,7 +48,6 @@ var AutoSizer = /*#__PURE__*/function (_React$Component) {
48
48
  _this._detectElementResize = void 0;
49
49
 
50
50
  _this._onResize = function () {
51
- console.log(11);
52
51
  var _this$props = _this.props,
53
52
  disableHeight = _this$props.disableHeight,
54
53
  disableWidth = _this$props.disableWidth,
@@ -109,8 +108,6 @@ var AutoSizer = /*#__PURE__*/function (_React$Component) {
109
108
 
110
109
  this._detectElementResize.addResizeListener(this._parentNode, this.handleResize);
111
110
 
112
- console.log(3);
113
-
114
111
  this._onResize();
115
112
  }
116
113
  }
@@ -81,6 +81,9 @@
81
81
  .ant-notification-notice .ant-notification-notice-description {
82
82
  font-size: 12px;
83
83
  }
84
+ .ant-collapse {
85
+ font-size: 12px;
86
+ }
84
87
  @font-face {
85
88
  font-family: 'iconfont';
86
89
  /* Project id 2966019 */
@@ -503,6 +506,9 @@ html {
503
506
  .card_cell_content:hover .card_cell_body .card_cell_checkbox {
504
507
  opacity: 1;
505
508
  }
509
+ p {
510
+ margin-bottom: 0;
511
+ }
506
512
  .z_container {
507
513
  position: relative;
508
514
  display: flex;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  declare const _default: React.ForwardRefExoticComponent<Pick<{
3
3
  [x: string]: any;
4
+ fileConfig: any;
5
+ components: any;
4
6
  ossConfig: any;
5
7
  }, string | number> & React.RefAttributes<unknown>>;
6
8
  export default _default;
@@ -11,17 +11,49 @@ var __rest = this && this.__rest || function (s, e) {
11
11
  return t;
12
12
  };
13
13
 
14
- import React, { useRef, forwardRef } from 'react';
14
+ import React, { useRef, useMemo, forwardRef } from 'react';
15
15
  import LmFilterRoot from './wrapper/UploadRoot';
16
- var stsToken = 'CAISjgJ1q6Ft5B2yfSjIr5eDGdHdi5RigKuYR2fGhUcBaOEfmKHYijz2IH5IenZuA+gYtf8ymm1Q5v8ZloAvFs4YbR3KPJco48QJtA/9aoGE5cW7tfkIhJasXDPCBRPyjJ+OaLn0RYseuA94rQiW+BVoyJ7WKB+APTX8Q7Dr5LdjatMIJHraCRNNGNZRICZ7tcYeLgG/HP2xMxns8AGyZQgSzWgas25k7rmlycCx8wfXiEaAqtUYvIPsOJOpHaIOVdVdK47tgr0pLfeRinQNukYSpPhM4fYaqWudjLa0GEJM5hiKCe3Q/+B0IRVxDqpAQPAY8qeiz6Um4beOydmvm08WJ49SSD/FTYWwXwx6zT9crb8agAE/AmQIq01ud7Oe11GaycEGpfRMjSM7w3GYv7WZPtY7dlVJemeghJDOuoOjPuu+WigsrFqJr4LCXB44EvoV4tTBz9NrFdJ8T1JPD5nCQ15TSifXJMjym4tWeOTVRiZk04N27cXgD3YYj7s9wOFMsUsenZR6WulrHhyUEwyjb9fGcQ==';
17
16
 
18
17
  var LmUpload = function LmUpload(_a, ref) {
19
- var ossConfig = _a.ossConfig,
20
- resetProps = __rest(_a, ["ossConfig"]);
18
+ var fileConfig = _a.fileConfig,
19
+ components = _a.components,
20
+ _ossConfig = _a.ossConfig,
21
+ resetProps = __rest(_a, ["fileConfig", "components", "ossConfig"]);
21
22
 
22
- var defaultRef = useRef(null);
23
+ var defaultRef = useRef(null); // 仅在初始化触发一次
24
+
25
+ var initConfig = useMemo(function () {
26
+ return {
27
+ // 文件配置单独存储
28
+ fileConfig: Object.assign({
29
+ size: 10,
30
+ type: ['jpg', 'jpeg', 'png'],
31
+ maxCount: 99
32
+ }, fileConfig || {}),
33
+ // 读取字段配置
34
+ fileNames: {
35
+ uid: 'uid',
36
+ fileTypeCode: 'fileTypeCode',
37
+ fileTypeName: 'fileTypeName',
38
+ fileName: 'fileName',
39
+ realFileName: 'realFileName',
40
+ fileSize: 'fileSize',
41
+ internalUrl: 'internalUrl',
42
+ externalUrl: 'externalUrl',
43
+ filePath: 'filePath',
44
+ seq: 'seq',
45
+ url: 'url'
46
+ },
47
+ // 初始化
48
+ components: Object.assign({
49
+ itemRender: null,
50
+ wrapper: null
51
+ }, components || {})
52
+ };
53
+ }, []);
23
54
  var defaultProps = {
24
- value: [],
55
+ uid: 'uid',
56
+ fileList: null,
25
57
  type: ['jpg', 'jpeg', 'png'],
26
58
  accept: '',
27
59
  fileSize: 10,
@@ -29,30 +61,30 @@ var LmUpload = function LmUpload(_a, ref) {
29
61
  size: 100,
30
62
  disabled: false,
31
63
  maxCount: null,
64
+ showUploadList: true,
32
65
  children: null,
33
66
  defaultFileList: [],
34
67
  itemRender: null,
35
- components: {
36
- // 包装结构体: 上传, 列表
37
- wrapper: function wrapper(upload, fileList) {
38
- return /*#__PURE__*/React.createElement(React.Fragment, null, upload, fileList);
39
- }
68
+ onRemove: function onRemove() {
69
+ return true;
40
70
  },
71
+ enabledOss: false,
41
72
  // oss配置
42
- ossConfig: Object.assign({
43
- dir: '/BizFile/4595/Supplier/',
44
- region: 'oss-cn-hangzhou',
45
- accessKeyId: 'STS.NT6RkifKC7isEAwaGTdn3wdsh',
46
- accessKeySecret: '2iKmXAauEr1M8W8ZaRGgfVABJJWsb2cBFYP7s9rPGJT8',
47
- // aks
48
- stsToken: stsToken,
49
- bucket: 'linkmore-scm-test',
50
- shortlink: 'https://linkmore-scm-test.oss-cn-hangzhou.aliyuncs.com'
51
- }, ossConfig)
73
+ ossConfig: function ossConfig() {
74
+ return Object.assign({
75
+ dir: '/BizFile/4595/Supplier/',
76
+ region: 'oss-cn-hangzhou',
77
+ accessKeyId: '',
78
+ accessKeySecret: '',
79
+ stsToken: '',
80
+ bucket: 'linkmore-scm-test',
81
+ shortlink: 'https://linkmore-scm-test.oss-cn-hangzhou.aliyuncs.com'
82
+ }, typeof _ossConfig === 'function' ? _ossConfig() : _ossConfig);
83
+ }
52
84
  };
53
85
  return /*#__PURE__*/React.createElement(LmFilterRoot, Object.assign({
54
86
  ref: ref || defaultRef
55
- }, defaultProps, resetProps));
87
+ }, initConfig, defaultProps, resetProps));
56
88
  };
57
89
 
58
90
  export default /*#__PURE__*/forwardRef(LmUpload);
@@ -1,4 +1,5 @@
1
- declare const PictureItem: ({ file }: {
1
+ declare const PictureItem: ({ file, instance }: {
2
2
  file: any;
3
+ instance: any;
3
4
  }) => JSX.Element;
4
5
  export default PictureItem;
@@ -1,22 +1,37 @@
1
1
  import * as React from 'react';
2
+ import cn from 'classnames';
2
3
  import { IconFont } from 'linkmore-design'; // 图片列表项
3
4
 
4
5
  var PictureItem = function PictureItem(_ref) {
5
- var file = _ref.file;
6
+ var file = _ref.file,
7
+ instance = _ref.instance;
8
+ var remove = instance.remove,
9
+ preview = instance.preview,
10
+ download = instance.download;
6
11
  return /*#__PURE__*/React.createElement("div", {
7
- className: 'lm_upload_item lm_upload_item_picture'
12
+ className: cn('lm_upload_item lm_upload_item_picture', file.status === 'error' && 'error')
8
13
  }, /*#__PURE__*/React.createElement("div", {
9
- className: 'picture_left'
14
+ className: "picture_left"
10
15
  }, /*#__PURE__*/React.createElement("div", {
11
- className: 'lm_upload_item_thumb'
16
+ className: "lm_upload_item_thumb",
17
+ onClick: function onClick() {
18
+ return preview(file);
19
+ }
12
20
  }, /*#__PURE__*/React.createElement("img", {
13
- src: file.url
21
+ src: file.url,
22
+ alt: ""
14
23
  })), /*#__PURE__*/React.createElement("div", {
15
- className: 'lm_upload_item_name'
24
+ className: "lm_upload_item_name",
25
+ onClick: function onClick() {
26
+ return download(file);
27
+ }
16
28
  }, file.fileName)), /*#__PURE__*/React.createElement("div", {
17
- className: 'picture_right lm_upload_item_action'
29
+ className: "picture_right lm_upload_item_action"
18
30
  }, /*#__PURE__*/React.createElement("div", {
19
- className: 'action_delete'
31
+ className: "action_delete",
32
+ onClick: function onClick() {
33
+ return remove(file);
34
+ }
20
35
  }, /*#__PURE__*/React.createElement(IconFont, {
21
36
  type: "lmweb-delete"
22
37
  }))));
@@ -14,11 +14,11 @@ var renderThumb = function renderThumb(file) {
14
14
  case 'png':
15
15
  case 'jpg':
16
16
  return /*#__PURE__*/React.createElement("div", {
17
- className: 'lm_upload_item_error'
17
+ className: "lm_upload_item_error"
18
18
  }, /*#__PURE__*/React.createElement(IconFont, {
19
19
  type: "lmweb-image"
20
20
  }), /*#__PURE__*/React.createElement("div", {
21
- className: 'lm_upload_item_name'
21
+ className: "lm_upload_item_name"
22
22
  }, file.realFileName));
23
23
 
24
24
  case 'doc':
@@ -55,7 +55,9 @@ var renderThumb = function renderThumb(file) {
55
55
  var PictureItem = function PictureItem(_ref) {
56
56
  var file = _ref.file,
57
57
  instance = _ref.instance;
58
- var size = instance.size;
58
+ var size = instance.size,
59
+ remove = instance.remove,
60
+ preview = instance.preview;
59
61
 
60
62
  var _useState = useState(false),
61
63
  _useState2 = _slicedToArray(_useState, 2),
@@ -72,7 +74,8 @@ var PictureItem = function PictureItem(_ref) {
72
74
 
73
75
  var thumbUrl = useMemo(function () {
74
76
  return "".concat(file.url, "?x-oss-process=image/resize,w_").concat(size);
75
- }, [file.url, size]);
77
+ }, [file.url, size]); // 根据文件名后缀判断
78
+
76
79
  var isImg = useMemo(function () {
77
80
  return ['jpg', 'jpeg', 'png', 'gif', 'bmp'].includes(resetFile.fileExtension);
78
81
  }, [resetFile]); // 重置尺寸大小
@@ -94,7 +97,7 @@ var PictureItem = function PictureItem(_ref) {
94
97
  width: size
95
98
  }
96
99
  }, /*#__PURE__*/React.createElement("div", {
97
- className: 'lm_upload_item_thumb'
100
+ className: "lm_upload_item_thumb"
98
101
  }, isError || !isImg ? renderThumb(resetFile) : /*#__PURE__*/React.createElement(Image, {
99
102
  width: resetSize.width,
100
103
  height: resetSize.width,
@@ -103,18 +106,24 @@ var PictureItem = function PictureItem(_ref) {
103
106
  return setIsError(true);
104
107
  }
105
108
  })), /*#__PURE__*/React.createElement("div", {
106
- className: 'lm_upload_item_mask'
109
+ className: "lm_upload_item_mask"
107
110
  }, /*#__PURE__*/React.createElement("div", {
108
- className: 'lm_upload_item_action'
111
+ className: "lm_upload_item_action"
109
112
  }, /*#__PURE__*/React.createElement("div", {
110
- className: 'action_preview'
113
+ className: "action_preview",
114
+ onClick: function onClick() {
115
+ return preview(file);
116
+ }
111
117
  }, /*#__PURE__*/React.createElement(IconFont, {
112
118
  type: "lmweb-eye",
113
119
  style: {
114
120
  fontSize: size > 48 ? 16 : 12
115
121
  }
116
122
  })), /*#__PURE__*/React.createElement("div", {
117
- className: 'action_delete'
123
+ className: "action_delete",
124
+ onClick: function onClick() {
125
+ return remove(file);
126
+ }
118
127
  }, /*#__PURE__*/React.createElement(IconFont, {
119
128
  type: "lmweb-delete",
120
129
  style: {
@@ -1,4 +1,5 @@
1
- declare const TextItem: ({ file }: {
1
+ declare const TextItem: ({ file, instance }: {
2
2
  file: any;
3
+ instance: any;
3
4
  }) => JSX.Element;
4
5
  export default TextItem;
@@ -1,22 +1,28 @@
1
1
  import * as React from 'react';
2
+ import cn from 'classnames';
2
3
  import { IconFont } from 'linkmore-design';
3
4
 
4
5
  var TextItem = function TextItem(_ref) {
5
- var file = _ref.file;
6
+ var file = _ref.file,
7
+ instance = _ref.instance;
8
+ var remove = instance.remove;
6
9
  return /*#__PURE__*/React.createElement("div", {
7
- className: 'lm_upload_item lm_upload_item_text'
10
+ className: cn('lm_upload_item lm_upload_item_text', file.status === 'error' && 'error')
8
11
  }, /*#__PURE__*/React.createElement("div", {
9
- className: 'text_left'
12
+ className: "text_left"
10
13
  }, /*#__PURE__*/React.createElement("div", {
11
- className: 'prefix'
14
+ className: "prefix"
12
15
  }, /*#__PURE__*/React.createElement(IconFont, {
13
16
  type: "lmweb-attachment"
14
17
  })), /*#__PURE__*/React.createElement("div", {
15
- className: 'lm_upload_item_name'
18
+ className: "lm_upload_item_name"
16
19
  }, file.fileName)), /*#__PURE__*/React.createElement("div", {
17
- className: 'text_right lm_upload_item_text_action'
20
+ className: "text_right lm_upload_item_text_action"
18
21
  }, /*#__PURE__*/React.createElement("div", {
19
- className: 'action_delete'
22
+ className: "action_delete",
23
+ onClick: function onClick() {
24
+ return remove(file);
25
+ }
20
26
  }, /*#__PURE__*/React.createElement(IconFont, {
21
27
  type: "lmweb-delete"
22
28
  }))));
@@ -1,6 +1,2 @@
1
- export interface RenderCellProps<T = any> {
2
- type?: string;
3
- instance: any;
4
- }
5
- declare const RenderCell: (props: RenderCellProps) => any;
1
+ declare const RenderCell: (props: any) => any;
6
2
  export default RenderCell;
@@ -21,9 +21,9 @@ var RenderCell = function RenderCell(props) {
21
21
  resetProsp = __rest(props, ["type"]);
22
22
 
23
23
  var types = {
24
- 'text': TextItem,
25
- 'picture': PictureItem,
26
- 'card': PictureCardItem
24
+ text: TextItem,
25
+ picture: PictureItem,
26
+ card: PictureCardItem
27
27
  };
28
28
  return render(types[type] || PictureItem, resetProsp);
29
29
  };
@@ -1,4 +1,5 @@
1
- declare const LmUploadList: ({ instance }: {
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ instance }: {
2
3
  instance: any;
3
- }) => JSX.Element;
4
- export default LmUploadList;
4
+ }) => JSX.Element>;
5
+ export default _default;
@@ -1,22 +1,28 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { render } from '../utils';
3
3
  import RenderItem from './RenderItem';
4
4
 
5
5
  var LmUploadList = function LmUploadList(_ref) {
6
6
  var instance = _ref.instance;
7
- var state = instance.state,
7
+
8
+ var _a, _b;
9
+
10
+ var uid = instance.uid,
11
+ getFileList = instance.getFileList,
8
12
  itemRender = instance.itemRender,
9
- listType = instance.listType;
10
- var fileList = state.fileList;
11
- return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (file, idx) {
13
+ listType = instance.listType,
14
+ showUploadList = instance.showUploadList;
15
+ if (!showUploadList) return null;
16
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (_b = (_a = getFileList()) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) {
17
+ return a.seq - b.seq;
18
+ })) === null || _b === void 0 ? void 0 : _b.map(function (file, idx) {
12
19
  return render(itemRender || RenderItem, {
13
20
  type: listType,
14
- key: idx,
21
+ key: file[uid] || idx,
15
22
  file: file,
16
- fileList: fileList,
17
23
  instance: instance
18
24
  });
19
25
  }));
20
26
  };
21
27
 
22
- export default LmUploadList;
28
+ export default /*#__PURE__*/React.memo(LmUploadList);
@@ -4,9 +4,9 @@ var Progress = function Progress(_ref) {
4
4
  var instance = _ref.instance;
5
5
  var state = instance.state;
6
6
  return /*#__PURE__*/React.createElement("div", {
7
- className: 'lm_upload_progress'
7
+ className: "lm_upload_progress"
8
8
  }, /*#__PURE__*/React.createElement("div", {
9
- className: 'line',
9
+ className: "line",
10
10
  style: {
11
11
  width: "".concat(state.percent || 0, "%")
12
12
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import UploadPicture from './UploadPicture'; // 上传核心
3
3
  // 渲染上传区域样式, 仅用于触发上传事件
4
4
  // type: 'card' 图片 | 'drag' 拖拽
@@ -9,7 +9,8 @@ var UploadCore = function UploadCore(_ref) {
9
9
  var accept = instance.accept,
10
10
  children = instance.children,
11
11
  beforeUpload = instance.beforeUpload,
12
- getUploadStatus = instance.getUploadStatus; // 点击事件触发文件上传
12
+ getUploadStatus = instance.getUploadStatus,
13
+ getIsMaxCount = instance.getIsMaxCount; // 点击事件触发文件上传
13
14
 
14
15
  var handleClick = function handleClick() {
15
16
  var _a;
@@ -31,7 +32,7 @@ var UploadCore = function UploadCore(_ref) {
31
32
  };
32
33
 
33
34
  var inputConfig = {
34
- type: "file",
35
+ type: 'file',
35
36
  accept: accept,
36
37
  title: '',
37
38
  onChange: uploadChange,
@@ -39,7 +40,7 @@ var UploadCore = function UploadCore(_ref) {
39
40
  display: 'none'
40
41
  }
41
42
  };
42
- return /*#__PURE__*/React.createElement("div", {
43
+ return !getIsMaxCount() && /*#__PURE__*/React.createElement("div", {
43
44
  onClick: handleClick,
44
45
  className: "lm_upload_core"
45
46
  }, children || /*#__PURE__*/React.createElement(UploadPicture, {
@@ -11,22 +11,22 @@ var uploadPicture = function uploadPicture(_ref) {
11
11
  return getUploadStatus().uploading;
12
12
  }, [getUploadStatus]);
13
13
  return /*#__PURE__*/React.createElement("div", {
14
- className: 'lm_upload_core_picture',
14
+ className: "lm_upload_core_picture",
15
15
  style: {
16
16
  height: size,
17
17
  width: size
18
18
  }
19
19
  }, /*#__PURE__*/React.createElement("div", {
20
- className: 'lm_upload_core_picture_action'
20
+ className: "lm_upload_core_picture_action"
21
21
  }, !isUploading && /*#__PURE__*/React.createElement("div", {
22
- className: 'action_plus'
22
+ className: "action_plus"
23
23
  }, /*#__PURE__*/React.createElement(IconFont, {
24
24
  type: "lmweb-plus",
25
25
  style: {
26
26
  fontSize: size > 48 ? 16 : 12
27
27
  }
28
28
  })), /*#__PURE__*/React.createElement("div", {
29
- className: 'tip'
29
+ className: "tip"
30
30
  }, "\u4E0A\u4F20"), isUploading && /*#__PURE__*/React.createElement(Progress, {
31
31
  instance: instance
32
32
  })));
@@ -4,13 +4,18 @@ declare const useCoreOptions: ({ state, dispatch, props }: {
4
4
  props: any;
5
5
  }) => {
6
6
  CoreMethods: {
7
+ getIsMaxCount: () => boolean;
7
8
  beforeUpload: (e: any) => false | import("../../message").MessageType;
8
9
  getUploadStatus: () => {
9
10
  uploading: boolean;
10
11
  };
12
+ remove: (file: any) => Promise<void>;
13
+ preview: (file: any) => void;
14
+ download: (file: any) => void;
11
15
  };
12
16
  RefMethods: {
13
17
  getState: () => any;
18
+ getFileList: () => any;
14
19
  };
15
20
  };
16
21
  export default useCoreOptions;