linkmore-design 1.0.67 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -7
- package/dist/Approval/demos/basic.d.ts +1 -0
- package/dist/Approval/handle.d.ts +11 -0
- package/dist/Approval/type.d.ts +39 -8
- package/dist/Approval/util.d.ts +26 -0
- package/dist/AutoComplete/index.d.ts +2 -1
- package/dist/Calendar/demos/basic.d.ts +2 -0
- package/dist/Calendar/index.d.ts +4 -0
- package/dist/Calendar/style/index.d.ts +1 -0
- package/dist/CardTable/hooks/usePagination.d.ts +1 -1
- package/dist/CardTable/utils.d.ts +2 -2
- package/dist/Carousel/demos/basic.d.ts +2 -0
- package/dist/Carousel/index.d.ts +3 -0
- package/dist/Carousel/style/index.d.ts +1 -0
- package/dist/CkFilter/components/CascaderFilter.d.ts +1 -1
- package/dist/Collapse/demos/basic.d.ts +2 -0
- package/dist/Collapse/index.d.ts +3 -0
- package/dist/Collapse/style/index.d.ts +1 -0
- package/dist/Comment/demos/basic.d.ts +2 -0
- package/dist/Comment/index.d.ts +3 -0
- package/dist/Comment/style/index.d.ts +1 -0
- package/dist/ImageViewer/LmImageViewer.d.ts +5 -0
- package/dist/ImageViewer/demos/basic.d.ts +2 -0
- package/dist/ImageViewer/index.d.ts +2 -0
- package/dist/ImageViewer/style/index.d.ts +1 -0
- package/dist/ImageViewer/wrapeer/Root.d.ts +3 -0
- package/dist/LmFilter/components/CascaderFilter.d.ts +1 -1
- package/dist/LmFilter/components/CheckboxFilter.d.ts +1 -1
- package/dist/LmFilter/components/DateFilter.d.ts +1 -1
- package/dist/LmFilter/components/InputFilter.d.ts +2 -2
- package/dist/LmFilter/components/SelectFilter.d.ts +1 -1
- package/dist/LmFilter/filterFns/index.d.ts +1 -1
- package/dist/LmFilter/localization.d.ts +1 -0
- package/dist/LmFilter/utils.d.ts +1 -1
- package/dist/LmSelect/useCheckboxOptions.d.ts +2 -1
- package/dist/LmTable/components/DndContainer.d.ts +5 -0
- package/dist/LmTable/components/sortableBoxCol.d.ts +5 -0
- package/dist/LmTable/components/sortableItemCol.d.ts +1 -0
- package/dist/LmTable/demos/tableColSort.d.ts +2 -0
- package/dist/LmUpload/LmUpload.d.ts +6 -1
- package/dist/LmUpload/UploadList/ItemPicture.d.ts +2 -1
- package/dist/LmUpload/UploadList/ItemText.d.ts +2 -1
- package/dist/LmUpload/UploadList/RenderItem.d.ts +1 -5
- package/dist/LmUpload/UploadList/index.d.ts +4 -3
- package/dist/LmUpload/body/Progress.d.ts +4 -0
- package/dist/LmUpload/demos/card.d.ts +2 -0
- package/dist/LmUpload/demos/picture.d.ts +2 -0
- package/dist/LmUpload/fns/index.d.ts +9 -1
- package/dist/LmUpload/utils.d.ts +1 -0
- package/dist/LmUpload/wrapper/UploadContainer.d.ts +4 -3
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Popconfirm/demos/basic.d.ts +2 -0
- package/dist/Popconfirm/index.d.ts +3 -0
- package/dist/Popconfirm/style/index.d.ts +1 -0
- package/dist/Progress/demos/basic.d.ts +2 -0
- package/dist/Progress/demos/circle.d.ts +2 -0
- package/dist/Progress/demos/dynamic.d.ts +2 -0
- package/dist/Progress/demos/small.d.ts +2 -0
- package/dist/Progress/index.d.ts +3 -0
- package/dist/Progress/style/index.d.ts +1 -0
- package/dist/Segmented/demos/basic.d.ts +2 -0
- package/dist/Segmented/index.d.ts +3 -0
- package/dist/Segmented/style/index.d.ts +1 -0
- package/dist/Slider/demos/basic.d.ts +2 -0
- package/dist/Slider/index.d.ts +2 -0
- package/dist/Slider/style/index.d.ts +1 -0
- package/dist/Statistic/demos/basic.d.ts +2 -0
- package/dist/Statistic/index.d.ts +3 -0
- package/dist/Statistic/style/index.d.ts +1 -0
- package/dist/TimePicker/demos/basic.d.ts +3 -0
- package/dist/TimePicker/index.d.ts +3 -0
- package/dist/TimePicker/style/index.d.ts +1 -0
- package/dist/Timeline/demos/basic.d.ts +2 -0
- package/dist/Timeline/index.d.ts +3 -0
- package/dist/Timeline/style/index.d.ts +1 -0
- package/dist/Transfer/demos/basic.d.ts +2 -0
- package/dist/Transfer/index.d.ts +3 -0
- package/dist/Transfer/style/index.d.ts +1 -0
- package/dist/TreeSelect/demos/basic.d.ts +2 -0
- package/dist/TreeSelect/index.d.ts +3 -0
- package/dist/TreeSelect/style/index.d.ts +1 -0
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +2 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.umd.js +8832 -2917
- package/dist/index.umd.min.js +6 -6
- package/es/Affix/style/index.css +6 -0
- package/es/Alert/index.js +27 -5
- package/es/Alert/style/index.css +7 -1
- package/es/Approval/handle.d.ts +11 -0
- package/es/Approval/handle.js +138 -0
- package/es/Approval/index.js +280 -122
- package/es/Approval/style/index.css +60 -8
- package/es/Approval/type.d.ts +39 -8
- package/es/Approval/type.js +97 -1
- package/es/Approval/util.d.ts +26 -0
- package/es/Approval/util.js +132 -0
- package/es/AutoComplete/index.d.ts +2 -1
- package/es/AutoComplete/style/index.css +6 -0
- package/es/Avatar/style/index.css +6 -0
- package/es/Breadcrumb/style/index.css +6 -0
- package/es/ButtonTags/style/index.css +6 -0
- package/es/Calendar/index.d.ts +4 -0
- package/es/Calendar/index.js +3 -0
- package/es/Calendar/style/index.css +511 -0
- package/es/Calendar/style/index.d.ts +1 -0
- package/es/Calendar/style/index.js +1 -0
- package/es/Card/style/index.css +6 -0
- package/es/CardTable/fns/index.js +5 -8
- package/es/CardTable/table/TableRoot.js +2 -1
- package/es/Carousel/index.d.ts +3 -0
- package/es/Carousel/index.js +3 -0
- package/es/Carousel/style/index.css +511 -0
- package/es/Carousel/style/index.d.ts +1 -0
- package/es/Carousel/style/index.js +1 -0
- package/es/Cascader/style/index.css +6 -0
- package/es/CkFilter/complexFilter/drawer.js +1 -4
- package/es/CkFilter/complexFilter/saveModal.js +5 -7
- package/es/CkFilter/components/CustomModal.js +2 -3
- package/es/CkFilter/components/filterTypes.js +1 -3
- package/es/CkFilter/components/modal.js +2 -5
- package/es/CkFilter/components/modalBack.js +2 -3
- package/es/CkFilter/customFilter/drawer.js +6 -11
- package/es/CkFilter/style/index.css +6 -0
- package/es/Col/style/index.css +6 -0
- package/es/Collapse/index.d.ts +3 -0
- package/es/Collapse/index.js +3 -0
- package/es/Collapse/style/index.css +511 -0
- package/es/Collapse/style/index.d.ts +1 -0
- package/es/Collapse/style/index.js +1 -0
- package/es/Comment/index.d.ts +3 -0
- package/es/Comment/index.js +3 -0
- package/es/Comment/style/index.css +511 -0
- package/es/Comment/style/index.d.ts +1 -0
- package/es/Comment/style/index.js +1 -0
- package/es/CustomTableOption/style/index.css +6 -0
- package/es/CustomerService/style/index.css +6 -0
- package/es/DatePicker/style/index.css +6 -0
- package/es/Descriptions/style/index.css +6 -0
- package/es/Drawer/style/index.css +6 -0
- package/es/Dropdown/style/index.css +6 -0
- package/es/EditTable/style/index.css +6 -0
- package/es/Empty/style/index.css +6 -0
- package/es/Filter/baseFilter/Popover.js +0 -1
- package/es/Filter/baseFilter/ToggleFilter.js +0 -1
- package/es/Filter/edit/editFilter.js +2 -6
- package/es/Filter/remember.js +0 -1
- package/es/Filter/style/index.css +6 -0
- package/es/Form/style/index.css +6 -0
- package/es/Grid/style/index.css +6 -0
- package/es/Icon/style/index.css +6 -0
- package/es/IconFont/font/iconfont.js +1 -1
- package/es/Image/style/index.css +6 -0
- package/es/ImageViewer/LmImageViewer.d.ts +5 -0
- package/es/ImageViewer/LmImageViewer.js +26 -0
- package/es/ImageViewer/index.d.ts +2 -0
- package/es/ImageViewer/index.js +2 -0
- package/es/ImageViewer/style/index.css +211 -0
- package/es/ImageViewer/style/index.js +3 -0
- package/es/ImageViewer/wrapeer/Root.d.ts +3 -0
- package/es/ImageViewer/wrapeer/Root.js +12 -0
- package/es/Input/style/index.css +6 -0
- package/es/InputNumber/style/index.css +6 -0
- package/es/Layout/style/index.css +6 -0
- package/es/LeftTable/style/index.css +6 -0
- package/es/List/style/index.css +6 -0
- package/es/LmEditTable/EditTable.js +5 -3
- package/es/LmEditTable/style/index.css +12 -0
- package/es/LmFilter/complexFilter/drawer.js +2 -7
- package/es/LmFilter/complexFilter/valueDrawer.js +2 -5
- package/es/LmFilter/components/CascaderFilter.js +3 -2
- package/es/LmFilter/components/CheckboxFilter.js +3 -3
- package/es/LmFilter/components/DropdownFIlter.js +71 -65
- package/es/LmFilter/components/InputFilter.js +1 -2
- package/es/LmFilter/components/SelectFilter.js +2 -2
- package/es/LmFilter/components/index.js +7 -5
- package/es/LmFilter/customFilter/drawer.js +7 -25
- package/es/LmFilter/customFilter/index.js +2 -1
- package/es/LmFilter/customFilter/saveModal.js +5 -7
- package/es/LmFilter/customFilter/valueDrawer.js +2 -5
- package/es/LmFilter/filterFns/index.js +4 -7
- package/es/LmFilter/localization.d.ts +1 -0
- package/es/LmFilter/localization.js +2 -1
- package/es/LmFilter/utils.js +41 -22
- package/es/LmFilter/wrapper/FilterRoot.js +0 -2
- package/es/LmSelect/style/index.css +6 -0
- package/es/LmSelect/useCheckboxOptions.d.ts +2 -1
- package/es/LmSelect/useCheckboxOptions.js +4 -3
- package/es/LmTable/Table.js +78 -45
- package/es/LmTable/autosize.js +0 -3
- package/es/LmTable/components/DndContainer.d.ts +5 -0
- package/es/LmTable/components/DndContainer.js +35 -0
- package/es/LmTable/components/sortableBoxCol.js +24 -0
- package/es/LmTable/components/sortableItemCol.js +54 -0
- package/es/LmTable/style/index.css +6 -0
- package/es/LmUpload/LmUpload.d.ts +6 -1
- package/es/LmUpload/LmUpload.js +70 -14
- package/es/LmUpload/UploadList/ItemPicture.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPicture.js +23 -8
- package/es/LmUpload/UploadList/ItemPictureCard.js +82 -16
- package/es/LmUpload/UploadList/ItemText.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemText.js +13 -7
- package/es/LmUpload/UploadList/RenderItem.d.ts +1 -5
- package/es/LmUpload/UploadList/RenderItem.js +3 -3
- package/es/LmUpload/UploadList/index.d.ts +4 -3
- package/es/LmUpload/UploadList/index.js +15 -8
- package/es/LmUpload/body/Progress.d.ts +4 -0
- package/es/LmUpload/body/Progress.js +16 -0
- package/es/LmUpload/body/UploadCore.js +20 -13
- package/es/LmUpload/body/UploadPicture.js +16 -8
- package/es/LmUpload/fns/index.d.ts +8 -0
- package/es/LmUpload/fns/index.js +231 -25
- package/es/LmUpload/style/index.css +26 -3
- package/es/LmUpload/utils.d.ts +1 -0
- package/es/LmUpload/utils.js +14 -1
- package/es/LmUpload/view/index.js +2 -2
- package/es/LmUpload/wrapper/UploadContainer.d.ts +4 -3
- package/es/LmUpload/wrapper/UploadContainer.js +19 -3
- package/es/LmUpload/wrapper/UploadRoot.js +9 -1
- package/es/LmUpload/wrapper/UploadWrapper.js +4 -8
- package/es/LmUpload/wrapper/reducer.js +9 -2
- package/es/Mentions/style/index.css +6 -0
- package/es/Menu/style/index.css +6 -0
- package/es/Modal/index.d.ts +1 -1
- package/es/Modal/style/index.css +6 -0
- package/es/PageHeader/style/index.css +6 -0
- package/es/Pagination/style/index.css +6 -0
- package/es/PopTable/style/index.css +6 -0
- package/es/Popconfirm/index.d.ts +3 -0
- package/es/Popconfirm/index.js +3 -0
- package/es/Popconfirm/style/index.css +511 -0
- package/es/Popconfirm/style/index.d.ts +1 -0
- package/es/Popconfirm/style/index.js +1 -0
- package/es/Popover/style/index.css +6 -0
- package/es/ProTable/Table.js +0 -1
- package/es/ProTable/autosize.js +0 -3
- package/es/ProTable/style/index.css +6 -0
- package/es/Progress/index.d.ts +3 -0
- package/es/Progress/index.js +3 -0
- package/es/Progress/style/index.css +511 -0
- package/es/Progress/style/index.d.ts +1 -0
- package/es/Progress/style/index.js +1 -0
- package/es/QuickMenu/style/index.css +6 -0
- package/es/Rate/style/index.css +6 -0
- package/es/Row/style/index.css +6 -0
- package/es/Segmented/index.d.ts +3 -0
- package/es/Segmented/index.js +3 -0
- package/es/Segmented/style/index.css +511 -0
- package/es/Segmented/style/index.d.ts +1 -0
- package/es/Segmented/style/index.js +1 -0
- package/es/Select/style/index.css +6 -0
- package/es/Slider/index.d.ts +2 -0
- package/es/Slider/index.js +3 -0
- package/es/Slider/style/index.css +511 -0
- package/es/Slider/style/index.d.ts +1 -0
- package/es/Slider/style/index.js +1 -0
- package/es/Space/style/index.css +6 -0
- package/es/Spin/style/index.css +6 -0
- package/es/Statistic/index.d.ts +3 -0
- package/es/Statistic/index.js +3 -0
- package/es/Statistic/style/index.css +511 -0
- package/es/Statistic/style/index.d.ts +1 -0
- package/es/Statistic/style/index.js +1 -0
- package/es/Steps/style/index.css +6 -0
- package/es/Switch/style/index.css +6 -0
- package/es/Table/style/index.css +6 -0
- package/es/Tabs/style/index.css +6 -0
- package/es/Tag/style/index.css +6 -0
- package/es/TimePicker/index.d.ts +3 -0
- package/es/TimePicker/index.js +3 -0
- package/es/TimePicker/style/index.css +511 -0
- package/es/TimePicker/style/index.d.ts +1 -0
- package/es/TimePicker/style/index.js +1 -0
- package/es/Timeline/index.d.ts +3 -0
- package/es/Timeline/index.js +3 -0
- package/es/Timeline/style/index.css +511 -0
- package/es/Timeline/style/index.d.ts +1 -0
- package/es/Timeline/style/index.js +1 -0
- package/es/Tooltip/style/index.css +6 -0
- package/es/Transfer/index.d.ts +3 -0
- package/es/Transfer/index.js +3 -0
- package/es/Transfer/style/index.css +511 -0
- package/es/Transfer/style/index.d.ts +1 -0
- package/es/Transfer/style/index.js +1 -0
- package/es/Tree/style/index.css +6 -0
- package/es/TreeSelect/index.d.ts +3 -0
- package/es/TreeSelect/index.js +3 -0
- package/es/TreeSelect/style/index.css +511 -0
- package/es/TreeSelect/style/index.d.ts +1 -0
- package/es/TreeSelect/style/index.js +1 -0
- package/es/Typography/style/index.css +6 -0
- package/es/Upload/style/index.css +6 -0
- package/es/hooks/useFullscreen/index.js +6 -8
- package/es/index.d.ts +19 -0
- package/es/index.js +11 -1
- package/es/message/style/index.css +6 -0
- package/es/notification/style/index.css +6 -0
- package/es/styles/main.css +6 -0
- package/es/styles/resetAntd.css +3 -0
- package/lib/Affix/style/index.css +6 -0
- package/lib/Alert/index.js +27 -5
- package/lib/Alert/style/index.css +7 -1
- package/lib/Approval/handle.d.ts +11 -0
- package/lib/Approval/handle.js +160 -0
- package/lib/Approval/index.js +287 -122
- package/lib/Approval/style/index.css +60 -8
- package/lib/Approval/type.d.ts +39 -8
- package/lib/Approval/type.js +101 -1
- package/lib/Approval/util.d.ts +26 -0
- package/lib/Approval/util.js +148 -0
- package/lib/AutoComplete/index.d.ts +2 -1
- package/lib/AutoComplete/style/index.css +6 -0
- package/lib/Avatar/style/index.css +6 -0
- package/lib/Breadcrumb/style/index.css +6 -0
- package/lib/ButtonTags/style/index.css +6 -0
- package/lib/Calendar/index.d.ts +4 -0
- package/lib/Calendar/index.js +15 -0
- package/lib/Calendar/style/index.css +511 -0
- package/lib/Calendar/style/index.d.ts +1 -0
- package/lib/Calendar/style/index.js +3 -0
- package/lib/Card/style/index.css +6 -0
- package/lib/CardTable/fns/index.js +5 -8
- package/lib/CardTable/table/TableRoot.js +2 -1
- package/lib/Carousel/index.d.ts +3 -0
- package/lib/Carousel/index.js +15 -0
- package/lib/Carousel/style/index.css +511 -0
- package/lib/Carousel/style/index.d.ts +1 -0
- package/lib/Carousel/style/index.js +3 -0
- package/lib/Cascader/style/index.css +6 -0
- package/lib/CkFilter/complexFilter/drawer.js +1 -4
- package/lib/CkFilter/complexFilter/saveModal.js +5 -7
- package/lib/CkFilter/components/CustomModal.js +2 -3
- package/lib/CkFilter/components/filterTypes.js +1 -3
- package/lib/CkFilter/components/modal.js +2 -5
- package/lib/CkFilter/components/modalBack.js +2 -3
- package/lib/CkFilter/customFilter/drawer.js +6 -11
- package/lib/CkFilter/style/index.css +6 -0
- package/lib/Col/style/index.css +6 -0
- package/lib/Collapse/index.d.ts +3 -0
- package/lib/Collapse/index.js +15 -0
- package/lib/Collapse/style/index.css +511 -0
- package/lib/Collapse/style/index.d.ts +1 -0
- package/lib/Collapse/style/index.js +3 -0
- package/lib/Comment/index.d.ts +3 -0
- package/lib/Comment/index.js +15 -0
- package/lib/Comment/style/index.css +511 -0
- package/lib/Comment/style/index.d.ts +1 -0
- package/lib/Comment/style/index.js +3 -0
- package/lib/CustomTableOption/style/index.css +6 -0
- package/lib/CustomerService/style/index.css +6 -0
- package/lib/DatePicker/style/index.css +6 -0
- package/lib/Descriptions/style/index.css +6 -0
- package/lib/Drawer/style/index.css +6 -0
- package/lib/Dropdown/style/index.css +6 -0
- package/lib/EditTable/style/index.css +6 -0
- package/lib/Empty/style/index.css +6 -0
- package/lib/Filter/baseFilter/Popover.js +0 -1
- package/lib/Filter/baseFilter/ToggleFilter.js +0 -1
- package/lib/Filter/edit/editFilter.js +2 -6
- package/lib/Filter/remember.js +0 -1
- package/lib/Filter/style/index.css +6 -0
- package/lib/Form/style/index.css +6 -0
- package/lib/Grid/style/index.css +6 -0
- package/lib/Icon/style/index.css +6 -0
- package/lib/IconFont/font/iconfont.js +1 -1
- package/lib/Image/style/index.css +6 -0
- package/lib/ImageViewer/LmImageViewer.d.ts +5 -0
- package/lib/ImageViewer/LmImageViewer.js +40 -0
- package/lib/ImageViewer/index.d.ts +2 -0
- package/lib/ImageViewer/index.js +13 -0
- package/lib/ImageViewer/style/index.css +211 -0
- package/lib/ImageViewer/style/index.js +3 -0
- package/lib/ImageViewer/wrapeer/Root.d.ts +3 -0
- package/lib/ImageViewer/wrapeer/Root.js +23 -0
- package/lib/Input/style/index.css +6 -0
- package/lib/InputNumber/style/index.css +6 -0
- package/lib/Layout/style/index.css +6 -0
- package/lib/LeftTable/style/index.css +6 -0
- package/lib/List/style/index.css +6 -0
- package/lib/LmEditTable/EditTable.js +5 -3
- package/lib/LmEditTable/style/index.css +12 -0
- package/lib/LmFilter/complexFilter/drawer.js +2 -7
- package/lib/LmFilter/complexFilter/valueDrawer.js +2 -5
- package/lib/LmFilter/components/CascaderFilter.js +3 -2
- package/lib/LmFilter/components/CheckboxFilter.js +3 -3
- package/lib/LmFilter/components/DropdownFIlter.js +71 -65
- package/lib/LmFilter/components/InputFilter.js +1 -2
- package/lib/LmFilter/components/SelectFilter.js +2 -2
- package/lib/LmFilter/components/index.js +7 -5
- package/lib/LmFilter/customFilter/drawer.js +7 -25
- package/lib/LmFilter/customFilter/index.js +2 -1
- package/lib/LmFilter/customFilter/saveModal.js +5 -7
- package/lib/LmFilter/customFilter/valueDrawer.js +2 -5
- package/lib/LmFilter/filterFns/index.js +4 -7
- package/lib/LmFilter/localization.d.ts +1 -0
- package/lib/LmFilter/localization.js +4 -2
- package/lib/LmFilter/utils.js +41 -22
- package/lib/LmFilter/wrapper/FilterRoot.js +0 -2
- package/lib/LmSelect/style/index.css +6 -0
- package/lib/LmSelect/useCheckboxOptions.d.ts +2 -1
- package/lib/LmSelect/useCheckboxOptions.js +7 -5
- package/lib/LmTable/Table.js +78 -45
- package/lib/LmTable/autosize.js +0 -3
- package/lib/LmTable/components/DndContainer.d.ts +5 -0
- package/lib/LmTable/components/DndContainer.js +49 -0
- package/lib/LmTable/components/sortableBoxCol.js +24 -0
- package/lib/LmTable/components/sortableItemCol.js +54 -0
- package/lib/LmTable/style/index.css +6 -0
- package/lib/LmUpload/LmUpload.d.ts +6 -1
- package/lib/LmUpload/LmUpload.js +69 -13
- package/lib/LmUpload/UploadList/ItemPicture.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPicture.js +26 -8
- package/lib/LmUpload/UploadList/ItemPictureCard.js +81 -16
- package/lib/LmUpload/UploadList/ItemText.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemText.js +16 -7
- package/lib/LmUpload/UploadList/RenderItem.d.ts +1 -5
- package/lib/LmUpload/UploadList/RenderItem.js +3 -3
- package/lib/LmUpload/UploadList/index.d.ts +4 -3
- package/lib/LmUpload/UploadList/index.js +17 -8
- package/lib/LmUpload/body/Progress.d.ts +4 -0
- package/lib/LmUpload/body/{UploadDrag.js → Progress.js} +10 -5
- package/lib/LmUpload/body/UploadCore.js +25 -18
- package/lib/LmUpload/body/UploadPicture.js +18 -7
- package/lib/LmUpload/fns/index.d.ts +8 -0
- package/lib/LmUpload/fns/index.js +233 -25
- package/lib/LmUpload/style/index.css +26 -3
- package/lib/LmUpload/utils.d.ts +1 -0
- package/lib/LmUpload/utils.js +16 -1
- package/lib/LmUpload/view/index.js +2 -2
- package/lib/LmUpload/wrapper/UploadContainer.d.ts +4 -3
- package/lib/LmUpload/wrapper/UploadContainer.js +21 -3
- package/lib/LmUpload/wrapper/UploadRoot.js +9 -1
- package/lib/LmUpload/wrapper/UploadWrapper.js +5 -12
- package/lib/LmUpload/wrapper/reducer.js +9 -2
- package/lib/Mentions/style/index.css +6 -0
- package/lib/Menu/style/index.css +6 -0
- package/lib/Modal/index.d.ts +1 -1
- package/lib/Modal/style/index.css +6 -0
- package/lib/PageHeader/style/index.css +6 -0
- package/lib/Pagination/style/index.css +6 -0
- package/lib/PopTable/style/index.css +6 -0
- package/lib/Popconfirm/index.d.ts +3 -0
- package/lib/Popconfirm/index.js +15 -0
- package/lib/Popconfirm/style/index.css +511 -0
- package/lib/Popconfirm/style/index.d.ts +1 -0
- package/lib/Popconfirm/style/index.js +3 -0
- package/lib/Popover/style/index.css +6 -0
- package/lib/ProTable/Table.js +0 -1
- package/lib/ProTable/autosize.js +0 -3
- package/lib/ProTable/style/index.css +6 -0
- package/lib/Progress/index.d.ts +3 -0
- package/lib/Progress/index.js +15 -0
- package/lib/Progress/style/index.css +511 -0
- package/lib/Progress/style/index.d.ts +1 -0
- package/lib/Progress/style/index.js +3 -0
- package/lib/QuickMenu/style/index.css +6 -0
- package/lib/Rate/style/index.css +6 -0
- package/lib/Row/style/index.css +6 -0
- package/lib/Segmented/index.d.ts +3 -0
- package/lib/Segmented/index.js +15 -0
- package/lib/Segmented/style/index.css +511 -0
- package/lib/Segmented/style/index.d.ts +1 -0
- package/lib/Segmented/style/index.js +3 -0
- package/lib/Select/style/index.css +6 -0
- package/lib/Slider/index.d.ts +2 -0
- package/lib/Slider/index.js +15 -0
- package/lib/Slider/style/index.css +511 -0
- package/lib/Slider/style/index.d.ts +1 -0
- package/lib/Slider/style/index.js +3 -0
- package/lib/Space/style/index.css +6 -0
- package/lib/Spin/style/index.css +6 -0
- package/lib/Statistic/index.d.ts +3 -0
- package/lib/Statistic/index.js +15 -0
- package/lib/Statistic/style/index.css +511 -0
- package/lib/Statistic/style/index.d.ts +1 -0
- package/lib/Statistic/style/index.js +3 -0
- package/lib/Steps/style/index.css +6 -0
- package/lib/Switch/style/index.css +6 -0
- package/lib/Table/style/index.css +6 -0
- package/lib/Tabs/style/index.css +6 -0
- package/lib/Tag/style/index.css +6 -0
- package/lib/TimePicker/index.d.ts +3 -0
- package/lib/TimePicker/index.js +15 -0
- package/lib/TimePicker/style/index.css +511 -0
- package/lib/TimePicker/style/index.d.ts +1 -0
- package/lib/TimePicker/style/index.js +3 -0
- package/lib/Timeline/index.d.ts +3 -0
- package/lib/Timeline/index.js +15 -0
- package/lib/Timeline/style/index.css +511 -0
- package/lib/Timeline/style/index.d.ts +1 -0
- package/lib/Timeline/style/index.js +3 -0
- package/lib/Tooltip/style/index.css +6 -0
- package/lib/Transfer/index.d.ts +3 -0
- package/lib/Transfer/index.js +15 -0
- package/lib/Transfer/style/index.css +511 -0
- package/lib/Transfer/style/index.d.ts +1 -0
- package/lib/Transfer/style/index.js +3 -0
- package/lib/Tree/style/index.css +6 -0
- package/lib/TreeSelect/index.d.ts +3 -0
- package/lib/TreeSelect/index.js +15 -0
- package/lib/TreeSelect/style/index.css +511 -0
- package/lib/TreeSelect/style/index.d.ts +1 -0
- package/lib/TreeSelect/style/index.js +3 -0
- package/lib/Typography/style/index.css +6 -0
- package/lib/Upload/style/index.css +6 -0
- package/lib/hooks/useFullscreen/index.js +6 -10
- package/lib/index.d.ts +19 -0
- package/lib/index.js +81 -1
- package/lib/message/style/index.css +6 -0
- package/lib/notification/style/index.css +6 -0
- package/lib/styles/main.css +6 -0
- package/lib/styles/resetAntd.css +3 -0
- package/package.json +3 -1
- package/typings/index.d.ts +1 -1
- package/dist/LmUpload/body/UploadDrag.d.ts +0 -4
- package/es/LmUpload/body/UploadDrag.d.ts +0 -4
- package/es/LmUpload/body/UploadDrag.js +0 -10
- package/lib/LmUpload/body/UploadDrag.d.ts +0 -4
package/es/LmUpload/fns/index.js
CHANGED
|
@@ -1,38 +1,195 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
|
|
4
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) {
|
|
6
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
7
|
+
resolve(value);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12
|
+
function fulfilled(value) {
|
|
13
|
+
try {
|
|
14
|
+
step(generator.next(value));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
reject(e);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function rejected(value) {
|
|
21
|
+
try {
|
|
22
|
+
step(generator["throw"](value));
|
|
23
|
+
} catch (e) {
|
|
24
|
+
reject(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function step(result) {
|
|
29
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
import { useCallback } from 'react';
|
|
2
37
|
import { message } from 'linkmore-design';
|
|
38
|
+
import OSS from 'ali-oss';
|
|
3
39
|
|
|
4
40
|
var useCoreOptions = function useCoreOptions(_ref) {
|
|
5
41
|
var state = _ref.state,
|
|
6
42
|
dispatch = _ref.dispatch,
|
|
7
43
|
props = _ref.props;
|
|
8
|
-
var
|
|
44
|
+
var uid = props.uid,
|
|
9
45
|
onChange = props.onChange,
|
|
10
|
-
size = props.size,
|
|
11
46
|
type = props.type,
|
|
12
47
|
fileSize = props.fileSize,
|
|
13
|
-
|
|
48
|
+
enabledOss = props.enabledOss,
|
|
49
|
+
ossConfig = props.ossConfig; // 获取当前的文件列表
|
|
50
|
+
|
|
51
|
+
var getFileList = useCallback(function () {
|
|
52
|
+
return props.fileList || state.fileList;
|
|
53
|
+
}, [props.fileList, state.fileList]); // 获取上传状态
|
|
54
|
+
|
|
55
|
+
var getUploadStatus = useCallback(function () {
|
|
56
|
+
var uploading = typeof state.percent === 'number';
|
|
57
|
+
return {
|
|
58
|
+
uploading: uploading
|
|
59
|
+
};
|
|
60
|
+
}, [state.percent]); // 获取是否达到最大上传数量
|
|
14
61
|
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
62
|
+
var getIsMaxCount = useCallback(function () {
|
|
63
|
+
return typeof props.maxCount === 'number' && !(getFileList().length < props.maxCount);
|
|
64
|
+
}, [getFileList, props.maxCount]); // 上传完成
|
|
65
|
+
|
|
66
|
+
var uploadDone = useCallback(function (file) {
|
|
67
|
+
var fileList = [file].concat(_toConsumableArray(getFileList()));
|
|
18
68
|
dispatch({
|
|
19
69
|
type: 'changeFileList',
|
|
20
70
|
fileList: fileList
|
|
71
|
+
});
|
|
72
|
+
dispatch({
|
|
73
|
+
type: 'changePercent',
|
|
74
|
+
percent: null
|
|
21
75
|
}); // 上传事件:抛出 file: 文件 filelist: 文件列表 event: 上传进度信息
|
|
22
76
|
|
|
23
77
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
24
78
|
file: file,
|
|
25
|
-
fileList: fileList
|
|
26
|
-
event: event
|
|
79
|
+
fileList: fileList
|
|
27
80
|
});
|
|
28
|
-
}; //
|
|
81
|
+
}, [getFileList]); // 上传进度事件
|
|
29
82
|
|
|
83
|
+
var uploadProgress = useCallback(function (file, _ref2) {
|
|
84
|
+
var progress = _ref2.progress,
|
|
85
|
+
checkPoint = _ref2.checkPoint,
|
|
86
|
+
result = _ref2.result;
|
|
87
|
+
onChange({
|
|
88
|
+
file: file,
|
|
89
|
+
fileList: getFileList(),
|
|
90
|
+
event: {
|
|
91
|
+
progress: progress,
|
|
92
|
+
checkPoint: checkPoint,
|
|
93
|
+
result: result,
|
|
94
|
+
status: typeof progress !== 'number' ? 'done' : 'uploading'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
dispatch({
|
|
98
|
+
type: 'changePercent',
|
|
99
|
+
percent: Number((progress * 100).toFixed(2))
|
|
100
|
+
});
|
|
101
|
+
}, [getFileList]); // 上传至ali-oss
|
|
102
|
+
|
|
103
|
+
var uploadOss = useCallback(function (file) {
|
|
104
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
105
|
+
var _a, _ossConfig, _ossConfig$dir, dir, shortlink, _ossConfig$region, region, accessKeyId, accessKeySecret, stsToken, _ossConfig$bucket, bucket, client, timestamp, fileName, pathName, url, seq, params;
|
|
106
|
+
|
|
107
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
108
|
+
while (1) {
|
|
109
|
+
switch (_context.prev = _context.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context.prev = 0;
|
|
112
|
+
_ossConfig = ossConfig(), _ossConfig$dir = _ossConfig.dir, dir = _ossConfig$dir === void 0 ? '/BizFile/4595/Supplier/' : _ossConfig$dir, shortlink = _ossConfig.shortlink, _ossConfig$region = _ossConfig.region, region = _ossConfig$region === void 0 ? 'oss-cn-hangzhou' : _ossConfig$region, accessKeyId = _ossConfig.accessKeyId, accessKeySecret = _ossConfig.accessKeySecret, stsToken = _ossConfig.stsToken, _ossConfig$bucket = _ossConfig.bucket, bucket = _ossConfig$bucket === void 0 ? 'linkmore-scm-test' : _ossConfig$bucket;
|
|
113
|
+
client = new OSS({
|
|
114
|
+
region: region,
|
|
115
|
+
accessKeyId: accessKeyId,
|
|
116
|
+
accessKeySecret: accessKeySecret,
|
|
117
|
+
stsToken: stsToken,
|
|
118
|
+
bucket: bucket
|
|
119
|
+
});
|
|
120
|
+
timestamp = Date.now();
|
|
121
|
+
fileName = "".concat(timestamp, "-").concat(file.name);
|
|
122
|
+
pathName = dir.slice(-1) === '/' ? "".concat(dir).concat(fileName) : "".concat(dir, "/").concat(fileName);
|
|
123
|
+
url = "".concat(shortlink).concat(pathName) || '';
|
|
124
|
+
_context.next = 9;
|
|
125
|
+
return client.multipartUpload(pathName, file, {
|
|
126
|
+
// 获取分片上传进度、断点和返回值。
|
|
127
|
+
progress: function progress(_progress, checkPoint, result) {
|
|
128
|
+
return uploadProgress(file, {
|
|
129
|
+
progress: _progress,
|
|
130
|
+
checkPoint: checkPoint,
|
|
131
|
+
result: result
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
parallel: 4,
|
|
135
|
+
partSize: 1024 * 1024 // 分片大小
|
|
30
136
|
|
|
31
|
-
|
|
32
|
-
var file = e.target.files; // 循环文件检查是否存在不符合要求的文件
|
|
137
|
+
});
|
|
33
138
|
|
|
34
|
-
|
|
35
|
-
|
|
139
|
+
case 9:
|
|
140
|
+
seq = (((_a = state.fileList) === null || _a === void 0 ? void 0 : _a.length) || 0) + 1;
|
|
141
|
+
params = {
|
|
142
|
+
uid: timestamp,
|
|
143
|
+
fileTypeCode: file.type,
|
|
144
|
+
fileTypeName: file.type,
|
|
145
|
+
fileName: fileName,
|
|
146
|
+
realFileName: file.name,
|
|
147
|
+
fileSize: file.size,
|
|
148
|
+
internalUrl: '',
|
|
149
|
+
externalUrl: 'externalUrl',
|
|
150
|
+
filePath: dir,
|
|
151
|
+
seq: seq,
|
|
152
|
+
url: url
|
|
153
|
+
};
|
|
154
|
+
uploadDone(params);
|
|
155
|
+
_context.next = 18;
|
|
156
|
+
break;
|
|
157
|
+
|
|
158
|
+
case 14:
|
|
159
|
+
_context.prev = 14;
|
|
160
|
+
_context.t0 = _context["catch"](0);
|
|
161
|
+
console.log('上传报错:', _context.t0);
|
|
162
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
163
|
+
file: file,
|
|
164
|
+
fileList: getFileList(),
|
|
165
|
+
event: {
|
|
166
|
+
status: 'error'
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
case 18:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context.stop();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, _callee, null, [[0, 14]]);
|
|
176
|
+
}));
|
|
177
|
+
}, [ossConfig, uploadDone, uploadProgress, getFileList]);
|
|
178
|
+
var customUpload = useCallback(function (file) {
|
|
179
|
+
var _a;
|
|
180
|
+
|
|
181
|
+
(_a = props.fileUpload) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
182
|
+
file: file,
|
|
183
|
+
value: getFileList(),
|
|
184
|
+
onChange: uploadDone
|
|
185
|
+
});
|
|
186
|
+
}, [props.fileUpload, getFileList, uploadDone]); // 上传前的检测
|
|
187
|
+
|
|
188
|
+
var beforeUpload = useCallback(function (e) {
|
|
189
|
+
var files = e.target.files; // 循环文件检查是否存在不符合要求的文件
|
|
190
|
+
|
|
191
|
+
for (var i = 0, len = files.length; i < len; i += 1) {
|
|
192
|
+
var item = files[i];
|
|
36
193
|
|
|
37
194
|
if (!type.includes(item.name.replace(/.*\./, '').toLowerCase())) {
|
|
38
195
|
var content = type.join('、');
|
|
@@ -41,29 +198,78 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
41
198
|
|
|
42
199
|
if (item.size / 1024 / 1024 > fileSize) {
|
|
43
200
|
return message.warning("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01\u9644\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(fileSize, "M\uFF01"), 1.5);
|
|
44
|
-
}
|
|
201
|
+
}
|
|
45
202
|
|
|
203
|
+
enabledOss && uploadOss(item); // 单个文件上传
|
|
46
204
|
|
|
47
|
-
|
|
48
|
-
file: item,
|
|
49
|
-
size: size,
|
|
50
|
-
value: value,
|
|
51
|
-
onChange: uploadOnChange,
|
|
52
|
-
isImg: true
|
|
53
|
-
});
|
|
205
|
+
customUpload(item);
|
|
54
206
|
}
|
|
55
207
|
|
|
56
|
-
;
|
|
57
208
|
return false;
|
|
58
|
-
};
|
|
209
|
+
}, [type, fileSize, uploadOss, customUpload]); // 删除事件
|
|
210
|
+
|
|
211
|
+
var remove = useCallback(function (file) {
|
|
212
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
213
|
+
var _b, _c, res, fileList;
|
|
214
|
+
|
|
215
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
216
|
+
while (1) {
|
|
217
|
+
switch (_context2.prev = _context2.next) {
|
|
218
|
+
case 0:
|
|
219
|
+
_context2.next = 2;
|
|
220
|
+
return (_b = props.onRemove) === null || _b === void 0 ? void 0 : _b.call(props, file);
|
|
221
|
+
|
|
222
|
+
case 2:
|
|
223
|
+
res = _context2.sent;
|
|
224
|
+
|
|
225
|
+
if (res) {
|
|
226
|
+
fileList = (_c = getFileList()) === null || _c === void 0 ? void 0 : _c.filter(function (v) {
|
|
227
|
+
return v[uid] !== file[uid];
|
|
228
|
+
});
|
|
229
|
+
dispatch({
|
|
230
|
+
type: 'changeFileList',
|
|
231
|
+
fileList: fileList
|
|
232
|
+
});
|
|
233
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
234
|
+
file: file,
|
|
235
|
+
fileList: fileList
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
case 4:
|
|
240
|
+
case "end":
|
|
241
|
+
return _context2.stop();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}, _callee2);
|
|
245
|
+
}));
|
|
246
|
+
}, [props.onRemove, getFileList, uid]); // 点击文件链接或预览图标时的回调
|
|
59
247
|
|
|
248
|
+
var preview = useCallback(function (file) {
|
|
249
|
+
var _a;
|
|
250
|
+
|
|
251
|
+
(_a = props.onPreview) === null || _a === void 0 ? void 0 : _a.call(props, file);
|
|
252
|
+
}, []); // 点击下载文件时的回调
|
|
253
|
+
|
|
254
|
+
var download = useCallback(function (file) {
|
|
255
|
+
var _a;
|
|
256
|
+
|
|
257
|
+
(_a = props.onDownload) === null || _a === void 0 ? void 0 : _a.call(props, file);
|
|
258
|
+
}, []);
|
|
60
259
|
var CoreMethods = {
|
|
61
|
-
|
|
260
|
+
getIsMaxCount: getIsMaxCount,
|
|
261
|
+
beforeUpload: beforeUpload,
|
|
262
|
+
getUploadStatus: getUploadStatus,
|
|
263
|
+
remove: remove,
|
|
264
|
+
preview: preview,
|
|
265
|
+
download: download
|
|
62
266
|
};
|
|
63
267
|
var RefMethods = {
|
|
64
268
|
getState: function getState() {
|
|
65
269
|
return state;
|
|
66
|
-
}
|
|
270
|
+
},
|
|
271
|
+
getFileList: getFileList // 获取文件列表
|
|
272
|
+
|
|
67
273
|
};
|
|
68
274
|
return {
|
|
69
275
|
CoreMethods: CoreMethods,
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
border-color: var(--primary-color);
|
|
23
23
|
}
|
|
24
24
|
.lm_upload_wrapper .lm_upload_core .lm_upload_core_picture .lm_upload_core_picture_action {
|
|
25
|
+
width: 100%;
|
|
25
26
|
text-align: center;
|
|
27
|
+
padding: var(--gap);
|
|
26
28
|
}
|
|
27
29
|
.lm_upload_wrapper .lm_upload_core .lm_upload_core_picture .lm_upload_core_picture_action .action_plus {
|
|
28
30
|
color: var(--color-85);
|
|
@@ -31,6 +33,20 @@
|
|
|
31
33
|
color: var(--color-45);
|
|
32
34
|
margin-top: var(--gap);
|
|
33
35
|
}
|
|
36
|
+
.lm_upload_wrapper .lm_upload_progress {
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 2px;
|
|
39
|
+
background-color: var(--color-4);
|
|
40
|
+
border-radius: 20px;
|
|
41
|
+
margin: 10px 0;
|
|
42
|
+
}
|
|
43
|
+
.lm_upload_wrapper .lm_upload_progress .line {
|
|
44
|
+
width: 0%;
|
|
45
|
+
height: 2px;
|
|
46
|
+
transition: 0.3;
|
|
47
|
+
background-color: var(--primary-color);
|
|
48
|
+
border-radius: 20px;
|
|
49
|
+
}
|
|
34
50
|
.lm_upload_wrapper .lm_upload_item {
|
|
35
51
|
vertical-align: middle;
|
|
36
52
|
}
|
|
@@ -80,6 +96,9 @@
|
|
|
80
96
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_text .text_right .action_delete:hover {
|
|
81
97
|
color: var(--primary-color);
|
|
82
98
|
}
|
|
99
|
+
.lm_upload_wrapper .lm_upload_item.lm_upload_item_text.error {
|
|
100
|
+
color: var(--error-color);
|
|
101
|
+
}
|
|
83
102
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card {
|
|
84
103
|
position: relative;
|
|
85
104
|
display: inline-flex;
|
|
@@ -95,12 +114,13 @@
|
|
|
95
114
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card .lm_upload_item_thumb {
|
|
96
115
|
width: 100%;
|
|
97
116
|
}
|
|
117
|
+
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card .lm_upload_item_thumb .anticon {
|
|
118
|
+
font-size: 34px;
|
|
119
|
+
color: var(--color-45);
|
|
120
|
+
}
|
|
98
121
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card .lm_upload_item_thumb img {
|
|
99
122
|
object-fit: contain;
|
|
100
123
|
}
|
|
101
|
-
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card .lm_upload_item_error .anticon {
|
|
102
|
-
font-size: 34px;
|
|
103
|
-
}
|
|
104
124
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_card .lm_upload_item_error .lm_upload_item_name {
|
|
105
125
|
font-size: 12px;
|
|
106
126
|
text-overflow: ellipsis;
|
|
@@ -186,3 +206,6 @@
|
|
|
186
206
|
.lm_upload_wrapper .lm_upload_item.lm_upload_item_picture .picture_right .action_delete:hover {
|
|
187
207
|
color: var(--primary-color);
|
|
188
208
|
}
|
|
209
|
+
.lm_upload_wrapper .lm_upload_item.lm_upload_item_picture.error {
|
|
210
|
+
color: var(--error-color);
|
|
211
|
+
}
|
package/es/LmUpload/utils.d.ts
CHANGED
package/es/LmUpload/utils.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
-
import React from
|
|
2
|
+
import React from 'react'; // 检查是否存在内容
|
|
3
|
+
|
|
4
|
+
export function getIsHas(val) {
|
|
5
|
+
var _a; // 检查是否数字类型, 是否布尔类型
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var flag = !!val || typeof val === 'number' || typeof val === 'boolean'; // 检查空对象和空数组
|
|
9
|
+
|
|
10
|
+
if (!!val && _typeof(val) === 'object') {
|
|
11
|
+
flag = Array.isArray(val) ? !!val.length : !!((_a = Object.keys(val)) === null || _a === void 0 ? void 0 : _a.length);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return flag;
|
|
15
|
+
} // 检查是否类组件
|
|
3
16
|
|
|
4
17
|
export function isClassComponent(component) {
|
|
5
18
|
return typeof component === 'function' && function () {
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
var LmUploadView = function LmUploadView(_ref) {
|
|
4
4
|
var instance = _ref.instance;
|
|
5
5
|
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className:
|
|
7
|
-
}
|
|
6
|
+
className: "lm_upload_view"
|
|
7
|
+
});
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export default LmUploadView;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: React.MemoExoticComponent<({ instance }: {
|
|
2
3
|
instance: any;
|
|
3
|
-
}) =>
|
|
4
|
-
export default
|
|
4
|
+
}) => any>;
|
|
5
|
+
export default _default;
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
// 上传组件主体区域
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import LmUpload from './Upload';
|
|
4
|
+
import LmUploadList from '../UploadList';
|
|
4
5
|
|
|
5
6
|
var LmUploadContainer = function LmUploadContainer(_ref) {
|
|
6
7
|
var instance = _ref.instance;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
var wrapper = instance.components.wrapper;
|
|
9
|
+
|
|
10
|
+
if (!wrapper) {
|
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LmUpload, {
|
|
12
|
+
instance: instance
|
|
13
|
+
}), /*#__PURE__*/React.createElement(LmUploadList, {
|
|
14
|
+
instance: instance
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return wrapper === null || wrapper === void 0 ? void 0 : wrapper({
|
|
19
|
+
uploadDom: /*#__PURE__*/React.createElement(LmUpload, {
|
|
20
|
+
instance: instance
|
|
21
|
+
}),
|
|
22
|
+
fileListDom: /*#__PURE__*/React.createElement(LmUploadList, {
|
|
23
|
+
instance: instance
|
|
24
|
+
})
|
|
9
25
|
});
|
|
10
26
|
};
|
|
11
27
|
|
|
12
|
-
export default LmUploadContainer;
|
|
28
|
+
export default /*#__PURE__*/React.memo(LmUploadContainer);
|
|
@@ -13,7 +13,15 @@ var LmUploadRoot = function LmUploadRoot(props, ref) {
|
|
|
13
13
|
var _useReducer = useReducer(reducer, initialState),
|
|
14
14
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
15
15
|
state = _useReducer2[0],
|
|
16
|
-
dispatch = _useReducer2[1]; //
|
|
16
|
+
dispatch = _useReducer2[1]; // 格式化接收参数值
|
|
17
|
+
// const configProps = useMemo(() => {
|
|
18
|
+
// const { ...resetProps } = props
|
|
19
|
+
// // 受控/非受控时的数据收集
|
|
20
|
+
// return {
|
|
21
|
+
// ...resetProps,
|
|
22
|
+
// }
|
|
23
|
+
// }, [props])
|
|
24
|
+
// 获取核心Methods
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
var _useCoreOptions = useCoreOptions({
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
// 包裹上传组件区域: 拓展其他结构
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import LmUploadContainer from './UploadContainer';
|
|
4
|
-
import LmUploadList from '../UploadList';
|
|
5
4
|
import LmUploadView from '../view';
|
|
6
5
|
|
|
7
6
|
var LmUploadWrapper = function LmUploadWrapper(_ref) {
|
|
8
7
|
var instance = _ref.instance;
|
|
9
|
-
var wrapper = instance.components.wrapper;
|
|
10
8
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className:
|
|
12
|
-
},
|
|
9
|
+
className: "lm_upload_wrapper"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(LmUploadContainer, {
|
|
13
11
|
instance: instance
|
|
14
|
-
}), /*#__PURE__*/React.createElement(
|
|
15
|
-
instance: instance
|
|
16
|
-
})), /*#__PURE__*/React.createElement(LmUploadView, {
|
|
12
|
+
}), /*#__PURE__*/React.createElement(LmUploadView, {
|
|
17
13
|
instance: instance
|
|
18
14
|
}));
|
|
19
15
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// 状态管理操作
|
|
2
2
|
export var reducer = function reducer(state, action) {
|
|
3
|
-
var fileList = action.fileList
|
|
3
|
+
var fileList = action.fileList,
|
|
4
|
+
percent = action.percent;
|
|
4
5
|
|
|
5
6
|
switch (action.type) {
|
|
6
7
|
case 'changeFileList':
|
|
@@ -8,6 +9,11 @@ export var reducer = function reducer(state, action) {
|
|
|
8
9
|
fileList: fileList
|
|
9
10
|
});
|
|
10
11
|
|
|
12
|
+
case 'changePercent':
|
|
13
|
+
return Object.assign(Object.assign({}, state), {
|
|
14
|
+
percent: percent
|
|
15
|
+
});
|
|
16
|
+
|
|
11
17
|
default:
|
|
12
18
|
throw new Error();
|
|
13
19
|
}
|
|
@@ -20,7 +26,8 @@ export var initialState = function initialState(props) {
|
|
|
20
26
|
upload: upload,
|
|
21
27
|
process: 0,
|
|
22
28
|
status: 'done',
|
|
23
|
-
fileList: defaultFileList
|
|
29
|
+
fileList: defaultFileList // 用于非受控模式时的数据收集
|
|
30
|
+
|
|
24
31
|
};
|
|
25
32
|
};
|
|
26
33
|
export default reducer;
|
|
@@ -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,3 +506,6 @@ 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
|
+
}
|
package/es/Menu/style/index.css
CHANGED
|
@@ -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,3 +506,6 @@ 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
|
+
}
|
package/es/Modal/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface ILMModalProps extends ModalProps {
|
|
|
4
4
|
wrapClassName?: string;
|
|
5
5
|
size?: 'default' | 'small';
|
|
6
6
|
}
|
|
7
|
-
declare const LMModal: React.FC<ModalProps> & import("antd/lib/modal/confirm").ModalStaticFunctions & {
|
|
7
|
+
declare const LMModal: React.FC<ILMModalProps> & React.FC<ModalProps> & import("antd/lib/modal/confirm").ModalStaticFunctions & {
|
|
8
8
|
useModal: typeof import("antd/lib/modal/useModal").default;
|
|
9
9
|
destroyAll: () => void;
|
|
10
10
|
config: typeof import("antd/lib/modal/confirm").modalGlobalConfig;
|
package/es/Modal/style/index.css
CHANGED
|
@@ -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
|
.lm_modal.ant-modal-wrap .ant-modal-header > .ant-modal-title {
|
|
507
513
|
font-weight: normal;
|
|
508
514
|
font-size: 14px;
|
|
@@ -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,3 +506,6 @@ 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
|
+
}
|
|
@@ -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
|
.lm_pagination.ant-pagination li {
|
|
507
513
|
font-size: 12px;
|
|
508
514
|
line-height: 24px !important;
|
|
@@ -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
|
.lm_popover_table .btn-dashed {
|
|
507
513
|
font-size: 12px;
|
|
508
514
|
color: #ccc;
|