@arco-design/mobile-react 2.30.10 → 2.31.1
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/CHANGELOG.md +30 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/action-sheet/style/css/index.css +50 -34
- package/cjs/avatar/style/css/index.css +50 -34
- package/cjs/badge/style/css/index.css +50 -34
- package/cjs/button/style/css/index.css +50 -34
- package/cjs/carousel/style/css/index.css +50 -34
- package/cjs/cell/style/css/index.css +50 -34
- package/cjs/cell/style/index.less +2 -2
- package/cjs/checkbox/style/css/index.css +50 -34
- package/cjs/circle-progress/style/css/index.css +50 -34
- package/cjs/collapse/style/css/index.css +50 -34
- package/cjs/count-down/style/css/index.css +50 -34
- package/cjs/date-picker/style/css/index.css +50 -34
- package/cjs/dialog/style/css/index.css +50 -34
- package/cjs/divider/style/css/index.css +50 -34
- package/cjs/dropdown/style/css/index.css +50 -34
- package/cjs/dropdown-menu/style/css/index.css +50 -34
- package/cjs/ellipsis/style/css/index.css +50 -34
- package/cjs/form/form-item.d.ts +3 -0
- package/cjs/form/form-item.js +38 -10
- package/cjs/form/style/css/index.css +63 -34
- package/cjs/form/style/index.less +18 -0
- package/cjs/grid/style/css/index.css +50 -34
- package/cjs/icon/IconCheck/index.js +1 -2
- package/cjs/icon/IconDownload/index.d.ts +7 -0
- package/cjs/icon/IconDownload/index.js +41 -0
- package/cjs/icon/IconFile/index.d.ts +7 -0
- package/cjs/icon/IconFile/index.js +41 -0
- package/cjs/icon/IconKeyboard/index.js +1 -0
- package/cjs/icon/IconQuestionCircle/index.js +1 -2
- package/cjs/icon/IconUpload/index.js +6 -4
- package/cjs/icon/IconUserFill/index.js +1 -2
- package/cjs/icon/index.d.ts +3 -1
- package/cjs/icon/index.js +17 -7
- package/cjs/icon/type.d.ts +3 -1
- package/cjs/image/style/css/index.css +50 -34
- package/cjs/image-picker/index.js +15 -161
- package/cjs/image-picker/style/css/index.css +50 -34
- package/cjs/image-picker/type.d.ts +4 -73
- package/cjs/image-preview/style/css/index.css +50 -34
- package/cjs/index-bar/style/css/index.css +50 -34
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +6 -2
- package/cjs/input/hooks.js +2 -2
- package/cjs/input/props.d.ts +2 -2
- package/cjs/input/style/css/index.css +50 -34
- package/cjs/keyboard/style/css/index.css +50 -34
- package/cjs/load-more/style/css/index.css +50 -34
- package/cjs/loading/style/css/index.css +50 -34
- package/cjs/masking/style/css/index.css +50 -34
- package/cjs/nav-bar/style/css/index.css +50 -34
- package/cjs/notice-bar/style/css/index.css +50 -34
- package/cjs/notice-bar/style/index.less +2 -2
- package/cjs/notify/style/css/index.css +50 -34
- package/cjs/pagination/style/css/index.css +50 -34
- package/cjs/pagination/style/index.less +4 -4
- package/cjs/picker/index.js +59 -19
- package/cjs/picker/style/css/index.css +50 -34
- package/cjs/picker/type.d.ts +6 -1
- package/cjs/picker-view/style/css/index.css +50 -34
- package/cjs/popover/style/css/index.css +50 -34
- package/cjs/popover/style/css/menu.css +50 -34
- package/cjs/popup/style/css/index.css +50 -34
- package/cjs/popup-swiper/style/css/index.css +50 -34
- package/cjs/progress/style/css/index.css +50 -34
- package/cjs/pull-refresh/style/css/index.css +50 -34
- package/cjs/radio/style/css/index.css +50 -34
- package/cjs/rate/style/css/index.css +50 -34
- package/cjs/rate/style/index.less +2 -2
- package/cjs/search-bar/style/css/index.css +50 -34
- package/cjs/skeleton/style/css/index.css +50 -34
- package/cjs/skeleton/style/index.less +2 -2
- package/cjs/slider/style/css/index.css +50 -34
- package/cjs/slider/style/index.less +6 -6
- package/cjs/stepper/style/css/index.css +50 -34
- package/cjs/steps/style/css/index.css +50 -34
- package/cjs/sticky/style/css/index.css +50 -34
- package/cjs/style.d.ts +1 -0
- package/cjs/style.js +3 -1
- package/cjs/swipe-action/style/css/index.css +50 -34
- package/cjs/swipe-load/style/css/index.css +50 -34
- package/cjs/switch/style/css/index.css +50 -34
- package/cjs/switch/style/index.less +8 -8
- package/cjs/tab-bar/style/css/index.css +50 -34
- package/cjs/tabs/style/css/index.css +50 -34
- package/cjs/tabs/tab-cell.js +1 -1
- package/cjs/tag/style/css/index.css +50 -34
- package/cjs/textarea/style/css/index.css +50 -34
- package/cjs/toast/style/css/index.css +50 -34
- package/cjs/transition/style/css/index.css +50 -34
- package/cjs/uploader/index.d.ts +16 -0
- package/cjs/uploader/index.js +180 -0
- package/cjs/uploader/style/css/index.css +666 -0
- package/cjs/uploader/style/css/index.d.ts +4 -0
- package/cjs/uploader/style/css/index.js +9 -0
- package/cjs/uploader/style/index.d.ts +4 -0
- package/cjs/uploader/style/index.js +9 -0
- package/cjs/uploader/style/index.less +161 -0
- package/cjs/uploader/type.d.ts +108 -0
- package/cjs/uploader/type.js +3 -0
- package/cjs/uploader/upload/index.d.ts +2 -0
- package/cjs/uploader/upload/index.js +19 -0
- package/cjs/uploader/upload/type.d.ts +107 -0
- package/cjs/uploader/upload/type.js +3 -0
- package/cjs/uploader/upload/upload.d.ts +20 -0
- package/cjs/uploader/upload/upload.js +189 -0
- package/dist/index.js +589 -273
- package/dist/index.min.js +5 -5
- package/dist/style.css +3811 -2306
- package/dist/style.min.css +1 -1
- package/esm/action-sheet/style/css/index.css +50 -34
- package/esm/avatar/style/css/index.css +50 -34
- package/esm/badge/style/css/index.css +50 -34
- package/esm/button/style/css/index.css +50 -34
- package/esm/carousel/style/css/index.css +50 -34
- package/esm/cell/style/css/index.css +50 -34
- package/esm/cell/style/index.less +2 -2
- package/esm/checkbox/style/css/index.css +50 -34
- package/esm/circle-progress/style/css/index.css +50 -34
- package/esm/collapse/style/css/index.css +50 -34
- package/esm/count-down/style/css/index.css +50 -34
- package/esm/date-picker/style/css/index.css +50 -34
- package/esm/dialog/style/css/index.css +50 -34
- package/esm/divider/style/css/index.css +50 -34
- package/esm/dropdown/style/css/index.css +50 -34
- package/esm/dropdown-menu/style/css/index.css +50 -34
- package/esm/ellipsis/style/css/index.css +50 -34
- package/esm/form/form-item.d.ts +3 -0
- package/esm/form/form-item.js +36 -10
- package/esm/form/style/css/index.css +63 -34
- package/esm/form/style/index.less +18 -0
- package/esm/grid/style/css/index.css +50 -34
- package/esm/icon/IconCheck/index.js +1 -2
- package/esm/icon/IconDownload/index.d.ts +7 -0
- package/esm/icon/IconDownload/index.js +30 -0
- package/esm/icon/IconFile/index.d.ts +7 -0
- package/esm/icon/IconFile/index.js +30 -0
- package/esm/icon/IconKeyboard/index.js +1 -0
- package/esm/icon/IconQuestionCircle/index.js +1 -2
- package/esm/icon/IconUpload/index.js +6 -4
- package/esm/icon/IconUserFill/index.js +1 -2
- package/esm/icon/index.d.ts +3 -1
- package/esm/icon/index.js +3 -1
- package/esm/icon/type.d.ts +3 -1
- package/esm/image/style/css/index.css +50 -34
- package/esm/image-picker/index.js +14 -160
- package/esm/image-picker/style/css/index.css +50 -34
- package/esm/image-picker/type.d.ts +4 -73
- package/esm/image-preview/style/css/index.css +50 -34
- package/esm/index-bar/style/css/index.css +50 -34
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/input/hooks.js +2 -2
- package/esm/input/props.d.ts +2 -2
- package/esm/input/style/css/index.css +50 -34
- package/esm/keyboard/style/css/index.css +50 -34
- package/esm/load-more/style/css/index.css +50 -34
- package/esm/loading/style/css/index.css +50 -34
- package/esm/masking/style/css/index.css +50 -34
- package/esm/nav-bar/style/css/index.css +50 -34
- package/esm/notice-bar/style/css/index.css +50 -34
- package/esm/notice-bar/style/index.less +2 -2
- package/esm/notify/style/css/index.css +50 -34
- package/esm/pagination/style/css/index.css +50 -34
- package/esm/pagination/style/index.less +4 -4
- package/esm/picker/index.js +60 -20
- package/esm/picker/style/css/index.css +50 -34
- package/esm/picker/type.d.ts +6 -1
- package/esm/picker-view/style/css/index.css +50 -34
- package/esm/popover/style/css/index.css +50 -34
- package/esm/popover/style/css/menu.css +50 -34
- package/esm/popup/style/css/index.css +50 -34
- package/esm/popup-swiper/style/css/index.css +50 -34
- package/esm/progress/style/css/index.css +50 -34
- package/esm/pull-refresh/style/css/index.css +50 -34
- package/esm/radio/style/css/index.css +50 -34
- package/esm/rate/style/css/index.css +50 -34
- package/esm/rate/style/index.less +2 -2
- package/esm/search-bar/style/css/index.css +50 -34
- package/esm/skeleton/style/css/index.css +50 -34
- package/esm/skeleton/style/index.less +2 -2
- package/esm/slider/style/css/index.css +50 -34
- package/esm/slider/style/index.less +6 -6
- package/esm/stepper/style/css/index.css +50 -34
- package/esm/steps/style/css/index.css +50 -34
- package/esm/sticky/style/css/index.css +50 -34
- package/esm/style.d.ts +1 -0
- package/esm/style.js +2 -1
- package/esm/swipe-action/style/css/index.css +50 -34
- package/esm/swipe-load/style/css/index.css +50 -34
- package/esm/switch/style/css/index.css +50 -34
- package/esm/switch/style/index.less +8 -8
- package/esm/tab-bar/style/css/index.css +50 -34
- package/esm/tabs/style/css/index.css +50 -34
- package/esm/tabs/tab-cell.js +2 -2
- package/esm/tag/style/css/index.css +50 -34
- package/esm/textarea/style/css/index.css +50 -34
- package/esm/toast/style/css/index.css +50 -34
- package/esm/transition/style/css/index.css +50 -34
- package/esm/uploader/index.d.ts +16 -0
- package/esm/uploader/index.js +150 -0
- package/esm/uploader/style/css/index.css +666 -0
- package/esm/uploader/style/css/index.d.ts +4 -0
- package/esm/uploader/style/css/index.js +4 -0
- package/esm/uploader/style/index.d.ts +4 -0
- package/esm/uploader/style/index.js +4 -0
- package/esm/uploader/style/index.less +161 -0
- package/esm/uploader/type.d.ts +108 -0
- package/esm/uploader/type.js +1 -0
- package/esm/uploader/upload/index.d.ts +2 -0
- package/esm/uploader/upload/index.js +2 -0
- package/esm/uploader/upload/type.d.ts +107 -0
- package/esm/uploader/upload/type.js +1 -0
- package/esm/uploader/upload/upload.d.ts +20 -0
- package/esm/uploader/upload/upload.js +175 -0
- package/package.json +3 -6
- package/style/css/public.css +50 -34
- package/tokens/app/arcodesign/default/css-variables.less +27 -0
- package/tokens/app/arcodesign/default/index.d.ts +27 -0
- package/tokens/app/arcodesign/default/index.js +28 -1
- package/tokens/app/arcodesign/default/index.json +292 -0
- package/tokens/app/arcodesign/default/index.less +27 -0
- package/tokens/mixin/index.less +80 -3
- package/tokens/mixin/vars-switch.less +1 -0
- package/umd/action-sheet/style/css/index.css +50 -34
- package/umd/avatar/style/css/index.css +50 -34
- package/umd/badge/style/css/index.css +50 -34
- package/umd/button/style/css/index.css +50 -34
- package/umd/carousel/style/css/index.css +50 -34
- package/umd/cell/style/css/index.css +50 -34
- package/umd/cell/style/index.less +2 -2
- package/umd/checkbox/style/css/index.css +50 -34
- package/umd/circle-progress/style/css/index.css +50 -34
- package/umd/collapse/style/css/index.css +50 -34
- package/umd/count-down/style/css/index.css +50 -34
- package/umd/date-picker/style/css/index.css +50 -34
- package/umd/dialog/style/css/index.css +50 -34
- package/umd/divider/style/css/index.css +50 -34
- package/umd/dropdown/style/css/index.css +50 -34
- package/umd/dropdown-menu/style/css/index.css +50 -34
- package/umd/ellipsis/style/css/index.css +50 -34
- package/umd/form/form-item.d.ts +3 -0
- package/umd/form/form-item.js +38 -10
- package/umd/form/style/css/index.css +63 -34
- package/umd/form/style/index.less +18 -0
- package/umd/grid/style/css/index.css +50 -34
- package/umd/icon/IconCheck/index.js +1 -2
- package/umd/icon/IconDownload/index.d.ts +7 -0
- package/umd/icon/IconDownload/index.js +49 -0
- package/umd/icon/IconFile/index.d.ts +7 -0
- package/umd/icon/IconFile/index.js +49 -0
- package/umd/icon/IconKeyboard/index.js +1 -0
- package/umd/icon/IconQuestionCircle/index.js +1 -2
- package/umd/icon/IconUpload/index.js +6 -4
- package/umd/icon/IconUserFill/index.js +1 -2
- package/umd/icon/index.d.ts +3 -1
- package/umd/icon/index.js +15 -9
- package/umd/icon/type.d.ts +3 -1
- package/umd/image/style/css/index.css +50 -34
- package/umd/image-picker/index.js +17 -163
- package/umd/image-picker/style/css/index.css +50 -34
- package/umd/image-picker/type.d.ts +4 -73
- package/umd/image-preview/style/css/index.css +50 -34
- package/umd/index-bar/style/css/index.css +50 -34
- package/umd/index.d.ts +1 -0
- package/umd/index.js +7 -5
- package/umd/input/hooks.js +2 -2
- package/umd/input/props.d.ts +2 -2
- package/umd/input/style/css/index.css +50 -34
- package/umd/keyboard/style/css/index.css +50 -34
- package/umd/load-more/style/css/index.css +50 -34
- package/umd/loading/style/css/index.css +50 -34
- package/umd/masking/style/css/index.css +50 -34
- package/umd/nav-bar/style/css/index.css +50 -34
- package/umd/notice-bar/style/css/index.css +50 -34
- package/umd/notice-bar/style/index.less +2 -2
- package/umd/notify/style/css/index.css +50 -34
- package/umd/pagination/style/css/index.css +50 -34
- package/umd/pagination/style/index.less +4 -4
- package/umd/picker/index.js +59 -19
- package/umd/picker/style/css/index.css +50 -34
- package/umd/picker/type.d.ts +6 -1
- package/umd/picker-view/style/css/index.css +50 -34
- package/umd/popover/style/css/index.css +50 -34
- package/umd/popover/style/css/menu.css +50 -34
- package/umd/popup/style/css/index.css +50 -34
- package/umd/popup-swiper/style/css/index.css +50 -34
- package/umd/progress/style/css/index.css +50 -34
- package/umd/pull-refresh/style/css/index.css +50 -34
- package/umd/radio/style/css/index.css +50 -34
- package/umd/rate/style/css/index.css +50 -34
- package/umd/rate/style/index.less +2 -2
- package/umd/search-bar/style/css/index.css +50 -34
- package/umd/skeleton/style/css/index.css +50 -34
- package/umd/skeleton/style/index.less +2 -2
- package/umd/slider/style/css/index.css +50 -34
- package/umd/slider/style/index.less +6 -6
- package/umd/stepper/style/css/index.css +50 -34
- package/umd/steps/style/css/index.css +50 -34
- package/umd/sticky/style/css/index.css +50 -34
- package/umd/style.d.ts +1 -0
- package/umd/style.js +4 -4
- package/umd/swipe-action/style/css/index.css +50 -34
- package/umd/swipe-load/style/css/index.css +50 -34
- package/umd/switch/style/css/index.css +50 -34
- package/umd/switch/style/index.less +8 -8
- package/umd/tab-bar/style/css/index.css +50 -34
- package/umd/tabs/style/css/index.css +50 -34
- package/umd/tabs/tab-cell.js +1 -1
- package/umd/tag/style/css/index.css +50 -34
- package/umd/textarea/style/css/index.css +50 -34
- package/umd/toast/style/css/index.css +50 -34
- package/umd/transition/style/css/index.css +50 -34
- package/umd/uploader/index.d.ts +16 -0
- package/umd/uploader/index.js +178 -0
- package/umd/uploader/style/css/index.css +666 -0
- package/umd/uploader/style/css/index.d.ts +4 -0
- package/umd/uploader/style/css/index.js +15 -0
- package/umd/uploader/style/index.d.ts +4 -0
- package/umd/uploader/style/index.js +15 -0
- package/umd/uploader/style/index.less +161 -0
- package/umd/uploader/type.d.ts +108 -0
- package/umd/uploader/type.js +17 -0
- package/umd/uploader/upload/index.d.ts +2 -0
- package/umd/uploader/upload/index.js +27 -0
- package/umd/uploader/upload/type.d.ts +107 -0
- package/umd/uploader/upload/type.js +17 -0
- package/umd/uploader/upload/upload.d.ts +20 -0
- package/umd/uploader/upload/upload.js +200 -0
@@ -42,8 +42,7 @@
|
|
42
42
|
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
43
43
|
fillRule: "evenodd",
|
44
44
|
clipRule: "evenodd",
|
45
|
-
d: "M7.982.68a7.312 7.312 0 110 14.625 7.312 7.312 0 010-14.625zm0 1.33a5.983 5.983 0 100 11.965 5.983 5.983 0 000-11.966zm.333 8.641c.183 0 .332.15.332.333v.664a.332.332 0 01-.332.333H7.65a.332.332 0 01-.332-.333v-.664c0-.184.148-.333.332-.333h.665zm-.427-6.647c.79 0 1.447.19 1.97.574.522.382.784.95.784 1.7 0 .461-.114.85-.341 1.165-.133.191-.389.436-.766.733l-.373.293c-.202.16-.337.345-.403.558a1.8 1.8 0 00-.048.323.332.332 0 01-.331.304h-.744a.332.332 0 01-.331-.363c.043-.463.088-.755.137-.878.091-.229.325-.492.703-.79l.383-.302c.126-.096.774-.553.774-.957 0-.405-.07-.553-.273-.775-.203-.222-.66-.294-1.073-.294-.405 0-.752.108-.922.38a1.921 1.921 0 00-.189.4 1.388 1.388 0 00-.048.204.332.332 0 01-.328.276h-.782a.332.332 0 01-.33-.37c.008-.074.017-.136.025-.185.13-.722.458-1.253.985-1.592.413-.27.92-.404 1.521-.404z"
|
46
|
-
fill: useCurrentColor ? 'currentColor' : '#000'
|
45
|
+
d: "M7.982.68a7.312 7.312 0 110 14.625 7.312 7.312 0 010-14.625zm0 1.33a5.983 5.983 0 100 11.965 5.983 5.983 0 000-11.966zm.333 8.641c.183 0 .332.15.332.333v.664a.332.332 0 01-.332.333H7.65a.332.332 0 01-.332-.333v-.664c0-.184.148-.333.332-.333h.665zm-.427-6.647c.79 0 1.447.19 1.97.574.522.382.784.95.784 1.7 0 .461-.114.85-.341 1.165-.133.191-.389.436-.766.733l-.373.293c-.202.16-.337.345-.403.558a1.8 1.8 0 00-.048.323.332.332 0 01-.331.304h-.744a.332.332 0 01-.331-.363c.043-.463.088-.755.137-.878.091-.229.325-.492.703-.79l.383-.302c.126-.096.774-.553.774-.957 0-.405-.07-.553-.273-.775-.203-.222-.66-.294-1.073-.294-.405 0-.752.108-.922.38a1.921 1.921 0 00-.189.4 1.388 1.388 0 00-.048.204.332.332 0 01-.328.276h-.782a.332.332 0 01-.33-.37c.008-.074.017-.136.025-.185.13-.722.458-1.253.985-1.592.413-.27.92-.404 1.521-.404z"
|
47
46
|
}));
|
48
47
|
});
|
49
48
|
}
|
@@ -37,10 +37,12 @@
|
|
37
37
|
height: "1em",
|
38
38
|
style: style,
|
39
39
|
fill: useCurrentColor ? 'currentColor' : '#000',
|
40
|
-
|
41
|
-
|
42
|
-
}, other), /*#__PURE__*/_react.default.createElement("
|
43
|
-
d: "
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
41
|
+
viewBox: "0 0 14 14"
|
42
|
+
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
43
|
+
d: "M7,1.5l3.1,3.1L9.2,5.4L7.6,3.7v5.9H6.4V3.7L4.8,5.4L3.9,4.6L7,1.5z M2.9,11.4v-1.2H1.8v2.3h10.5\tv-2.3h-1.2v1.2H2.9z",
|
44
|
+
fillRule: "evenodd",
|
45
|
+
clipRule: "evenodd"
|
44
46
|
}));
|
45
47
|
});
|
46
48
|
}
|
@@ -40,8 +40,7 @@
|
|
40
40
|
fill: useCurrentColor ? 'currentColor' : '#000',
|
41
41
|
xmlns: "http://www.w3.org/2000/svg"
|
42
42
|
}, other), /*#__PURE__*/_react.default.createElement("path", {
|
43
|
-
d: "M12.5 10.833c2.301 0 5 1.786 5 5v2.5c0 .46-.373.834-.833.834H3.333a.833.833 0 01-.833-.834v-2.5c0-3.211 2.699-5 5-5h5zM10 1.25a4.167 4.167 0 110 8.333 4.167 4.167 0 010-8.333z"
|
44
|
-
fill: useCurrentColor ? 'currentColor' : '#000'
|
43
|
+
d: "M12.5 10.833c2.301 0 5 1.786 5 5v2.5c0 .46-.373.834-.833.834H3.333a.833.833 0 01-.833-.834v-2.5c0-3.211 2.699-5 5-5h5zM10 1.25a4.167 4.167 0 110 8.333 4.167 4.167 0 010-8.333z"
|
45
44
|
}));
|
46
45
|
});
|
47
46
|
}
|
package/umd/icon/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export { default as IconUpload } from './IconUpload';
|
2
1
|
export { default as IconSquareChecked } from './IconSquareChecked';
|
3
2
|
export { default as IconTriUp } from './IconTriUp';
|
4
3
|
export { default as IconMore } from './IconMore';
|
@@ -54,4 +53,7 @@ export { default as IconGift } from './IconGift';
|
|
54
53
|
export { default as IconStarHalf } from './IconStarHalf';
|
55
54
|
export { default as IconKeyboard } from './IconKeyboard';
|
56
55
|
export { default as IconKeyboardDelete } from './IconKeyboardDelete';
|
56
|
+
export { default as IconDownload } from './IconDownload';
|
57
|
+
export { default as IconFile } from './IconFile';
|
58
|
+
export { default as IconUpload } from './IconUpload';
|
57
59
|
export * from './type';
|
package/umd/icon/index.js
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./
|
3
|
+
define(["exports", "./IconSquareChecked", "./IconTriUp", "./IconMore", "./IconSound", "./IconEyeVisible", "./IconEyelashInvisible", "./IconWarnCircleFill", "./IconSquareDisabled", "./IconCircleChecked", "./IconSquareUnchecked", "./IconUser", "./IconEyeInvisible", "./IconCircleUnchecked", "./IconCircleDisabled", "./IconSetting", "./IconMinus", "./IconDelete", "./IconPlay", "./IconHeart", "./IconStarFill", "./IconSearch", "./IconEdit", "./IconSad", "./IconLikeCircle", "./IconNotice", "./IconHome", "./IconArrowIn", "./IconCheck", "./IconNoticeOff", "./IconSmileFill", "./IconStar", "./IconRefresh", "./IconScan", "./IconPicture", "./IconTriDown", "./IconClose", "./IconArrowUp", "./IconArrowBack", "./IconArrowDown", "./IconAdd", "./IconUserFill", "./IconClear", "./IconQuestionCircle", "./IconSuccessCircle", "./IconWarnCircle", "./IconErrorCircle", "./IconCheckBold", "./IconCloseBold", "./IconShop", "./IconShopping", "./IconSubway", "./IconGift", "./IconStarHalf", "./IconKeyboard", "./IconKeyboardDelete", "./IconDownload", "./IconFile", "./IconUpload", "./type"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./
|
5
|
+
factory(exports, require("./IconSquareChecked"), require("./IconTriUp"), require("./IconMore"), require("./IconSound"), require("./IconEyeVisible"), require("./IconEyelashInvisible"), require("./IconWarnCircleFill"), require("./IconSquareDisabled"), require("./IconCircleChecked"), require("./IconSquareUnchecked"), require("./IconUser"), require("./IconEyeInvisible"), require("./IconCircleUnchecked"), require("./IconCircleDisabled"), require("./IconSetting"), require("./IconMinus"), require("./IconDelete"), require("./IconPlay"), require("./IconHeart"), require("./IconStarFill"), require("./IconSearch"), require("./IconEdit"), require("./IconSad"), require("./IconLikeCircle"), require("./IconNotice"), require("./IconHome"), require("./IconArrowIn"), require("./IconCheck"), require("./IconNoticeOff"), require("./IconSmileFill"), require("./IconStar"), require("./IconRefresh"), require("./IconScan"), require("./IconPicture"), require("./IconTriDown"), require("./IconClose"), require("./IconArrowUp"), require("./IconArrowBack"), require("./IconArrowDown"), require("./IconAdd"), require("./IconUserFill"), require("./IconClear"), require("./IconQuestionCircle"), require("./IconSuccessCircle"), require("./IconWarnCircle"), require("./IconErrorCircle"), require("./IconCheckBold"), require("./IconCloseBold"), require("./IconShop"), require("./IconShopping"), require("./IconSubway"), require("./IconGift"), require("./IconStarHalf"), require("./IconKeyboard"), require("./IconKeyboardDelete"), require("./IconDownload"), require("./IconFile"), require("./IconUpload"), require("./type"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.
|
10
|
+
factory(mod.exports, global.IconSquareChecked, global.IconTriUp, global.IconMore, global.IconSound, global.IconEyeVisible, global.IconEyelashInvisible, global.IconWarnCircleFill, global.IconSquareDisabled, global.IconCircleChecked, global.IconSquareUnchecked, global.IconUser, global.IconEyeInvisible, global.IconCircleUnchecked, global.IconCircleDisabled, global.IconSetting, global.IconMinus, global.IconDelete, global.IconPlay, global.IconHeart, global.IconStarFill, global.IconSearch, global.IconEdit, global.IconSad, global.IconLikeCircle, global.IconNotice, global.IconHome, global.IconArrowIn, global.IconCheck, global.IconNoticeOff, global.IconSmileFill, global.IconStar, global.IconRefresh, global.IconScan, global.IconPicture, global.IconTriDown, global.IconClose, global.IconArrowUp, global.IconArrowBack, global.IconArrowDown, global.IconAdd, global.IconUserFill, global.IconClear, global.IconQuestionCircle, global.IconSuccessCircle, global.IconWarnCircle, global.IconErrorCircle, global.IconCheckBold, global.IconCloseBold, global.IconShop, global.IconShopping, global.IconSubway, global.IconGift, global.IconStarHalf, global.IconKeyboard, global.IconKeyboardDelete, global.IconDownload, global.IconFile, global.IconUpload, global.type);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _IconSquareChecked, _IconTriUp, _IconMore, _IconSound, _IconEyeVisible, _IconEyelashInvisible, _IconWarnCircleFill, _IconSquareDisabled, _IconCircleChecked, _IconSquareUnchecked, _IconUser, _IconEyeInvisible, _IconCircleUnchecked, _IconCircleDisabled, _IconSetting, _IconMinus, _IconDelete, _IconPlay, _IconHeart, _IconStarFill, _IconSearch, _IconEdit, _IconSad, _IconLikeCircle, _IconNotice, _IconHome, _IconArrowIn, _IconCheck, _IconNoticeOff, _IconSmileFill, _IconStar, _IconRefresh, _IconScan, _IconPicture, _IconTriDown, _IconClose, _IconArrowUp, _IconArrowBack, _IconArrowDown, _IconAdd, _IconUserFill, _IconClear, _IconQuestionCircle, _IconSuccessCircle, _IconWarnCircle, _IconErrorCircle, _IconCheckBold, _IconCloseBold, _IconShop, _IconShopping, _IconSubway, _IconGift, _IconStarHalf, _IconKeyboard, _IconKeyboardDelete, _IconDownload, _IconFile, _IconUpload, _type) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
17
17
|
|
18
18
|
_exports.__esModule = true;
|
19
19
|
var _exportNames = {
|
20
|
-
IconUpload: true,
|
21
20
|
IconSquareChecked: true,
|
22
21
|
IconTriUp: true,
|
23
22
|
IconMore: true,
|
@@ -72,11 +71,12 @@
|
|
72
71
|
IconGift: true,
|
73
72
|
IconStarHalf: true,
|
74
73
|
IconKeyboard: true,
|
75
|
-
IconKeyboardDelete: true
|
74
|
+
IconKeyboardDelete: true,
|
75
|
+
IconDownload: true,
|
76
|
+
IconFile: true,
|
77
|
+
IconUpload: true
|
76
78
|
};
|
77
|
-
_exports.IconWarnCircleFill = _exports.IconWarnCircle = _exports.IconUserFill = _exports.IconUser = _exports.IconUpload = _exports.IconTriUp = _exports.IconTriDown = _exports.IconSuccessCircle = _exports.IconSubway = _exports.IconStarHalf = _exports.IconStarFill = _exports.IconStar = _exports.IconSquareUnchecked = _exports.IconSquareDisabled = _exports.IconSquareChecked = _exports.IconSound = _exports.IconSmileFill = _exports.IconShopping = _exports.IconShop = _exports.IconSetting = _exports.IconSearch = _exports.IconScan = _exports.IconSad = _exports.IconRefresh = _exports.IconQuestionCircle = _exports.IconPlay = _exports.IconPicture = _exports.IconNoticeOff = _exports.IconNotice = _exports.IconMore = _exports.IconMinus = _exports.IconLikeCircle = _exports.IconKeyboardDelete = _exports.IconKeyboard = _exports.IconHome = _exports.IconHeart = _exports.IconGift = _exports.IconEyelashInvisible = _exports.IconEyeVisible = _exports.IconEyeInvisible = _exports.IconErrorCircle = _exports.IconEdit = _exports.IconDelete = _exports.IconCloseBold = _exports.IconClose = _exports.IconClear = _exports.IconCircleUnchecked = _exports.IconCircleDisabled = _exports.IconCircleChecked = _exports.IconCheckBold = _exports.IconCheck = _exports.IconArrowUp = _exports.IconArrowIn = _exports.IconArrowDown = _exports.IconArrowBack = _exports.IconAdd = void 0;
|
78
|
-
_IconUpload = _interopRequireDefault(_IconUpload);
|
79
|
-
_exports.IconUpload = _IconUpload.default;
|
79
|
+
_exports.IconWarnCircleFill = _exports.IconWarnCircle = _exports.IconUserFill = _exports.IconUser = _exports.IconUpload = _exports.IconTriUp = _exports.IconTriDown = _exports.IconSuccessCircle = _exports.IconSubway = _exports.IconStarHalf = _exports.IconStarFill = _exports.IconStar = _exports.IconSquareUnchecked = _exports.IconSquareDisabled = _exports.IconSquareChecked = _exports.IconSound = _exports.IconSmileFill = _exports.IconShopping = _exports.IconShop = _exports.IconSetting = _exports.IconSearch = _exports.IconScan = _exports.IconSad = _exports.IconRefresh = _exports.IconQuestionCircle = _exports.IconPlay = _exports.IconPicture = _exports.IconNoticeOff = _exports.IconNotice = _exports.IconMore = _exports.IconMinus = _exports.IconLikeCircle = _exports.IconKeyboardDelete = _exports.IconKeyboard = _exports.IconHome = _exports.IconHeart = _exports.IconGift = _exports.IconFile = _exports.IconEyelashInvisible = _exports.IconEyeVisible = _exports.IconEyeInvisible = _exports.IconErrorCircle = _exports.IconEdit = _exports.IconDownload = _exports.IconDelete = _exports.IconCloseBold = _exports.IconClose = _exports.IconClear = _exports.IconCircleUnchecked = _exports.IconCircleDisabled = _exports.IconCircleChecked = _exports.IconCheckBold = _exports.IconCheck = _exports.IconArrowUp = _exports.IconArrowIn = _exports.IconArrowDown = _exports.IconArrowBack = _exports.IconAdd = void 0;
|
80
80
|
_IconSquareChecked = _interopRequireDefault(_IconSquareChecked);
|
81
81
|
_exports.IconSquareChecked = _IconSquareChecked.default;
|
82
82
|
_IconTriUp = _interopRequireDefault(_IconTriUp);
|
@@ -187,6 +187,12 @@
|
|
187
187
|
_exports.IconKeyboard = _IconKeyboard.default;
|
188
188
|
_IconKeyboardDelete = _interopRequireDefault(_IconKeyboardDelete);
|
189
189
|
_exports.IconKeyboardDelete = _IconKeyboardDelete.default;
|
190
|
+
_IconDownload = _interopRequireDefault(_IconDownload);
|
191
|
+
_exports.IconDownload = _IconDownload.default;
|
192
|
+
_IconFile = _interopRequireDefault(_IconFile);
|
193
|
+
_exports.IconFile = _IconFile.default;
|
194
|
+
_IconUpload = _interopRequireDefault(_IconUpload);
|
195
|
+
_exports.IconUpload = _IconUpload.default;
|
190
196
|
Object.keys(_type).forEach(function (key) {
|
191
197
|
if (key === "default" || key === "__esModule") return;
|
192
198
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
package/umd/icon/type.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export interface
|
2
|
+
export interface OriginIconProps extends React.SVGProps<SVGSVGElement> {
|
3
3
|
className?: string;
|
4
4
|
prefix?: string;
|
5
5
|
width?: string;
|
6
6
|
height?: string;
|
7
7
|
useCurrentColor?: boolean;
|
8
|
+
spin?: boolean;
|
8
9
|
}
|
10
|
+
export declare type IconProps = React.PropsWithoutRef<OriginIconProps> & React.RefAttributes<SVGSVGElement>;
|
@@ -95,6 +95,56 @@
|
|
95
95
|
* }
|
96
96
|
* ```
|
97
97
|
*/
|
98
|
+
/**
|
99
|
+
* 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
|
100
|
+
* @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
|
101
|
+
* @param @property css属性名
|
102
|
+
* @param @property {en} css property
|
103
|
+
* @param @value css属性值
|
104
|
+
* @param @value {en} css property value
|
105
|
+
* @param @rules 自定义的复写规则,默认重置为initial
|
106
|
+
* @param @rules {en} customized rewrite rules, default to initial
|
107
|
+
* @example
|
108
|
+
* ```
|
109
|
+
* @import '@arco-design/mobile-utils/style/mixin.less';
|
110
|
+
*
|
111
|
+
* .demo {
|
112
|
+
* .set-prop-with-rtl(right, auto);
|
113
|
+
* }
|
114
|
+
* ```
|
115
|
+
*/
|
116
|
+
/**
|
117
|
+
* 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
|
118
|
+
* @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
|
119
|
+
* @param @property css属性名
|
120
|
+
* @param @property {en} css property
|
121
|
+
* @param @value css属性值
|
122
|
+
* @param @value {en} css property value
|
123
|
+
* @example
|
124
|
+
* ```
|
125
|
+
* @import '@arco-design/mobile-utils/style/mixin.less';
|
126
|
+
*
|
127
|
+
* .demo {
|
128
|
+
* .set-value-with-rtl(text-align, left);
|
129
|
+
* }
|
130
|
+
* ```
|
131
|
+
*/
|
132
|
+
/**
|
133
|
+
* 在 rtl 模式下,自定义样式规则
|
134
|
+
* @desc {en} custom style in RTL mode
|
135
|
+
* @param @rules 对应的rtl模式下的规则
|
136
|
+
* @param @rules {en} property with rtl
|
137
|
+
* @example
|
138
|
+
* ```
|
139
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
140
|
+
*
|
141
|
+
* .demo {
|
142
|
+
* .style-with-rtl({
|
143
|
+
* transform: scale(-1);
|
144
|
+
* });
|
145
|
+
* }
|
146
|
+
* ```
|
147
|
+
*/
|
98
148
|
/**
|
99
149
|
* 0.5px 的边框线
|
100
150
|
* @desc {en} a border line of 0.5 pixels
|
@@ -396,40 +446,6 @@
|
|
396
446
|
* }
|
397
447
|
* ```
|
398
448
|
*/
|
399
|
-
/**
|
400
|
-
* 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
|
401
|
-
* @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
|
402
|
-
* @param @property css属性名
|
403
|
-
* @param @property {en} css property
|
404
|
-
* @param @value css属性值
|
405
|
-
* @param @value {en} css property value
|
406
|
-
* @param @rules 自定义的复写规则,默认重置为initial
|
407
|
-
* @param @rules {en} customized rewrite rules, default to initial
|
408
|
-
* @example
|
409
|
-
* ```
|
410
|
-
* @import '@arco-design/mobile-utils/style/mixin.less';
|
411
|
-
*
|
412
|
-
* .demo {
|
413
|
-
* .set-prop-with-rtl(right, auto);
|
414
|
-
* }
|
415
|
-
* ```
|
416
|
-
*/
|
417
|
-
/**
|
418
|
-
* 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
|
419
|
-
* @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
|
420
|
-
* @param @property css属性名
|
421
|
-
* @param @property {en} css property
|
422
|
-
* @param @value css属性值
|
423
|
-
* @param @value {en} css property value
|
424
|
-
* @example
|
425
|
-
* ```
|
426
|
-
* @import '@arco-design/mobile-utils/style/mixin.less';
|
427
|
-
*
|
428
|
-
* .demo {
|
429
|
-
* .set-value-with-rtl(text-align, left);
|
430
|
-
* }
|
431
|
-
* ```
|
432
|
-
*/
|
433
449
|
/**
|
434
450
|
* 设置Loading组件颜色
|
435
451
|
* @desc {en} set Loading component color
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "@babel/runtime/helpers/extends", "react", "
|
3
|
+
define(["exports", "@babel/runtime/helpers/extends", "react", "@arco-design/mobile-utils", "../context-provider", "../icon", "../image", "../grid", "./add-icon", "../_helpers", "../uploader/upload", "./type"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("
|
5
|
+
factory(exports, require("@babel/runtime/helpers/extends"), require("react"), require("@arco-design/mobile-utils"), require("../context-provider"), require("../icon"), require("../image"), require("../grid"), require("./add-icon"), require("../_helpers"), require("../uploader/upload"), require("./type"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global._extends, global.react, global.
|
10
|
+
factory(mod.exports, global._extends, global.react, global.mobileUtils, global.contextProvider, global.icon, global.image, global.grid, global.addIcon, global._helpers, global.upload, global.type);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _extends2, _react, _mobileUtils, _contextProvider, _icon, _image, _grid, _addIcon, _helpers, _upload, _type) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
@@ -51,7 +51,6 @@
|
|
51
51
|
limit = _props$limit === void 0 ? 0 : _props$limit,
|
52
52
|
_props$images = props.images,
|
53
53
|
images = _props$images === void 0 ? [] : _props$images,
|
54
|
-
maxSize = props.maxSize,
|
55
54
|
disabled = props.disabled,
|
56
55
|
deleteIcon = props.deleteIcon,
|
57
56
|
selectIcon = props.selectIcon,
|
@@ -64,18 +63,7 @@
|
|
64
63
|
imageProps = props.imageProps,
|
65
64
|
renderLoading = props.renderLoading,
|
66
65
|
renderError = props.renderError,
|
67
|
-
|
68
|
-
onClick = props.onClick,
|
69
|
-
_props$onChange = props.onChange,
|
70
|
-
onChange = _props$onChange === void 0 ? function () {
|
71
|
-
return null;
|
72
|
-
} : _props$onChange,
|
73
|
-
onMaxSizeExceed = props.onMaxSizeExceed,
|
74
|
-
onLimitExceed = props.onLimitExceed,
|
75
|
-
upload = props.upload,
|
76
|
-
selectAdapter = props.selectAdapter,
|
77
|
-
onSelectClick = props.onSelectClick,
|
78
|
-
onDeleteClick = props.onDeleteClick;
|
66
|
+
selectAdapter = props.selectAdapter;
|
79
67
|
var domRef = (0, _react.useRef)(null);
|
80
68
|
var fileRef = (0, _react.useRef)(null);
|
81
69
|
var cacheRef = (0, _helpers.useLatestRef)(images);
|
@@ -84,143 +72,9 @@
|
|
84
72
|
dom: domRef.current
|
85
73
|
};
|
86
74
|
});
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
if (file.url) {
|
91
|
-
resolve(file.url);
|
92
|
-
} else {
|
93
|
-
var reader = new FileReader();
|
94
|
-
|
95
|
-
reader.onload = function (e) {
|
96
|
-
var _e$target;
|
97
|
-
|
98
|
-
var dataURL = (_e$target = e.target) == null ? void 0 : _e$target.result;
|
99
|
-
|
100
|
-
if (!dataURL) {
|
101
|
-
reject(new Error('file parse error'));
|
102
|
-
}
|
103
|
-
|
104
|
-
resolve(dataURL);
|
105
|
-
};
|
106
|
-
|
107
|
-
reader.onerror = function () {
|
108
|
-
reject(new Error('file parse error'));
|
109
|
-
};
|
110
|
-
|
111
|
-
reader.readAsDataURL(file);
|
112
|
-
}
|
113
|
-
});
|
114
|
-
};
|
115
|
-
|
116
|
-
var handleChange = function handleChange(event, fromAdapter) {
|
117
|
-
var files = Array.prototype.filter.call(event.target.files || [], function (file) {
|
118
|
-
// 过滤maxSize
|
119
|
-
if (maxSize && file.size > maxSize * 1024) {
|
120
|
-
onMaxSizeExceed && onMaxSizeExceed(file);
|
121
|
-
return false;
|
122
|
-
}
|
123
|
-
|
124
|
-
return true;
|
125
|
-
}) || [];
|
126
|
-
|
127
|
-
if (!fromAdapter) {
|
128
|
-
event.target.value = '';
|
129
|
-
} // 截断limit
|
130
|
-
|
131
|
-
|
132
|
-
if (limit !== 0 && files.length + images.length > limit) {
|
133
|
-
onLimitExceed && onLimitExceed(files);
|
134
|
-
files.length = limit - images.length;
|
135
|
-
} // 解析文件生成预览
|
136
|
-
|
137
|
-
|
138
|
-
_es6Promise.Promise.all(files.map(function (file) {
|
139
|
-
return parseFile(file);
|
140
|
-
})).then(function (parseFiles) {
|
141
|
-
var res = parseFiles.map(function (url, index) {
|
142
|
-
return {
|
143
|
-
url: url,
|
144
|
-
status: typeof upload === 'function' ? 'loading' : 'loaded',
|
145
|
-
file: files[index]
|
146
|
-
};
|
147
|
-
});
|
148
|
-
cacheRef.current = [].concat(cacheRef.current, res);
|
149
|
-
onChange([].concat(cacheRef.current)); // 执行upload
|
150
|
-
|
151
|
-
if (typeof upload === 'function') {
|
152
|
-
files.forEach(function (_file) {
|
153
|
-
upload(cacheRef.current.find(function (_ref) {
|
154
|
-
var file = _ref.file;
|
155
|
-
return file === _file;
|
156
|
-
})).then(function (data) {
|
157
|
-
var index = cacheRef.current.findIndex(function (_ref2) {
|
158
|
-
var file = _ref2.file;
|
159
|
-
return file === _file;
|
160
|
-
});
|
161
|
-
|
162
|
-
if (index !== -1) {
|
163
|
-
cacheRef.current[index] = (0, _extends2.default)({}, cacheRef.current[index], data, {
|
164
|
-
status: undefined
|
165
|
-
});
|
166
|
-
}
|
167
|
-
}).catch(function () {
|
168
|
-
var index = cacheRef.current.findIndex(function (_ref3) {
|
169
|
-
var file = _ref3.file;
|
170
|
-
return file === _file;
|
171
|
-
});
|
172
|
-
|
173
|
-
if (index !== -1) {
|
174
|
-
cacheRef.current[index].status = 'error';
|
175
|
-
}
|
176
|
-
}).finally(function () {
|
177
|
-
onChange([].concat(cacheRef.current));
|
178
|
-
});
|
179
|
-
});
|
180
|
-
}
|
181
|
-
});
|
182
|
-
};
|
183
|
-
|
184
|
-
var handleDelete = function handleDelete(index) {
|
185
|
-
onDeleteClick && onDeleteClick(index);
|
186
|
-
onChange(images.filter(function (_i, j) {
|
187
|
-
return j !== index;
|
188
|
-
}));
|
189
|
-
}; // click && longPress
|
190
|
-
|
191
|
-
|
192
|
-
var timeOutEvent;
|
193
|
-
|
194
|
-
var handleTouchStart = function handleTouchStart(e, image, index) {
|
195
|
-
timeOutEvent = setTimeout(function () {
|
196
|
-
timeOutEvent = 0;
|
197
|
-
onLongPress == null ? void 0 : onLongPress(e, image, index);
|
198
|
-
}, 750);
|
199
|
-
};
|
200
|
-
|
201
|
-
var handleClick = function handleClick(e, image, index) {
|
202
|
-
clearTimeout(timeOutEvent);
|
203
|
-
|
204
|
-
if (timeOutEvent !== 0) {
|
205
|
-
onClick == null ? void 0 : onClick(e, image, index);
|
206
|
-
}
|
207
|
-
};
|
208
|
-
|
209
|
-
var handleSelect = function handleSelect(e) {
|
210
|
-
if (e.target !== fileRef.current) {
|
211
|
-
var _fileRef$current;
|
212
|
-
|
213
|
-
onSelectClick && onSelectClick();
|
214
|
-
selectAdapter ? selectAdapter().then(function (_ref4) {
|
215
|
-
var files = _ref4.files;
|
216
|
-
return handleChange({
|
217
|
-
target: {
|
218
|
-
files: files
|
219
|
-
}
|
220
|
-
}, true);
|
221
|
-
}) : (_fileRef$current = fileRef.current) == null ? void 0 : _fileRef$current.click();
|
222
|
-
}
|
223
|
-
};
|
75
|
+
var uploadFunc = new _upload.Upload((0, _extends2.default)({}, props, {
|
76
|
+
files: images
|
77
|
+
}), fileRef, cacheRef);
|
224
78
|
|
225
79
|
var getGridData = function getGridData(prefixCls, locale) {
|
226
80
|
var errorNode = function errorNode(index) {
|
@@ -250,10 +104,10 @@
|
|
250
104
|
className: prefixCls + "-image-picker-image"
|
251
105
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
252
106
|
onTouchStart: function onTouchStart(e) {
|
253
|
-
return handleTouchStart(e, image, index);
|
107
|
+
return uploadFunc.handleTouchStart(e, image, index);
|
254
108
|
},
|
255
109
|
onClick: function onClick(e) {
|
256
|
-
return handleClick(e, image, index);
|
110
|
+
return uploadFunc.handleClick(e, image, index);
|
257
111
|
},
|
258
112
|
className: prefixCls + "-image-picker-image-container"
|
259
113
|
}, /*#__PURE__*/_react.default.createElement(_image.default, (0, _extends2.default)({
|
@@ -269,7 +123,7 @@
|
|
269
123
|
})), !hideDelete && /*#__PURE__*/_react.default.createElement("div", {
|
270
124
|
className: prefixCls + "-image-picker-close",
|
271
125
|
onClick: function onClick() {
|
272
|
-
return
|
126
|
+
return uploadFunc.deleteFile(index);
|
273
127
|
}
|
274
128
|
}, deleteIcon || /*#__PURE__*/_react.default.createElement("div", {
|
275
129
|
className: prefixCls + "-image-picker-close-icon"
|
@@ -286,7 +140,7 @@
|
|
286
140
|
data.push({
|
287
141
|
img: /*#__PURE__*/_react.default.createElement("div", {
|
288
142
|
className: (0, _mobileUtils.cls)(prefixCls + "-image-picker-add", (_cls = {}, _cls[prefixCls + "-image-picker-add-disabled"] = disableSelect, _cls)),
|
289
|
-
onClick: handleSelect
|
143
|
+
onClick: uploadFunc.handleSelect
|
290
144
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
291
145
|
className: prefixCls + "-image-picker-add-container"
|
292
146
|
}, selectIcon || /*#__PURE__*/_react.default.createElement("div", {
|
@@ -297,7 +151,7 @@
|
|
297
151
|
multiple: multiple,
|
298
152
|
type: "file",
|
299
153
|
onChange: function onChange(e) {
|
300
|
-
return handleChange(e);
|
154
|
+
return uploadFunc.handleChange(e);
|
301
155
|
},
|
302
156
|
ref: fileRef
|
303
157
|
}) : null)),
|
@@ -308,12 +162,12 @@
|
|
308
162
|
return data;
|
309
163
|
};
|
310
164
|
|
311
|
-
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
|
312
166
|
var _cls2;
|
313
167
|
|
314
|
-
var prefixCls =
|
315
|
-
|
316
|
-
locale =
|
168
|
+
var prefixCls = _ref.prefixCls,
|
169
|
+
_ref$locale = _ref.locale,
|
170
|
+
locale = _ref$locale === void 0 ? _mobileUtils.defaultLocale : _ref$locale;
|
317
171
|
return /*#__PURE__*/_react.default.createElement("div", {
|
318
172
|
className: (0, _mobileUtils.cls)(prefixCls + "-image-picker", className, (_cls2 = {}, _cls2[prefixCls + "-image-picker-disabled"] = disabled, _cls2)),
|
319
173
|
style: style,
|
@@ -95,6 +95,56 @@
|
|
95
95
|
* }
|
96
96
|
* ```
|
97
97
|
*/
|
98
|
+
/**
|
99
|
+
* 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
|
100
|
+
* @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
|
101
|
+
* @param @property css属性名
|
102
|
+
* @param @property {en} css property
|
103
|
+
* @param @value css属性值
|
104
|
+
* @param @value {en} css property value
|
105
|
+
* @param @rules 自定义的复写规则,默认重置为initial
|
106
|
+
* @param @rules {en} customized rewrite rules, default to initial
|
107
|
+
* @example
|
108
|
+
* ```
|
109
|
+
* @import '@arco-design/mobile-utils/style/mixin.less';
|
110
|
+
*
|
111
|
+
* .demo {
|
112
|
+
* .set-prop-with-rtl(right, auto);
|
113
|
+
* }
|
114
|
+
* ```
|
115
|
+
*/
|
116
|
+
/**
|
117
|
+
* 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
|
118
|
+
* @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
|
119
|
+
* @param @property css属性名
|
120
|
+
* @param @property {en} css property
|
121
|
+
* @param @value css属性值
|
122
|
+
* @param @value {en} css property value
|
123
|
+
* @example
|
124
|
+
* ```
|
125
|
+
* @import '@arco-design/mobile-utils/style/mixin.less';
|
126
|
+
*
|
127
|
+
* .demo {
|
128
|
+
* .set-value-with-rtl(text-align, left);
|
129
|
+
* }
|
130
|
+
* ```
|
131
|
+
*/
|
132
|
+
/**
|
133
|
+
* 在 rtl 模式下,自定义样式规则
|
134
|
+
* @desc {en} custom style in RTL mode
|
135
|
+
* @param @rules 对应的rtl模式下的规则
|
136
|
+
* @param @rules {en} property with rtl
|
137
|
+
* @example
|
138
|
+
* ```
|
139
|
+
* @import '@arco-design/mobile-react/style/mixin.less';
|
140
|
+
*
|
141
|
+
* .demo {
|
142
|
+
* .style-with-rtl({
|
143
|
+
* transform: scale(-1);
|
144
|
+
* });
|
145
|
+
* }
|
146
|
+
* ```
|
147
|
+
*/
|
98
148
|
/**
|
99
149
|
* 0.5px 的边框线
|
100
150
|
* @desc {en} a border line of 0.5 pixels
|
@@ -396,40 +446,6 @@
|
|
396
446
|
* }
|
397
447
|
* ```
|
398
448
|
*/
|
399
|
-
/**
|
400
|
-
* 设置涉及左右相关的属性名,在rtl模式下自动替换为相反的属性名
|
401
|
-
* @desc {en} set the property name related to left and right, and automatically replace it with the opposite attribute name in rtl mode
|
402
|
-
* @param @property css属性名
|
403
|
-
* @param @property {en} css property
|
404
|
-
* @param @value css属性值
|
405
|
-
* @param @value {en} css property value
|
406
|
-
* @param @rules 自定义的复写规则,默认重置为initial
|
407
|
-
* @param @rules {en} customized rewrite rules, default to initial
|
408
|
-
* @example
|
409
|
-
* ```
|
410
|
-
* @import '@arco-design/mobile-utils/style/mixin.less';
|
411
|
-
*
|
412
|
-
* .demo {
|
413
|
-
* .set-prop-with-rtl(right, auto);
|
414
|
-
* }
|
415
|
-
* ```
|
416
|
-
*/
|
417
|
-
/**
|
418
|
-
* 设置涉及左右相关的属性值,在rtl模式下自动替换为相反的属性值
|
419
|
-
* @desc {en} set the property value related to left and right, and automatically replace it with the opposite attribute value in rtl mode
|
420
|
-
* @param @property css属性名
|
421
|
-
* @param @property {en} css property
|
422
|
-
* @param @value css属性值
|
423
|
-
* @param @value {en} css property value
|
424
|
-
* @example
|
425
|
-
* ```
|
426
|
-
* @import '@arco-design/mobile-utils/style/mixin.less';
|
427
|
-
*
|
428
|
-
* .demo {
|
429
|
-
* .set-value-with-rtl(text-align, left);
|
430
|
-
* }
|
431
|
-
* ```
|
432
|
-
*/
|
433
449
|
/**
|
434
450
|
* 设置Loading组件颜色
|
435
451
|
* @desc {en} set Loading component color
|