@cloud-app-dev/vidc 1.0.49 → 2.0.0-alpha.2
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/.umirc.ts +1 -2
- package/es/Api/index.d.ts +3 -4
- package/es/Api/index.js +7 -8
- package/es/AppContext/Sync.d.ts +6 -0
- package/es/AppContext/Sync.js +47 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +117 -0
- package/es/AppContext/interface.d.ts +29 -0
- package/es/AppContext/static.d.ts +6 -0
- package/es/AppContext/static.js +6 -0
- package/es/{AppLayout/AppTools → AppRedirect}/index.css +0 -0
- package/es/AppRedirect/index.d.ts +16 -0
- package/es/AppRedirect/index.js +38 -0
- package/es/AppRoute/Render.d.ts +23 -0
- package/es/AppRoute/Render.js +111 -0
- package/es/AppRoute/Rendered.d.ts +4 -0
- package/es/AppRoute/Rendered.js +11 -0
- package/es/{DagInitialConfig → AppRoute}/index.css +0 -0
- package/es/AppRoute/index.d.ts +14 -0
- package/es/{AppLayout/Header/NotifyAlarm.js → AppRoute/index.js} +52 -68
- package/es/AppRoute/interface.d.ts +18 -0
- package/es/AppRoute/utils.d.ts +1 -0
- package/es/AppRoute/utils.js +28 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +17 -0
- package/es/AutoExit/index.js +8 -5
- package/es/CheckGroupFixed/index.css +49 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/CheckGroupFixed/index.js +146 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +44 -0
- package/es/Config/interface.d.ts +47 -0
- package/es/Config/utils.d.ts +16 -0
- package/es/Config/utils.js +54 -0
- package/es/ConfigContext/index.d.ts +9 -0
- package/es/ConfigContext/index.js +3 -0
- package/es/ContentBox/BetweenBox/index.css +5 -0
- package/es/ContentBox/BetweenBox/index.d.ts +12 -0
- package/es/ContentBox/BetweenBox/index.js +24 -0
- package/es/ContentBox/InfoBox/index.css +23 -0
- package/es/ContentBox/InfoBox/index.d.ts +12 -0
- package/es/ContentBox/InfoBox/index.js +26 -0
- package/es/ContentBox/TwoColumnBox/index.css +77 -0
- package/es/ContentBox/TwoColumnBox/index.d.ts +10 -0
- package/es/ContentBox/TwoColumnBox/index.js +50 -0
- package/es/ContentBox/deps/content-grid.d.ts +9 -0
- package/es/ContentBox/deps/content-grid.js +9 -0
- package/es/ContentBox/deps/grid-factory.d.ts +10 -0
- package/es/ContentBox/deps/grid-factory.js +72 -0
- package/es/ContentBox/deps/simple-grid.d.ts +9 -0
- package/es/ContentBox/deps/simple-grid.js +8 -0
- package/es/ContentBox/index.css +9 -0
- package/es/ContentBox/index.d.ts +14 -0
- package/es/ContentBox/index.js +28 -0
- package/es/DeviceIcon/icon.js +5 -5
- package/es/DeviceIcon/index.js +2 -2
- package/es/DeviceList/index.d.ts +1 -1
- package/es/DeviceList/index.js +4 -4
- package/es/DeviceSelect/index.js +2 -2
- package/es/Dict/cache.d.ts +3 -0
- package/es/Dict/cache.js +21 -0
- package/es/Dict/desc.d.ts +64 -0
- package/es/Dict/desc.js +162 -0
- package/es/Dict/device.d.ts +28 -0
- package/es/Dict/device.js +117 -0
- package/es/Dict/hook.d.ts +4 -0
- package/es/Dict/hook.js +114 -0
- package/es/Dict/index.d.ts +13 -0
- package/es/Dict/index.js +14 -0
- package/es/Dict/interface.d.ts +16 -0
- package/es/Dict/utils.d.ts +11 -0
- package/es/Dict/utils.js +51 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DragAndDropItem.js +145 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/DropItem.js +54 -0
- package/es/{DagInitialRequest → Drag}/index.css +0 -0
- package/es/Drag/index.d.ts +7 -0
- package/es/Drag/index.js +7 -0
- package/es/Drag/interface.d.ts +16 -0
- package/es/Drawer/Demo.d.ts +3 -0
- package/es/Drawer/Demo.js +52 -0
- package/es/Drawer/Footer.d.ts +4 -0
- package/es/Drawer/Footer.js +26 -0
- package/es/Drawer/index.css +39 -0
- package/es/Drawer/index.d.ts +12 -0
- package/es/Drawer/index.js +41 -0
- package/es/Drawer/interface.d.ts +191 -0
- package/es/DynamicDeviceList/CheckExt.js +3 -3
- package/es/DynamicDeviceList/index.js +2 -2
- package/es/DynamicDeviceList/utils.js +2 -2
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/{DagInitialRequest/index.js → DynamicList/demo.js} +49 -55
- package/es/DynamicList/index.css +7 -0
- package/es/DynamicList/index.d.ts +31 -0
- package/es/DynamicList/index.js +132 -0
- package/es/FullScreen/index.css +16 -0
- package/es/FullScreen/index.d.ts +10 -0
- package/es/FullScreen/index.js +68 -0
- package/es/HightLevel/index.css +3 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/HightLevel/index.js +22 -0
- package/es/{Upload → IconFont}/index.css +0 -0
- package/es/IconFont/index.d.ts +13 -0
- package/es/IconFont/index.js +58 -0
- package/es/ImageView/index.css +6 -0
- package/es/ImageView/index.d.ts +17 -0
- package/es/ImageView/index.js +58 -0
- package/es/InitialConfig/index.d.ts +5 -7
- package/es/InitialConfig/index.js +16 -51
- package/es/InitialConfig/utils.d.ts +15 -0
- package/es/InitialConfig/utils.js +40 -305
- package/es/InitialRequest/index.d.ts +5 -11
- package/es/InitialRequest/index.js +50 -67
- package/es/InitialRequest/utils.d.ts +8 -0
- package/es/InitialRequest/utils.js +28 -567
- package/es/Input/index.css +8 -0
- package/es/Input/index.d.ts +18 -0
- package/es/{DagInitialConfig → Input}/index.js +50 -45
- package/es/LabelValue/index.css +18 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/LabelValue/index.js +32 -0
- package/es/List/CheckExt.d.ts +10 -0
- package/es/List/CheckExt.js +28 -0
- package/es/List/index.css +62 -6
- package/es/List/index.d.ts +73 -11
- package/es/List/index.js +162 -36
- package/es/List/renderItem.d.ts +20 -0
- package/es/List/renderItem.js +68 -0
- package/es/List/utils.d.ts +5 -0
- package/es/List/utils.js +18 -0
- package/es/ListExt/index.css +9 -0
- package/es/ListExt/index.d.ts +19 -0
- package/es/ListExt/index.js +44 -0
- package/es/LoaderScript/index.d.ts +26 -0
- package/es/LoaderScript/index.js +127 -0
- package/es/LoaderScript/interface.d.ts +26 -0
- package/es/LoaderScript/utils.d.ts +12 -0
- package/es/LoaderScript/utils.js +110 -0
- package/es/Modal/index.css +43 -0
- package/es/Modal/index.d.ts +17 -0
- package/es/Modal/index.js +34 -0
- package/es/Modal/interface.d.ts +339 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +94 -0
- package/es/Picture/component/DefaultRects/index.css +247 -0
- package/es/Picture/component/DefaultRects/index.d.ts +12 -0
- package/es/Picture/component/DefaultRects/index.js +47 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +11 -0
- package/es/Picture/component/DrawRect/index.css +8 -0
- package/es/Picture/component/DrawRect/index.d.ts +14 -0
- package/es/Picture/component/DrawRect/index.js +41 -0
- package/es/Picture/component/MoveContent/index.css +0 -0
- package/es/Picture/component/MoveContent/index.d.ts +39 -0
- package/es/Picture/component/MoveContent/index.js +240 -0
- package/es/Picture/component/MoveContent/utils.d.ts +4 -0
- package/es/Picture/component/MoveContent/utils.js +19 -0
- package/es/Picture/component/RectMenu/index.css +31 -0
- package/es/Picture/component/RectMenu/index.d.ts +13 -0
- package/es/Picture/component/RectMenu/index.js +81 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/RectMenu/utils.js +22 -0
- package/es/Picture/component/Tools/index.css +42 -0
- package/es/Picture/component/Tools/index.d.ts +13 -0
- package/es/Picture/component/Tools/index.js +83 -0
- package/es/Picture/component/WheelScale/index.d.ts +6 -0
- package/es/Picture/component/WheelScale/index.js +29 -0
- package/es/Picture/dragBound.d.ts +5 -0
- package/es/Picture/dragBound.js +77 -0
- package/es/Picture/index.css +12 -0
- package/es/Picture/index.d.ts +16 -0
- package/es/Picture/index.js +344 -0
- package/es/Picture/interface.d.ts +67 -0
- package/es/Picture/loadCaptureRectImage.d.ts +8 -0
- package/es/Picture/loadCaptureRectImage.js +119 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/useDraw.js +136 -0
- package/es/Picture/utils.d.ts +22 -0
- package/es/Picture/utils.js +90 -0
- package/es/Progress/index.css +20 -0
- package/es/Progress/index.d.ts +11 -0
- package/es/{AppLayout/Header/ThemeTools.js → Progress/index.js} +46 -47
- package/es/RefDrawer/index.js +4 -5
- package/es/RefModal/index.js +4 -5
- package/es/ScrollList/index.css +73 -0
- package/es/ScrollList/index.d.ts +24 -0
- package/es/ScrollList/index.js +261 -0
- package/es/ScrollList/utils.js +84 -0
- package/es/Service/http.d.ts +4 -0
- package/es/Service/http.js +135 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +14 -0
- package/es/Service/interface.d.ts +28 -0
- package/es/Service/logger.d.ts +3 -0
- package/es/Service/logger.js +13 -0
- package/es/Service/middleware.d.ts +5 -0
- package/es/Service/middleware.js +15 -0
- package/es/Service/utils.d.ts +3 -0
- package/es/Service/utils.js +11 -0
- package/es/TableLayout/index.css +4 -0
- package/es/TableLayout/index.d.ts +10 -0
- package/es/TableLayout/index.js +64 -0
- package/es/ThemeAntd/index.css +501 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/ThemeAntd/index.js +6 -0
- package/es/ThemeAntd/style/button.css +46 -0
- package/es/ThemeAntd/style/checkbox.css +64 -0
- package/es/ThemeAntd/style/form.css +10 -0
- package/es/ThemeAntd/style/input.css +58 -0
- package/es/ThemeAntd/style/pagination.css +44 -0
- package/es/ThemeAntd/style/picker.css +86 -0
- package/es/ThemeAntd/style/popover.css +3 -0
- package/es/ThemeAntd/style/radio.css +71 -0
- package/es/ThemeAntd/style/scrollbar.css +19 -0
- package/es/ThemeAntd/style/select.css +57 -0
- package/es/ThemeAntd/style/table.css +36 -0
- package/es/ThemeAntd/style/tree.css +4 -0
- package/es/{OrgUserTree → Tree}/demo.d.ts +0 -0
- package/es/Tree/demo.js +69 -0
- package/es/Tree/index.css +64 -0
- package/es/Tree/index.d.ts +24 -0
- package/es/Tree/index.js +83 -0
- package/es/TreeMode/index.d.ts +1 -1
- package/es/TreeMode/index.js +6 -6
- package/es/TreeTitle/index.js +2 -2
- package/es/UserSelect/index.d.ts +3 -3
- package/es/UserSelect/index.js +13 -15
- package/es/VList/index.css +4 -0
- package/es/VList/index.d.ts +16 -0
- package/es/VList/index.js +56 -0
- package/es/VList/utils.d.ts +10 -0
- package/es/VList/utils.js +17 -0
- package/es/WorkerFlow/Demo.js +1 -0
- package/es/WorkerFlow/Form/Condition.js +6 -6
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -2
- package/es/WorkerFlow/Form/FormAuth.js +2 -2
- package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
- package/es/WorkerFlow/Form/GroupList.js +3 -2
- package/es/WorkerFlow/Form/GroupSelect.js +2 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +9 -7
- package/es/WorkerFlow/Form/LevelGroupSelect.js +3 -3
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +3 -4
- package/es/WorkerFlow/Form/UserSet.js +2 -2
- package/es/WorkerFlow/Nodes/Add.js +2 -3
- package/es/WorkerFlow/Nodes/AddOption.js +2 -2
- package/es/WorkerFlow/Nodes/Approver.js +2 -2
- package/es/WorkerFlow/Nodes/Condition.js +2 -2
- package/es/WorkerFlow/Nodes/Handle.js +2 -2
- package/es/WorkerFlow/Nodes/Notifier.js +2 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +17 -13
- package/es/WorkerFlow/index.js +37 -9
- package/es/core.d.ts +27 -0
- package/es/index.d.ts +34 -8
- package/es/index.js +34 -8
- package/es/useChangeEffect/index.d.ts +3 -0
- package/es/useChangeEffect/index.js +32 -0
- package/es/useDrawer/index.d.ts +14 -0
- package/es/useDrawer/index.js +90 -0
- package/es/useHistory/index.css +0 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useHistory/index.js +14 -0
- package/es/useHttp/index.d.ts +8 -0
- package/es/useHttp/index.js +78 -0
- package/es/useModal/index.d.ts +14 -0
- package/es/useModal/index.js +92 -0
- package/es/utils.d.ts +2 -0
- package/es/utils.js +32 -0
- package/package.json +12 -6
- package/es/AppLayout/AppHeader/index.css +0 -4
- package/es/AppLayout/AppHeader/index.d.ts +0 -18
- package/es/AppLayout/AppHeader/index.js +0 -41
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
- package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
- package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
- package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
- package/es/AppLayout/AppInlineMenu/index.css +0 -110
- package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
- package/es/AppLayout/AppInlineMenu/index.js +0 -194
- package/es/AppLayout/AppLogo/index.css +0 -74
- package/es/AppLayout/AppLogo/index.d.ts +0 -13
- package/es/AppLayout/AppLogo/index.js +0 -100
- package/es/AppLayout/AppTools/index.d.ts +0 -8
- package/es/AppLayout/AppTools/index.js +0 -10
- package/es/AppLayout/FunctionPreview/index.css +0 -128
- package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
- package/es/AppLayout/FunctionPreview/index.js +0 -218
- package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
- package/es/AppLayout/Header/ListenceRoute.js +0 -28
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
- package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
- package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -25
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -97
- package/es/AppLayout/Header/Tools.d.ts +0 -11
- package/es/AppLayout/Header/Tools.js +0 -86
- package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
- package/es/AppLayout/Header/ToolsItem.js +0 -12
- package/es/AppLayout/Header/UserAction.d.ts +0 -10
- package/es/AppLayout/Header/UserAction.js +0 -224
- package/es/AppLayout/Header/index.css +0 -136
- package/es/AppLayout/Header/index.d.ts +0 -9
- package/es/AppLayout/Header/index.js +0 -36
- package/es/AppLayout/index.css +0 -21
- package/es/AppLayout/index.d.ts +0 -12
- package/es/AppLayout/index.js +0 -38
- package/es/AppLayout/service/index.js +0 -174
- package/es/AppLayout/service/prefix.js +0 -4
- package/es/AppLayout/service/url.js +0 -35
- package/es/AppLayout/utils/menu.js +0 -24
- package/es/AppLayout/utils.d.ts +0 -4
- package/es/AppLayout/utils.js +0 -112
- package/es/DagInitialConfig/index.d.ts +0 -10
- package/es/DagInitialConfig/utils.js +0 -185
- package/es/DagInitialRequest/index.d.ts +0 -10
- package/es/DagInitialRequest/utils.js +0 -573
- package/es/FormContent/index.css +0 -27
- package/es/FormContent/index.d.ts +0 -19
- package/es/FormContent/index.js +0 -58
- package/es/OrgTree/index.css +0 -39
- package/es/OrgTree/index.d.ts +0 -16
- package/es/OrgTree/index.js +0 -176
- package/es/OrgUserTree/demo.js +0 -20
- package/es/OrgUserTree/index.css +0 -31
- package/es/OrgUserTree/index.d.ts +0 -28
- package/es/OrgUserTree/index.js +0 -131
- package/es/PlaceTree/demo.d.ts +0 -2
- package/es/PlaceTree/demo.js +0 -20
- package/es/PlaceTree/index.css +0 -40
- package/es/PlaceTree/index.d.ts +0 -26
- package/es/PlaceTree/index.js +0 -174
- package/es/Upload/AntUpload/index.css +0 -22
- package/es/Upload/AntUpload/index.d.ts +0 -19
- package/es/Upload/AntUpload/index.js +0 -226
- package/es/Upload/UploadChildren/index.css +0 -28
- package/es/Upload/UploadChildren/index.js +0 -26
- package/es/Upload/index.d.ts +0 -9
- package/es/Upload/index.js +0 -7
package/es/PlaceTree/index.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
2
|
-
import _Tree from "@cloud-app-dev/basic-components/es/Tree";
|
|
3
|
-
import _Store from "@cloud-app-dev/basic-components/es/Store";
|
|
4
|
-
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
5
|
-
|
|
6
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
|
-
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
|
|
10
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
-
|
|
12
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
-
|
|
14
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
|
|
16
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
-
|
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
-
|
|
22
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
23
|
-
|
|
24
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
|
|
26
|
-
import { __rest } from "tslib";
|
|
27
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
28
|
-
import TreeTitle from '../TreeTitle';
|
|
29
|
-
import "./index.css";
|
|
30
|
-
|
|
31
|
-
function PlaceTree(params) {
|
|
32
|
-
var _a = useMemo(function () {
|
|
33
|
-
return params;
|
|
34
|
-
}, [params]),
|
|
35
|
-
treeData = _a.treeData,
|
|
36
|
-
defaultExpandedKeys = _a.defaultExpandedKeys,
|
|
37
|
-
activeKey = _a.activeKey,
|
|
38
|
-
className = _a.className,
|
|
39
|
-
onKeywordChange = _a.onKeywordChange,
|
|
40
|
-
titleExt = _a.titleExt,
|
|
41
|
-
params1 = __rest(_a, ["treeData", "defaultExpandedKeys", "activeKey", "className", "onKeywordChange", "titleExt"]);
|
|
42
|
-
|
|
43
|
-
var _b = useMemo(function () {
|
|
44
|
-
return params1;
|
|
45
|
-
}, [params1]),
|
|
46
|
-
title = _b.title,
|
|
47
|
-
inputPlaceholder = _b.inputPlaceholder,
|
|
48
|
-
renderHeader = _b.renderHeader,
|
|
49
|
-
keyword = _b.keyword,
|
|
50
|
-
_b$treeNodeProps = _b.treeNodeProps,
|
|
51
|
-
treeNodeProps = _b$treeNodeProps === void 0 ? {} : _b$treeNodeProps,
|
|
52
|
-
renderSuffix = _b.renderSuffix,
|
|
53
|
-
showCount = _b.showCount,
|
|
54
|
-
props = __rest(_b, ["title", "inputPlaceholder", "renderHeader", "keyword", "treeNodeProps", "renderSuffix", "showCount"]);
|
|
55
|
-
|
|
56
|
-
var _useState = useState({
|
|
57
|
-
expandedKeys: defaultExpandedKeys || undefined
|
|
58
|
-
}),
|
|
59
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
-
state = _useState2[0],
|
|
61
|
-
setState = _useState2[1];
|
|
62
|
-
|
|
63
|
-
var treeDatas = useMemo(function () {
|
|
64
|
-
return treeData || _treeHelper.computPlaceTree(_Store.place.placeList);
|
|
65
|
-
}, [treeData]);
|
|
66
|
-
var onExpand = useCallback(function (expandedKeys) {
|
|
67
|
-
return setState({
|
|
68
|
-
expandedKeys: expandedKeys
|
|
69
|
-
});
|
|
70
|
-
}, []);
|
|
71
|
-
useEffect(function () {
|
|
72
|
-
if (state.expandedKeys) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (!state.expandedKeys && !!defaultExpandedKeys) {
|
|
77
|
-
setState(function (old) {
|
|
78
|
-
return Object.assign(Object.assign({}, old), {
|
|
79
|
-
expandedKeys: defaultExpandedKeys
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}, [defaultExpandedKeys, state.expandedKeys]);
|
|
84
|
-
useEffect(function () {
|
|
85
|
-
if (keyword === undefined) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (keyword === '') {
|
|
90
|
-
setState(function (old) {
|
|
91
|
-
return Object.assign(Object.assign({}, old), {
|
|
92
|
-
expandedKeys: undefined
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
var keys = [];
|
|
99
|
-
|
|
100
|
-
var placeList = _Store.place.placeList.filter(function (v) {
|
|
101
|
-
return v.name.includes(keyword);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
var placeCodes = [];
|
|
105
|
-
placeList.forEach(function (v) {
|
|
106
|
-
if (v.pcodes) {
|
|
107
|
-
placeCodes.push.apply(placeCodes, _toConsumableArray(v.pcodes));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
placeCodes.push(v.areaCode);
|
|
111
|
-
});
|
|
112
|
-
keys = _toConsumableArray(new Set(_toConsumableArray(keys)));
|
|
113
|
-
placeCodes.forEach(function (v) {
|
|
114
|
-
var _keys;
|
|
115
|
-
|
|
116
|
-
var codes = _Store.place.getPlaceCodesWithParent(v);
|
|
117
|
-
|
|
118
|
-
(_keys = keys).push.apply(_keys, _toConsumableArray(codes));
|
|
119
|
-
});
|
|
120
|
-
setState(function (old) {
|
|
121
|
-
return Object.assign(Object.assign({}, old), {
|
|
122
|
-
expandedKeys: _toConsumableArray(new Set(_toConsumableArray(keys)))
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}, [keyword]);
|
|
126
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className: "lm-c-place-tree ".concat(className)
|
|
128
|
-
}, /*#__PURE__*/React.createElement(TreeTitle, {
|
|
129
|
-
title: title,
|
|
130
|
-
inputPlaceholder: inputPlaceholder,
|
|
131
|
-
onChange: onKeywordChange,
|
|
132
|
-
hasInput: !!onKeywordChange,
|
|
133
|
-
titleExt: titleExt
|
|
134
|
-
}), renderHeader && renderHeader(), /*#__PURE__*/React.createElement(_Tree, Object.assign({}, props, {
|
|
135
|
-
treeData: treeDatas,
|
|
136
|
-
onExpand: onExpand,
|
|
137
|
-
selectedKeys: activeKey ? Array.isArray(activeKey) ? activeKey : [activeKey] : undefined,
|
|
138
|
-
expandedKeys: state.expandedKeys || [],
|
|
139
|
-
icon: function icon(node) {
|
|
140
|
-
return /*#__PURE__*/React.createElement(_IconFont, {
|
|
141
|
-
type: "".concat(node.level >= 5 ? 'icon-S_Place_Place' : title ? 'icon-S_Photo_ListTree' : 'icon-S_Bar_Add')
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
treeNodeProps: {
|
|
145
|
-
key: 'areaCode',
|
|
146
|
-
nameKey: 'areaName',
|
|
147
|
-
keyword: keyword,
|
|
148
|
-
suffix: function suffix(node) {
|
|
149
|
-
return renderPlaceSuffix(node, showCount, renderSuffix);
|
|
150
|
-
},
|
|
151
|
-
RenderTreeTitle: treeNodeProps === null || treeNodeProps === void 0 ? void 0 : treeNodeProps.RenderTreeTitle
|
|
152
|
-
}
|
|
153
|
-
})));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
var renderPlaceSuffix = function renderPlaceSuffix(node, showCount, renderSuffix) {
|
|
157
|
-
var _a, _b;
|
|
158
|
-
|
|
159
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
160
|
-
className: "tree-node-suffix"
|
|
161
|
-
}, showCount && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("i", {
|
|
162
|
-
className: "online-count"
|
|
163
|
-
}, (_a = node.deviceCount) === null || _a === void 0 ? void 0 : _a.onlineCount, "/"), /*#__PURE__*/React.createElement("i", {
|
|
164
|
-
className: "count"
|
|
165
|
-
}, (_b = node.deviceCount) === null || _b === void 0 ? void 0 : _b.count)), renderSuffix && renderSuffix(node));
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
PlaceTree.defaultProps = {
|
|
169
|
-
title: '行政区划',
|
|
170
|
-
className: '',
|
|
171
|
-
disableCheckbox: false,
|
|
172
|
-
inputPlaceholder: '请输入关键字搜索'
|
|
173
|
-
};
|
|
174
|
-
export default PlaceTree;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.lm-upload-wrapper {
|
|
2
|
-
display: block;
|
|
3
|
-
width: max-content;
|
|
4
|
-
}
|
|
5
|
-
.lm-upload-wrapper .upload-btn-wrapper {
|
|
6
|
-
width: 84px;
|
|
7
|
-
height: 84px;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
border: 1px solid var(--bd-color);
|
|
14
|
-
}
|
|
15
|
-
.lm-upload-wrapper .upload-btn-wrapper .cloudapp-upload-icon {
|
|
16
|
-
font-size: 32px;
|
|
17
|
-
opacity: 0.6;
|
|
18
|
-
}
|
|
19
|
-
.lm-upload-wrapper .upload-btn-wrapper .cloudapp-upload-text {
|
|
20
|
-
color: #999;
|
|
21
|
-
font-size: var(--fs-small);
|
|
22
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
interface AntUploadProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
maxSize?: number | boolean; //文件大小限制,默认2
|
|
6
|
-
accept?: string;
|
|
7
|
-
typeErrorMessage?: string;
|
|
8
|
-
sizeErrorMessage?: string; //文件大小超出限制时的错误提示
|
|
9
|
-
uploadType?: string;
|
|
10
|
-
beforeUpload?: (val: string) => void;
|
|
11
|
-
customUpload?: (val: string) => void;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
toBase64?: boolean;
|
|
14
|
-
imageCompress?: boolean;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
class AntUpload extends React.Component<AntUploadProps> {}
|
|
18
|
-
|
|
19
|
-
export default AntUpload;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
import "antd/lib/upload/style";
|
|
4
|
-
import _Upload from "antd/lib/upload";
|
|
5
|
-
import "antd/lib/message/style";
|
|
6
|
-
import _message from "antd/lib/message";
|
|
7
|
-
var _excluded = ["className", "accept", "children"];
|
|
8
|
-
|
|
9
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
|
-
|
|
11
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
-
|
|
13
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
-
|
|
15
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
16
|
-
|
|
17
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
18
|
-
|
|
19
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
-
|
|
21
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
22
|
-
|
|
23
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
24
|
-
|
|
25
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
26
|
-
|
|
27
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
28
|
-
|
|
29
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
30
|
-
|
|
31
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
32
|
-
|
|
33
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34
|
-
|
|
35
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
36
|
-
|
|
37
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @desc 单个文件上传(自由控制文件类型)
|
|
41
|
-
* @params {string} className 组件外层类名
|
|
42
|
-
*
|
|
43
|
-
* @params {number|boolean} maxSize 文件大小限制,默认2, 即2M, 为 false 是不限制大小
|
|
44
|
-
* @params {string} sizeErrorMessage 文件大小超出限制时的错误提示
|
|
45
|
-
*
|
|
46
|
-
* @params {string} accept 文件类型,默认 "image/png, image/jpeg, image/jpg"
|
|
47
|
-
* @params {string} typeErrorMessage 上传类型不对的错误提示
|
|
48
|
-
*
|
|
49
|
-
* @params {string} uploadType 上传类型 默认remote, local返回base64, remote返回 customUpload 回调
|
|
50
|
-
* @params {function} beforeUpload 准备上传之前的回调
|
|
51
|
-
* @params {function} customUpload 自定义上传
|
|
52
|
-
* @params {boolean} imageCompress 是否压缩,如上传excel时,这个参数为false
|
|
53
|
-
|
|
54
|
-
* @params {object} extraProps antd 的 Upload可接受的额外参数
|
|
55
|
-
* @params {ReactElement} children 接受子组件
|
|
56
|
-
*/
|
|
57
|
-
// 存永久: logo、头像、布控照片、视图库图片、视频截图
|
|
58
|
-
// 临时:以图搜图、
|
|
59
|
-
import React from 'react';
|
|
60
|
-
import "./index.css";
|
|
61
|
-
/*
|
|
62
|
-
配置参数
|
|
63
|
-
{
|
|
64
|
-
disabled,
|
|
65
|
-
expiretype : 周期类型,0表示永久,1表示7天,2表示30天,3表示90天,默认为0
|
|
66
|
-
name: 发到后台的文件参数名,默认file
|
|
67
|
-
}
|
|
68
|
-
*/
|
|
69
|
-
// 默认上传的格式
|
|
70
|
-
|
|
71
|
-
var ACCEPT_FILE = 'image/png,image/jpeg,image/jpg';
|
|
72
|
-
var MAX_SIZE = 2;
|
|
73
|
-
|
|
74
|
-
var AntUpload = /*#__PURE__*/function (_React$Component) {
|
|
75
|
-
_inherits(AntUpload, _React$Component);
|
|
76
|
-
|
|
77
|
-
var _super = _createSuper(AntUpload);
|
|
78
|
-
|
|
79
|
-
function AntUpload() {
|
|
80
|
-
var _this;
|
|
81
|
-
|
|
82
|
-
_classCallCheck(this, AntUpload);
|
|
83
|
-
|
|
84
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
85
|
-
args[_key] = arguments[_key];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
89
|
-
|
|
90
|
-
_this.uploadLocal = /*#__PURE__*/function () {
|
|
91
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(file) {
|
|
92
|
-
var _this$props, customUpload, _this$props$toBase, toBase64;
|
|
93
|
-
|
|
94
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
95
|
-
while (1) {
|
|
96
|
-
switch (_context.prev = _context.next) {
|
|
97
|
-
case 0:
|
|
98
|
-
// eslint-disable-next-line no-unused-vars
|
|
99
|
-
_this$props = _this.props, customUpload = _this$props.customUpload, _this$props$toBase = _this$props.toBase64, toBase64 = _this$props$toBase === void 0 ? true : _this$props$toBase;
|
|
100
|
-
file.uploadType = 'local'; // if(toBase64) {
|
|
101
|
-
// const base64 = await Utils.fileToBase64(file);
|
|
102
|
-
// file.url = base64;
|
|
103
|
-
// }
|
|
104
|
-
|
|
105
|
-
customUpload && customUpload(file);
|
|
106
|
-
|
|
107
|
-
case 3:
|
|
108
|
-
case "end":
|
|
109
|
-
return _context.stop();
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}, _callee);
|
|
113
|
-
}));
|
|
114
|
-
|
|
115
|
-
return function (_x) {
|
|
116
|
-
return _ref.apply(this, arguments);
|
|
117
|
-
};
|
|
118
|
-
}();
|
|
119
|
-
|
|
120
|
-
_this.uploadRemote = function (file) {
|
|
121
|
-
var customUpload = _this.props.customUpload;
|
|
122
|
-
customUpload && customUpload(file);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
_this.customUpload = /*#__PURE__*/function () {
|
|
126
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(_ref2) {
|
|
127
|
-
var file, _this$props2, _this$props2$uploadTy, uploadType, _this$props2$imageCom, imageCompress, newFile;
|
|
128
|
-
|
|
129
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
130
|
-
while (1) {
|
|
131
|
-
switch (_context2.prev = _context2.next) {
|
|
132
|
-
case 0:
|
|
133
|
-
file = _ref2.file;
|
|
134
|
-
// eslint-disable-next-line no-unused-vars
|
|
135
|
-
_this$props2 = _this.props, _this$props2$uploadTy = _this$props2.uploadType, uploadType = _this$props2$uploadTy === void 0 ? 'remote' : _this$props2$uploadTy, _this$props2$imageCom = _this$props2.imageCompress, imageCompress = _this$props2$imageCom === void 0 ? true : _this$props2$imageCom;
|
|
136
|
-
newFile = file; // if (file.type !== "image/svg+xml" && imageCompress) {
|
|
137
|
-
// newFile = await Utils.imageCompress(file);
|
|
138
|
-
// }
|
|
139
|
-
|
|
140
|
-
if (uploadType === 'remote') {
|
|
141
|
-
_this.uploadRemote(newFile);
|
|
142
|
-
} else {
|
|
143
|
-
_this.uploadLocal(newFile);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
case 4:
|
|
147
|
-
case "end":
|
|
148
|
-
return _context2.stop();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}, _callee2);
|
|
152
|
-
}));
|
|
153
|
-
|
|
154
|
-
return function (_x2) {
|
|
155
|
-
return _ref3.apply(this, arguments);
|
|
156
|
-
};
|
|
157
|
-
}();
|
|
158
|
-
|
|
159
|
-
_this.beforeUpload = function (file) {
|
|
160
|
-
var _this$props3 = _this.props,
|
|
161
|
-
_this$props3$maxSize = _this$props3.maxSize,
|
|
162
|
-
maxSize = _this$props3$maxSize === void 0 ? MAX_SIZE : _this$props3$maxSize,
|
|
163
|
-
_this$props3$accept = _this$props3.accept,
|
|
164
|
-
accept = _this$props3$accept === void 0 ? ACCEPT_FILE : _this$props3$accept,
|
|
165
|
-
typeErrorMessage = _this$props3.typeErrorMessage,
|
|
166
|
-
sizeErrorMessage = _this$props3.sizeErrorMessage,
|
|
167
|
-
beforeUpload = _this$props3.beforeUpload;
|
|
168
|
-
var acceptTypes = accept.split(',');
|
|
169
|
-
var acceptable = acceptTypes.includes(file.type);
|
|
170
|
-
|
|
171
|
-
if (!acceptable) {
|
|
172
|
-
_message.error(typeErrorMessage || '图片格式必须为JPG或者PNG!');
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var limitSize = maxSize ? file.size / 1024 / 1024 < maxSize : true;
|
|
176
|
-
|
|
177
|
-
if (!limitSize) {
|
|
178
|
-
_message.error(sizeErrorMessage || "\u56FE\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(maxSize, "M!"));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
var fileSize = file.size;
|
|
182
|
-
|
|
183
|
-
if (!fileSize) {
|
|
184
|
-
_message.error("".concat(file.name, ":\u6587\u4EF6\u9519\u8BEF!"));
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (acceptable && limitSize && fileSize) {
|
|
188
|
-
beforeUpload && beforeUpload(file);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return acceptable && limitSize;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
return _this;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
_createClass(AntUpload, [{
|
|
198
|
-
key: "render",
|
|
199
|
-
value: function render() {
|
|
200
|
-
var _this$props4 = this.props,
|
|
201
|
-
_this$props4$classNam = _this$props4.className,
|
|
202
|
-
className = _this$props4$classNam === void 0 ? '' : _this$props4$classNam,
|
|
203
|
-
_this$props4$accept = _this$props4.accept,
|
|
204
|
-
accept = _this$props4$accept === void 0 ? ACCEPT_FILE : _this$props4$accept,
|
|
205
|
-
_this$props4$children = _this$props4.children,
|
|
206
|
-
children = _this$props4$children === void 0 ? null : _this$props4$children,
|
|
207
|
-
rest = _objectWithoutProperties(_this$props4, _excluded);
|
|
208
|
-
|
|
209
|
-
var uploadProps = {
|
|
210
|
-
accept: accept,
|
|
211
|
-
name: 'file',
|
|
212
|
-
multiple: false,
|
|
213
|
-
showUploadList: false,
|
|
214
|
-
beforeUpload: this.beforeUpload,
|
|
215
|
-
customRequest: this.customUpload
|
|
216
|
-
};
|
|
217
|
-
return /*#__PURE__*/React.createElement(_Upload, _extends({
|
|
218
|
-
className: "lm-upload-wrapper ".concat(className)
|
|
219
|
-
}, uploadProps, rest), children);
|
|
220
|
-
}
|
|
221
|
-
}]);
|
|
222
|
-
|
|
223
|
-
return AntUpload;
|
|
224
|
-
}(React.Component);
|
|
225
|
-
|
|
226
|
-
export default AntUpload;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.lm-c-normol-box.lm-upload-content {
|
|
2
|
-
width: 110px;
|
|
3
|
-
height: 110px;
|
|
4
|
-
font-size: var(--fs-small);
|
|
5
|
-
color: var(--color);
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
background: transparent;
|
|
10
|
-
text-align: center;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
border: 1px solid var(--bd-color);
|
|
13
|
-
}
|
|
14
|
-
.lm-c-normol-box.lm-upload-content .anticon {
|
|
15
|
-
display: block;
|
|
16
|
-
color: var(--icon);
|
|
17
|
-
font-size: 32px;
|
|
18
|
-
margin-bottom: 8px;
|
|
19
|
-
}
|
|
20
|
-
.lm-c-normol-box.lm-upload-content img {
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
display: block;
|
|
24
|
-
object-fit: contain;
|
|
25
|
-
object-position: 50% 50%;
|
|
26
|
-
transition: all 0.5s;
|
|
27
|
-
padding: 10px;
|
|
28
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import "antd/lib/button/style";
|
|
2
|
-
import _Button from "antd/lib/button";
|
|
3
|
-
import _IconFont from "@cloud-app-dev/basic-components/es/IconFont";
|
|
4
|
-
var _excluded = ["icon", "text"];
|
|
5
|
-
|
|
6
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
7
|
-
|
|
8
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
-
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import "./index.css";
|
|
12
|
-
/**
|
|
13
|
-
* 按钮上传
|
|
14
|
-
* 示例: 人脸图库以图搜图按钮
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
export var UploadButton = function UploadButton(_ref) {
|
|
18
|
-
var _ref$icon = _ref.icon,
|
|
19
|
-
icon = _ref$icon === void 0 ? 'icon-L_Bar_AddImg' : _ref$icon,
|
|
20
|
-
text = _ref.text,
|
|
21
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
|
|
23
|
-
return /*#__PURE__*/React.createElement(_Button, rest, icon && /*#__PURE__*/React.createElement(_IconFont, {
|
|
24
|
-
type: icon
|
|
25
|
-
}), text);
|
|
26
|
-
};
|
package/es/Upload/index.d.ts
DELETED