@hi-ui/hiui 2.15.10 → 2.15.11
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 +3 -0
- package/es/_util/warning.js +2 -2
- package/es/alert/__test__/index.test.js +67 -0
- package/es/alert/index.js +147 -6
- package/es/alert/style/index.css +1 -1
- package/es/badge/index.js +87 -9
- package/es/badge/style/index.css +1 -1
- package/es/badge/style/index.js +0 -0
- package/es/button/Button.js +51 -59
- package/es/button/ButtonGroup.js +31 -23
- package/es/button/IconLoading.js +2 -2
- package/es/button/__test__/index.test.js +29 -0
- package/es/button/index.js +2 -3
- package/es/button/style/index.css +1 -1
- package/es/card/index.js +42 -54
- package/es/card/style/index.css +1 -1
- package/es/cascader/Cascader.js +116 -181
- package/es/cascader/__test__/index.test.js +283 -0
- package/es/cascader/index.js +2 -5
- package/es/cascader/menu.js +155 -0
- package/es/cascader/style/cascader.css +1 -1
- package/es/cascader/style/menu.css +1 -1
- package/es/checkbox/{checkbox-legacy/Base.js → Base.js} +31 -46
- package/es/checkbox/CheckBox.js +185 -0
- package/es/checkbox/index.js +4 -13
- package/es/checkbox/style/index.css +1 -1
- package/es/collapse/__test__/index.test.js +58 -0
- package/es/collapse/index.js +93 -79
- package/es/collapse/style/index.css +1 -1
- package/es/confirm/index.js +50 -37
- package/es/context/index.js +37 -39
- package/es/counter/__test__/index.test.js +52 -0
- package/es/counter/index.js +270 -6
- package/es/counter/style/index.css +1 -1
- package/es/date-picker/BasePicker.js +288 -374
- package/es/date-picker/Calender.js +90 -326
- package/es/date-picker/DatePanel.js +186 -175
- package/es/date-picker/DatePicker.js +51 -151
- package/es/date-picker/DateRangePanel.js +181 -253
- package/es/date-picker/Modal.js +25 -15
- package/es/date-picker/Time.js +336 -230
- package/es/date-picker/TimePanel.js +32 -27
- package/es/date-picker/TimePeriodPanel.js +32 -21
- package/es/date-picker/TimePicker.js +40 -42
- package/es/date-picker/TimeRangePanel.js +42 -32
- package/es/date-picker/Type.js +1 -5
- package/es/date-picker/WeekRangePanel.js +150 -237
- package/es/date-picker/constants.js +28 -14
- package/es/date-picker/dateUtil.js +52 -221
- package/es/date-picker/index.js +2 -5
- package/es/date-picker/style/index.css +1 -1
- package/es/date-picker/util.js +8 -101
- package/es/dropdown/Dropdown.js +199 -193
- package/es/dropdown/{tests → __test__}/index.test.js +2 -2
- package/es/dropdown/index.js +4 -73
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.js +2 -0
- package/es/ficon/index.js +23 -13
- package/es/form/index.js +171 -6
- package/es/form/{Item.js → item.js} +53 -53
- package/es/form/style/index.css +1 -1
- package/es/grid/index.js +37 -25
- package/es/icon/index.js +32 -21
- package/es/index.js +9 -61
- package/es/input/index.js +345 -28
- package/es/input/style/index.css +1 -1
- package/es/input/util.js +18 -26
- package/es/lib/withDragDropContext.js +2 -2
- package/es/loading/index.js +129 -5
- package/es/loading/style/index.css +0 -0
- package/es/loading/style/index.js +0 -0
- package/es/locales/en-US.js +11 -45
- package/es/locales/index.js +2 -16
- package/es/locales/zh-CN.js +12 -46
- package/es/menu/Item.js +41 -32
- package/es/menu/ItemGroup.js +81 -0
- package/es/menu/SubMenu.js +74 -55
- package/es/menu/Title.js +42 -36
- package/es/menu/index.js +419 -12
- package/es/menu/style/index.css +1 -1
- package/es/modal/__test__/index.test.js +123 -0
- package/es/modal/index.js +61 -77
- package/es/modal/style/index.css +1 -1
- package/es/nav-menu/NavMenu.js +45 -31
- package/es/nav-menu/__test__/index.test.js +2 -2
- package/es/nav-menu/index.js +2 -2
- package/es/notification/__test__/index.test.js +56 -0
- package/es/notification/index.js +231 -68
- package/es/notification/style/index.css +1 -1
- package/es/notification/style/index.js +0 -0
- package/es/pagination/Pager.js +8 -6
- package/es/pagination/Pagination.js +115 -124
- package/es/pagination/__test__/index.test.js +140 -0
- package/es/pagination/index.js +8 -9
- package/es/pagination/style/index.css +1 -1
- package/es/panel/index.js +33 -23
- package/es/popover/__test__/index.test.js +2 -2
- package/es/popover/index.js +69 -71
- package/es/popper/index.js +54 -64
- package/es/popper/style/index.css +1 -1
- package/es/progress/BarProgress.js +43 -109
- package/es/progress/CircleProgress.js +10 -9
- package/es/progress/DashboardProgress.js +9 -7
- package/es/progress/index.js +100 -8
- package/es/progress/style/index.css +1 -1
- package/es/radio/{radio-legacy/__test__ → __test__}/index.test.js +10 -10
- package/es/radio/index.js +216 -10
- package/es/radio/style/index.css +1 -1
- package/es/rate/Icons.js +2 -2
- package/es/rate/Rate.js +90 -65
- package/es/rate/__test__/index.test.js +54 -0
- package/es/rate/index.js +2 -5
- package/es/rate/style/index.css +1 -1
- package/es/select/Option.js +93 -0
- package/es/select/Select.js +253 -325
- package/es/select/SelectDropdown.js +63 -215
- package/es/select/SelectInput.js +54 -88
- package/es/select/__test__/index.test.js +429 -0
- package/es/select/index.js +4 -6
- package/es/select/style/select-dropdown.css +1 -1
- package/es/select/style/select-input.css +1 -1
- package/es/stepper/index.js +127 -21
- package/es/stepper/style/index.css +1 -1
- package/es/style/color/colors.css +0 -0
- package/es/style/icon/diyIcon.css +1 -1
- package/es/style/icon/index.css +1 -1
- package/es/style/index.css +0 -0
- package/es/style/mixins/colors.css +0 -0
- package/es/style/mixins/index.css +0 -0
- package/es/style/theme/dark.css +0 -0
- package/es/style/theme/default.css +0 -0
- package/es/switch/{__tests__ → __test__}/index.test.js +2 -31
- package/es/switch/index.js +36 -24
- package/es/switch/style/index.css +1 -1
- package/es/table/__test__/index.test.js +73 -0
- package/es/table/{Body.js → body.js} +52 -36
- package/es/table/checkbox/index.js +36 -33
- package/es/table/clickOuterside.js +115 -0
- package/es/table/{Footer.js → footer.js} +41 -24
- package/es/table/{Header.js → header.js} +54 -41
- package/es/table/index.js +300 -262
- package/es/table/menu/index.js +34 -32
- package/es/table/pover.js +154 -0
- package/es/table/prefix.js +2 -2
- package/es/table/style/Table.css +1 -1
- package/es/table/style/index.css +1 -1
- package/es/table/tableContent.js +120 -0
- package/es/tabs/ItemDropdown.js +51 -39
- package/es/tabs/TabPane.js +35 -25
- package/es/tabs/Tabs.js +91 -98
- package/es/tabs/index.js +3 -9
- package/es/tabs/style/index.css +1 -1
- package/es/timeline/__test__/index.test.js +49 -0
- package/es/timeline/foldingItem.js +82 -0
- package/es/timeline/index.js +127 -203
- package/es/timeline/style/index.css +1 -1
- package/es/tooltip/__test__/index.test.js +67 -0
- package/es/tooltip/index.js +39 -86
- package/es/tooltip/style/index.css +1 -1
- package/es/transfer/Item.js +44 -53
- package/es/transfer/__test__/index.test.js +11 -0
- package/es/transfer/index.js +443 -4
- package/es/transfer/style/index.css +1 -1
- package/es/tree/Tree.js +86 -76
- package/es/tree/TreeDivider.js +3 -3
- package/es/tree/TreeItem.js +108 -204
- package/es/tree/TreeNode.js +318 -457
- package/es/tree/index.js +2 -9
- package/es/tree/style/index.css +1 -1
- package/es/tree/util.js +257 -9
- package/es/upload/{upload-legacy/Preview.js → Preview.js} +39 -33
- package/es/upload/Upload.js +193 -289
- package/es/upload/UploadAvatar.js +58 -44
- package/es/upload/UploadClick.js +45 -49
- package/es/upload/UploadDrag.js +43 -44
- package/es/upload/UploadPhoto.js +55 -70
- package/es/upload/UploadPictureCard.js +44 -39
- package/es/upload/index.js +71 -8
- package/es/upload/style/index.css +1 -1
- package/es/upload/tool.js +1 -0
- package/package.json +4 -1
- package/es/_util/SwitchVersion.js +0 -44
- package/es/_util/depreactedPropsCompat.js +0 -58
- package/es/_util/index.js +0 -32
- package/es/alert/Alert.js +0 -134
- package/es/alert/__tests__/index.test.js +0 -88
- package/es/badge/Badge.js +0 -90
- package/es/badge/__tests__/index.test.js +0 -82
- package/es/breadcrumb/__tests__/index.test.js +0 -61
- package/es/breadcrumb/index.js +0 -93
- package/es/breadcrumb/style/index.css +0 -1
- package/es/button/__tests__/index.test.js +0 -219
- package/es/card/__tests__/index.test.js +0 -169
- package/es/carousel/__tests__/index.test.js +0 -104
- package/es/carousel/index.js +0 -227
- package/es/carousel/style/index.css +0 -1
- package/es/carousel/style/index.js +0 -3
- package/es/cascader/Menu.js +0 -174
- package/es/cascader/__tests__/index.test.js +0 -389
- package/es/checkbox/Checkbox.js +0 -144
- package/es/checkbox/Group.js +0 -202
- package/es/checkbox/__tests__/index.test.js +0 -226
- package/es/checkbox/checkbox-legacy/CheckBox.js +0 -165
- package/es/checkbox/checkbox-legacy/index.js +0 -15
- package/es/checkbox/checkbox-legacy/style/index.css +0 -1
- package/es/checkbox/checkbox-legacy/style/index.js +0 -3
- package/es/collapse/__tests__/index.test.js +0 -111
- package/es/counter/Counter.js +0 -343
- package/es/counter/__tests__/index.test.js +0 -134
- package/es/counter/counter-legacy/index.js +0 -271
- package/es/date-picker/TimeList.js +0 -254
- package/es/date-picker/YMRangePanel.js +0 -372
- package/es/date-picker/__tests__/index.test.js +0 -961
- package/es/date-picker/datepicker-legacy/BasePicker.js +0 -519
- package/es/date-picker/datepicker-legacy/Calender.js +0 -430
- package/es/date-picker/datepicker-legacy/DatePanel.js +0 -463
- package/es/date-picker/datepicker-legacy/DatePicker.js +0 -107
- package/es/date-picker/datepicker-legacy/DateRangePanel.js +0 -496
- package/es/date-picker/datepicker-legacy/Modal.js +0 -71
- package/es/date-picker/datepicker-legacy/Time.js +0 -413
- package/es/date-picker/datepicker-legacy/TimePanel.js +0 -93
- package/es/date-picker/datepicker-legacy/TimePeriodPanel.js +0 -126
- package/es/date-picker/datepicker-legacy/TimePicker.js +0 -82
- package/es/date-picker/datepicker-legacy/TimeRangePanel.js +0 -98
- package/es/date-picker/datepicker-legacy/Type.js +0 -31
- package/es/date-picker/datepicker-legacy/WeekRangePanel.js +0 -345
- package/es/date-picker/datepicker-legacy/constants.js +0 -79
- package/es/date-picker/datepicker-legacy/dateUtil.js +0 -258
- package/es/date-picker/datepicker-legacy/index.js +0 -15
- package/es/date-picker/datepicker-legacy/local.js +0 -11
- package/es/date-picker/datepicker-legacy/style/index.css +0 -1
- package/es/date-picker/datepicker-legacy/style/index.js +0 -3
- package/es/date-picker/datepicker-legacy/style/timepicker.css +0 -1
- package/es/date-picker/datepicker-legacy/util.js +0 -60
- package/es/date-picker/toLunar.js +0 -172
- package/es/dropdown/DropdownButton.js +0 -106
- package/es/dropdown/DropdownMenu.js +0 -111
- package/es/dropdown/DropdownMenuItem.js +0 -178
- package/es/dropdown/__tests__/index.test.js +0 -317
- package/es/dropdown/utils.js +0 -35
- package/es/form/Form.js +0 -184
- package/es/form/__tests__/index.test.js +0 -575
- package/es/grid/__tests__/index.test.js +0 -104
- package/es/input/Input.js +0 -412
- package/es/input/__tests__/index.test.js +0 -381
- package/es/input/input-legacy/index.js +0 -353
- package/es/input/input-legacy/util.js +0 -176
- package/es/loading/Loading.js +0 -181
- package/es/loading/__tests__/index.test.js +0 -110
- package/es/locales/zh-Hant-HK.js +0 -121
- package/es/locales/zh-Hant-TW.js +0 -123
- package/es/menu/Menu.js +0 -422
- package/es/menu/__tests__/index.test.js +0 -279
- package/es/message/__tests__/index.test.js +0 -75
- package/es/message/index.js +0 -58
- package/es/message/style/index.css +0 -1
- package/es/message/style/index.js +0 -5
- package/es/modal/__tests__/index.test.js +0 -178
- package/es/nav-menu/__tests__/index.test.js +0 -27
- package/es/notice/Notice.js +0 -142
- package/es/notice/NoticeContainer.js +0 -113
- package/es/notice/__tests__/index.test.js +0 -174
- package/es/notice/index.js +0 -66
- package/es/notice/style/index.css +0 -1
- package/es/notice/style/index.js +0 -5
- package/es/notification/HandleNotification/index.js +0 -224
- package/es/notification/HandleNotification/style/index.css +0 -1
- package/es/notification/HandleNotification/style/index.js +0 -5
- package/es/notification/__tests__/index.test.js +0 -118
- package/es/pagination/__tests__/index.test.js +0 -248
- package/es/popover/__tests__/index.test.js +0 -152
- package/es/preview/index.js +0 -527
- package/es/preview/style/index.css +0 -1
- package/es/preview/style/index.js +0 -3
- package/es/progress/Progress.js +0 -110
- package/es/progress/__tests__/index.test.js +0 -131
- package/es/radio/Group.js +0 -203
- package/es/radio/Radio.js +0 -151
- package/es/radio/__tests__/index.test.js +0 -128
- package/es/radio/radio-legacy/index.js +0 -222
- package/es/radio/radio-legacy/style/index.css +0 -1
- package/es/radio/radio-legacy/style/index.js +0 -3
- package/es/rate/__tests__/index.test.js +0 -124
- package/es/select/__tests__/index.test.js +0 -505
- package/es/select/select-legacy/Option.js +0 -81
- package/es/select/select-legacy/Select.js +0 -710
- package/es/select/select-legacy/SelectDropdown.js +0 -164
- package/es/select/select-legacy/SelectInput.js +0 -312
- package/es/select/select-legacy/common.js +0 -19
- package/es/select/select-legacy/index.js +0 -16
- package/es/stepper/Stepper.js +0 -151
- package/es/stepper/__tests__/index.test.js +0 -161
- package/es/table/ClickOuterside.js +0 -103
- package/es/table/TableContent.js +0 -109
- package/es/table/__tests__/index.test.js +0 -133
- package/es/table/checkbox/style/index.css +0 -1
- package/es/table/checkbox/style/index.js +0 -3
- package/es/tabs/__tests__/index.test.js +0 -333
- package/es/tabs/tabs-legacy/ItemDropdown.js +0 -170
- package/es/tabs/tabs-legacy/TabPane.js +0 -78
- package/es/tabs/tabs-legacy/Tabs.js +0 -299
- package/es/tabs/tabs-legacy/index.js +0 -18
- package/es/tabs/tabs-legacy/style/index.css +0 -1
- package/es/tabs/tabs-legacy/style/index.js +0 -3
- package/es/tag/__tests__/index.test.js +0 -46
- package/es/tag/index.js +0 -94
- package/es/tag/style/index.css +0 -1
- package/es/tag/style/index.js +0 -3
- package/es/timeline/__tests__/index.test.js +0 -198
- package/es/tooltip/__tests__/index.test.js +0 -170
- package/es/transfer/Transfer.js +0 -566
- package/es/transfer/__tests__/index.test.js +0 -210
- package/es/tree/IconLoading.js +0 -38
- package/es/tree/__tests__/index.test.js +0 -603
- package/es/tree/tree-legacy/Tree.js +0 -337
- package/es/tree/tree-legacy/TreeDivider.js +0 -25
- package/es/tree/tree-legacy/TreeItem.js +0 -333
- package/es/tree/tree-legacy/TreeNode.js +0 -719
- package/es/tree/tree-legacy/index.js +0 -13
- package/es/tree/tree-legacy/style/index.css +0 -1
- package/es/tree/tree-legacy/style/index.js +0 -3
- package/es/tree/tree-legacy/util.js +0 -434
- package/es/upload/__tests__/index.test.js +0 -760
- package/es/upload/main.js +0 -91
- package/es/upload/upload-legacy/Upload.js +0 -435
- package/es/upload/upload-legacy/UploadAvatar.js +0 -322
- package/es/upload/upload-legacy/UploadClick.js +0 -125
- package/es/upload/upload-legacy/UploadDrag.js +0 -180
- package/es/upload/upload-legacy/UploadPhoto.js +0 -183
- package/es/upload/upload-legacy/UploadPictureCard.js +0 -126
- package/es/upload/upload-legacy/index.js +0 -75
- package/es/upload/upload-legacy/style/index.css +0 -1
- package/es/upload/upload-legacy/style/index.js +0 -5
- package/es/upload/upload-legacy/tool.js +0 -84
- package/es/watermark/index.js +0 -101
- package/es/watermark/watermark.js +0 -252
- /package/es/checkbox/{checkbox-legacy/common.js → common.js} +0 -0
- /package/es/{breadcrumb/style → style}/index.js +0 -0
- /package/es/upload/{upload-legacy/style → style}/preview.css +0 -0
- /package/es/upload/{upload-legacy/style → style}/preview.js +0 -0
package/es/upload/UploadPhoto.js
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
|
-
var
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
11
|
|
|
14
|
-
var
|
|
12
|
+
var _context = _interopRequireDefault(require("../context"));
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var _Upload2 = _interopRequireDefault(require("./Upload"));
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _Preview = _interopRequireDefault(require("./Preview"));
|
|
19
17
|
|
|
20
|
-
var
|
|
18
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
21
|
|
|
24
|
-
var
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
25
23
|
|
|
26
|
-
var
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
|
+
|
|
32
|
+
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); } }
|
|
33
|
+
|
|
34
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
|
+
|
|
40
|
+
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); }; }
|
|
31
41
|
|
|
32
|
-
function
|
|
42
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
33
43
|
|
|
34
|
-
function
|
|
44
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
45
|
|
|
36
|
-
function
|
|
46
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
47
|
|
|
38
|
-
function
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
49
|
|
|
40
50
|
var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
41
|
-
(
|
|
51
|
+
_inherits(UploadPhoto, _Upload);
|
|
42
52
|
|
|
43
53
|
var _super = _createSuper(UploadPhoto);
|
|
44
54
|
|
|
45
55
|
function UploadPhoto(props) {
|
|
46
56
|
var _this;
|
|
47
57
|
|
|
48
|
-
(
|
|
58
|
+
_classCallCheck(this, UploadPhoto);
|
|
59
|
+
|
|
49
60
|
_this = _super.call(this, props);
|
|
50
61
|
_this.state = Object.assign({
|
|
51
62
|
uploading: false,
|
|
@@ -58,7 +69,7 @@ var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
|
58
69
|
return _this;
|
|
59
70
|
}
|
|
60
71
|
|
|
61
|
-
(
|
|
72
|
+
_createClass(UploadPhoto, [{
|
|
62
73
|
key: "closeModal",
|
|
63
74
|
value: function closeModal() {
|
|
64
75
|
this.setState({
|
|
@@ -75,28 +86,6 @@ var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
|
75
86
|
activeIndex: activeIndex
|
|
76
87
|
});
|
|
77
88
|
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "precentNum",
|
|
80
|
-
value: function precentNum() {
|
|
81
|
-
var photoSize = this.props.photoSize;
|
|
82
|
-
var num;
|
|
83
|
-
|
|
84
|
-
switch (photoSize) {
|
|
85
|
-
case 'small':
|
|
86
|
-
num = 0.8;
|
|
87
|
-
break;
|
|
88
|
-
|
|
89
|
-
case 'large':
|
|
90
|
-
num = 2;
|
|
91
|
-
break;
|
|
92
|
-
|
|
93
|
-
default:
|
|
94
|
-
num = 1.4;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return num;
|
|
99
|
-
}
|
|
100
89
|
}, {
|
|
101
90
|
key: "render",
|
|
102
91
|
value: function render() {
|
|
@@ -105,23 +94,21 @@ var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
|
105
94
|
var _this$state = this.state,
|
|
106
95
|
fileList = _this$state.fileList,
|
|
107
96
|
showModal = _this$state.showModal,
|
|
97
|
+
previewFile = _this$state.previewFile,
|
|
108
98
|
activeIndex = _this$state.activeIndex,
|
|
109
99
|
fileCountLimted = _this$state.fileCountLimted;
|
|
110
100
|
var _this$props = this.props,
|
|
111
101
|
onRemove = _this$props.onRemove,
|
|
112
102
|
disabled = _this$props.disabled,
|
|
113
103
|
accept = _this$props.accept,
|
|
114
|
-
localeDatas = _this$props.localeDatas
|
|
115
|
-
theme = _this$props.theme,
|
|
116
|
-
_this$props$photoSize = _this$props.photoSize,
|
|
117
|
-
photoSize = _this$props$photoSize === void 0 ? 'default' : _this$props$photoSize;
|
|
104
|
+
localeDatas = _this$props.localeDatas;
|
|
118
105
|
var images = fileList.map(function (file) {
|
|
119
106
|
return {
|
|
120
107
|
url: file.url
|
|
121
108
|
};
|
|
122
109
|
});
|
|
123
110
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
|
-
className: (0, _classnames["default"])('hi-upload hi-upload--photo',
|
|
111
|
+
className: (0, _classnames["default"])('hi-upload hi-upload--photo', {
|
|
125
112
|
'hi-upload--disabled': disabled
|
|
126
113
|
}),
|
|
127
114
|
onClick: function onClick(e) {
|
|
@@ -135,49 +122,44 @@ var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
|
135
122
|
if (file.uploadState === 'loading') {
|
|
136
123
|
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
137
124
|
key: index,
|
|
138
|
-
className:
|
|
125
|
+
className: "hi-upload__item"
|
|
139
126
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
140
127
|
src: file.url,
|
|
141
128
|
className: "hi-upload__thumb"
|
|
142
129
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
143
|
-
className:
|
|
130
|
+
className: "hi-upload__precent"
|
|
144
131
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
145
132
|
className: "hi-upload__loading-text"
|
|
146
133
|
}, file.progressNumber ? file.progressNumber < 100 ? file.progressNumber + '%' : localeDatas.upload.uploadSuccess : 0 + '%'), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
134
|
className: "hi-upload__loading-bar",
|
|
148
135
|
style: {
|
|
149
|
-
width: file.progressNumber *
|
|
136
|
+
width: file.progressNumber * 1.4 + 'px'
|
|
150
137
|
}
|
|
151
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
|
-
className: "hi-upload__loading-shadow"
|
|
153
138
|
})));
|
|
154
139
|
} else {
|
|
155
140
|
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
156
141
|
key: index,
|
|
157
|
-
className:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
142
|
+
className: "hi-upload__item"
|
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
144
|
+
src: file.url,
|
|
145
|
+
className: "hi-upload__thumb ".concat(file.uploadState === 'error' && 'error'),
|
|
161
146
|
onClick: function onClick() {
|
|
162
147
|
return _this2.previewImage(file, index);
|
|
163
148
|
}
|
|
164
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
165
|
-
src: file.url,
|
|
166
|
-
className: "hi-upload__thumb ".concat(file.uploadState === 'error' && 'error')
|
|
167
149
|
}), onRemove && /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
168
150
|
name: "close-circle",
|
|
169
151
|
className: "hi-upload__photo-del",
|
|
170
|
-
onClick: function onClick(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
_this2.deleteFile(file, index);
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
return _this2.deleteFile(file, index);
|
|
174
154
|
}
|
|
175
155
|
}), file.uploadState === 'error' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
-
className: "hi-
|
|
177
|
-
},
|
|
156
|
+
className: "hi-upload__precent"
|
|
157
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
158
|
+
name: "comment-circle-o"
|
|
159
|
+
}), /*#__PURE__*/_react["default"].createElement("br", null), localeDatas.upload.uploadFailed)));
|
|
178
160
|
}
|
|
179
161
|
}), !fileCountLimted && /*#__PURE__*/_react["default"].createElement("li", {
|
|
180
|
-
className:
|
|
162
|
+
className: "hi-upload__item hi-upload__item--upload"
|
|
181
163
|
}, /*#__PURE__*/_react["default"].createElement("label", {
|
|
182
164
|
style: {
|
|
183
165
|
display: 'block'
|
|
@@ -195,20 +177,23 @@ var UploadPhoto = /*#__PURE__*/function (_Upload) {
|
|
|
195
177
|
hidden: true
|
|
196
178
|
}), /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
197
179
|
name: "plus"
|
|
198
|
-
})))), showModal && /*#__PURE__*/_react["default"].createElement(
|
|
199
|
-
|
|
180
|
+
})))), showModal && /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
181
|
+
src: previewFile.url,
|
|
200
182
|
images: images,
|
|
201
183
|
activeIndex: activeIndex,
|
|
202
|
-
|
|
184
|
+
show: showModal,
|
|
203
185
|
onClose: this.closeModal.bind(this)
|
|
204
186
|
}));
|
|
205
187
|
}
|
|
206
188
|
}]);
|
|
189
|
+
|
|
207
190
|
return UploadPhoto;
|
|
208
191
|
}(_Upload2["default"]);
|
|
209
192
|
|
|
210
193
|
UploadPhoto.defaultProps = Object.assign({}, _objectSpread({}, _Upload2["default"].defaultProps), {
|
|
211
194
|
accept: 'image/jpg,image/jpeg,image/png'
|
|
212
195
|
});
|
|
213
|
-
|
|
196
|
+
|
|
197
|
+
var _default = (0, _context["default"])(UploadPhoto);
|
|
198
|
+
|
|
214
199
|
exports["default"] = _default;
|
|
@@ -1,87 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Upload2 = _interopRequireDefault(require("./Upload"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _context = _interopRequireDefault(require("../context"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
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); }
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
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); } }
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
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); }
|
|
35
35
|
|
|
36
|
-
function
|
|
36
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
37
|
|
|
38
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (
|
|
38
|
+
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); }; }
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
41
|
+
|
|
42
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
+
|
|
44
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
|
+
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
|
+
|
|
48
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
49
|
|
|
42
50
|
var UploadPictureCard = /*#__PURE__*/function (_Upload) {
|
|
43
|
-
(
|
|
51
|
+
_inherits(UploadPictureCard, _Upload);
|
|
44
52
|
|
|
45
53
|
var _super = _createSuper(UploadPictureCard);
|
|
46
54
|
|
|
47
55
|
function UploadPictureCard() {
|
|
48
56
|
var _this;
|
|
49
57
|
|
|
50
|
-
(
|
|
58
|
+
_classCallCheck(this, UploadPictureCard);
|
|
51
59
|
|
|
52
60
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
53
61
|
args[_key] = arguments[_key];
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
57
|
-
|
|
65
|
+
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "handleButtonClick", function () {
|
|
58
67
|
_this.uploadRef.value = '';
|
|
59
68
|
|
|
60
69
|
_this.uploadRef.click();
|
|
61
70
|
});
|
|
71
|
+
|
|
62
72
|
return _this;
|
|
63
73
|
}
|
|
64
74
|
|
|
65
|
-
(
|
|
75
|
+
_createClass(UploadPictureCard, [{
|
|
66
76
|
key: "render",
|
|
67
77
|
value: function render() {
|
|
68
78
|
var _this2 = this;
|
|
69
79
|
|
|
70
80
|
var _this$props = this.props,
|
|
71
|
-
|
|
81
|
+
buttonText = _this$props.buttonText,
|
|
72
82
|
showUploadList = _this$props.showUploadList,
|
|
73
83
|
multiple = _this$props.multiple,
|
|
74
84
|
disabled = _this$props.disabled,
|
|
75
85
|
accept = _this$props.accept,
|
|
76
86
|
onRemove = _this$props.onRemove,
|
|
77
|
-
localeDatas = _this$props.localeDatas
|
|
78
|
-
theme = _this$props.theme,
|
|
79
|
-
onDownload = _this$props.onDownload;
|
|
87
|
+
localeDatas = _this$props.localeDatas;
|
|
80
88
|
var _this$state = this.state,
|
|
81
89
|
fileList = _this$state.fileList,
|
|
82
90
|
fileCountLimted = _this$state.fileCountLimted;
|
|
83
91
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
-
className: "hi-upload hi-upload--picture-card
|
|
92
|
+
className: "hi-upload hi-upload--picture-card"
|
|
85
93
|
}, this.outMaxsizeTip(), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement("input", {
|
|
86
94
|
ref: function ref(node) {
|
|
87
95
|
_this2.uploadRef = node;
|
|
@@ -99,7 +107,7 @@ var UploadPictureCard = /*#__PURE__*/function (_Upload) {
|
|
|
99
107
|
type: "primary",
|
|
100
108
|
disabled: disabled || fileCountLimted,
|
|
101
109
|
onClick: this.handleButtonClick
|
|
102
|
-
},
|
|
110
|
+
}, buttonText || localeDatas.upload.buttonText))), showUploadList && /*#__PURE__*/_react["default"].createElement("ul", {
|
|
103
111
|
className: "hi-upload__list"
|
|
104
112
|
}, fileList.map(function (file, index) {
|
|
105
113
|
var fileNameCls = (0, _classnames["default"])('hi-upload__filename', file.uploadState === 'error' && 'hi-upload__filename--error');
|
|
@@ -112,19 +120,13 @@ var UploadPictureCard = /*#__PURE__*/function (_Upload) {
|
|
|
112
120
|
className: "img-wrap"
|
|
113
121
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
114
122
|
src: file.url
|
|
123
|
+
}), file.uploadState === 'loading' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
|
+
className: "img-mask"
|
|
115
125
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
126
|
className: "hi-upload__right-content"
|
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
118
|
-
target: "_blank",
|
|
119
|
-
href: file.url || null,
|
|
127
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
120
128
|
className: fileNameCls,
|
|
121
|
-
title: file.name
|
|
122
|
-
onClick: function onClick(e) {
|
|
123
|
-
if (onDownload) {
|
|
124
|
-
e.preventDefault();
|
|
125
|
-
onDownload(file);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
129
|
+
title: file.name
|
|
128
130
|
}, file.name), /*#__PURE__*/_react["default"].createElement("span", null, onRemove && /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
129
131
|
name: file.uploadState === 'loading' ? 'close' : 'delete',
|
|
130
132
|
onClick: function onClick() {
|
|
@@ -141,11 +143,14 @@ var UploadPictureCard = /*#__PURE__*/function (_Upload) {
|
|
|
141
143
|
})));
|
|
142
144
|
}
|
|
143
145
|
}]);
|
|
146
|
+
|
|
144
147
|
return UploadPictureCard;
|
|
145
148
|
}(_Upload2["default"]);
|
|
146
149
|
|
|
147
150
|
UploadPictureCard.defaultProps = Object.assign({}, _objectSpread({}, _Upload2["default"].defaultProps), {
|
|
148
151
|
accept: 'image/jpg,image/jpeg,image/png'
|
|
149
152
|
});
|
|
150
|
-
|
|
153
|
+
|
|
154
|
+
var _default = (0, _context["default"])(UploadPictureCard);
|
|
155
|
+
|
|
151
156
|
exports["default"] = _default;
|
package/es/upload/index.js
CHANGED
|
@@ -1,20 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _UploadClick = _interopRequireDefault(require("./UploadClick"));
|
|
11
|
+
|
|
12
|
+
var _UploadDrag = _interopRequireDefault(require("./UploadDrag"));
|
|
13
|
+
|
|
14
|
+
var _UploadPhoto = _interopRequireDefault(require("./UploadPhoto"));
|
|
15
|
+
|
|
16
|
+
var _UploadAvatar = _interopRequireDefault(require("./UploadAvatar"));
|
|
17
|
+
|
|
18
|
+
var _UploadPictureCard = _interopRequireDefault(require("./UploadPictureCard"));
|
|
19
|
+
|
|
20
|
+
require("./style/index");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
|
+
|
|
32
|
+
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); } }
|
|
33
|
+
|
|
34
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
35
|
+
|
|
36
|
+
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); }
|
|
37
|
+
|
|
38
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
39
|
+
|
|
40
|
+
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); }; }
|
|
41
|
+
|
|
42
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
43
|
+
|
|
44
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
45
|
+
|
|
46
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
|
+
|
|
48
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
49
|
+
|
|
50
|
+
var Upload = /*#__PURE__*/function (_Component) {
|
|
51
|
+
_inherits(Upload, _Component);
|
|
52
|
+
|
|
53
|
+
var _super = _createSuper(Upload);
|
|
54
|
+
|
|
55
|
+
function Upload() {
|
|
56
|
+
_classCallCheck(this, Upload);
|
|
11
57
|
|
|
12
|
-
|
|
58
|
+
return _super.apply(this, arguments);
|
|
59
|
+
}
|
|
13
60
|
|
|
14
|
-
|
|
61
|
+
_createClass(Upload, [{
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
var type = this.props.type;
|
|
15
65
|
|
|
16
|
-
|
|
66
|
+
if (type === 'normal') {
|
|
67
|
+
return /*#__PURE__*/_react["default"].createElement(_UploadClick["default"], this.props);
|
|
68
|
+
} else if (type === 'drag') {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_UploadDrag["default"], this.props);
|
|
70
|
+
} else if (type === 'photo') {
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement(_UploadPhoto["default"], this.props);
|
|
72
|
+
} else if (type === 'avatar') {
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement(_UploadAvatar["default"], this.props);
|
|
74
|
+
} else if (type === 'pictureCard') {
|
|
75
|
+
return /*#__PURE__*/_react["default"].createElement(_UploadPictureCard["default"], this.props);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
17
79
|
|
|
18
|
-
|
|
80
|
+
return Upload;
|
|
81
|
+
}(_react.Component);
|
|
19
82
|
|
|
20
|
-
exports["default"] =
|
|
83
|
+
exports["default"] = Upload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.hi-upload--disabled{cursor:not-allowed}.hi-upload__tips{font-size:12px;color:#999;line-height:20px}.hi-upload__tips--single-line{display:block;padding:7px 0 8px}.hi-upload__tips--exist{padding-left:3px;line-height:22px}.hi-upload__list{width:100%;overflow:hidden}.hi-upload__item{height:36px;cursor:default;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:6px 0;overflow:hidden;position:relative}.hi-upload__item a.hi-upload__filename{-webkit-box-flex:1;-ms-flex:1;flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:14px;cursor:pointer;color:#666}.hi-upload__item a.hi-upload__filename--error{color:red}.hi-upload__item a.hi-upload__filename--error:not([href]){color:red}.hi-upload__item-tips{color:#428ef5;background:#edf2fc;border-radius:2px;font-size:14px;padding:8px 12px;height:auto !important;border:1px solid #d8e5ff}.hi-upload__item .hi-icon{cursor:pointer;font-size:16px;color:#ccc}.hi-upload__item .icon-plus{font-size:24px}.hi-upload__right-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:8px;overflow:hidden}.hi-upload__upstatus{width:calc(100% - 30px);margin-left:30px;height:2px;background:#f2f2f2;border-radius:9px;position:absolute;bottom:0}.hi-upload__upstatus-line{display:inline-block;height:2px;width:0;background:#4284f5;border-radius:4px 0 0 4px;position:absolute;left:0;top:0;-webkit-transition:width 0.1s linear;transition:width 0.1s linear}.hi-upload__upstatus-num{position:absolute;right:60px;top:-32px;font-style:normal;font-size:12px;color:#999}.hi-upload--drag{position:relative;width:100%;min-height:172px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px dashed #dbdbdb;border-radius:2px;cursor:pointer;padding:12px}.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#4284f5}.hi-upload--drag .hi-upload__operate-icon{color:#4284f5;cursor:pointer}.hi-upload--drag .icon-tishi{color:#4284f5;margin-right:5px}.hi-upload--drag.hi-upload--disabled{cursor:not-allowed;opacity:0.6}.hi-upload--drag.hi-upload--disabled,.hi-upload--drag.hi-upload--disabled:hover{border-color:#d9d9d9}.hi-upload--drag.hi-upload--disabled .drop-click{cursor:not-allowed}.hi-upload--drag .hi-upload__item:not(:first-child){border-bottom:1px solid #e6e6e6}.hi-upload--drag .drop-content{display:none}.hi-upload--drag .show-drop-content{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;display:inline-block;height:60px;text-align:center;font-size:14px;color:#333;letter-spacing:0;line-height:22px;cursor:inherit}.hi-upload--drag .show-drop-content .hi-upload__tips--single-line{padding:0;margin-top:4px}.hi-upload--drag .show-drop-content .icon{display:block;cursor:inherit;margin-bottom:6px}.hi-upload--drag .show-drop-content .icon::before{font-size:40px;color:#4284f5}.hi-upload--drag .drop-over{border:1px dashed #0099fb}.hi-upload--avatar.hi-upload--disabled .photo-upload,.hi-upload--photo.hi-upload--disabled .photo-upload{cursor:not-allowed}.hi-upload--avatar.hi-upload--disabled .photo-upload,.hi-upload--avatar.hi-upload--disabled .photo-upload:hover,.hi-upload--photo.hi-upload--disabled .photo-upload,.hi-upload--photo.hi-upload--disabled .photo-upload:hover{border-color:#d9d9d9}.hi-upload--avatar .hi-upload__list,.hi-upload--photo .hi-upload__list{overflow:visible}.hi-upload--avatar .hi-upload__item,.hi-upload--photo .hi-upload__item{width:140px;height:140px;display:inline-block;position:relative;text-align:center;padding:0;margin:8px;overflow:visible;vertical-align:middle;background:#fff;border-radius:2px}.hi-upload--avatar .hi-upload__item--photo-error,.hi-upload--photo .hi-upload__item--photo-error{height:28px;background:rgba(0,0,0,0.5);position:absolute;width:100%;color:#fff;bottom:0;line-height:28px;font-size:16px;border-radius:0 0 2px 2px}.hi-upload--avatar .hi-upload__item:not(:last-child),.hi-upload--photo .hi-upload__item:not(:last-child){background:#e7e7e7}.hi-upload--avatar .hi-upload__item img,.hi-upload--photo .hi-upload__item img{margin-top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hi-upload--avatar .hi-upload__item--upload,.hi-upload--photo .hi-upload__item--upload{text-align:center;font-size:28px;color:#e7e7e7;border:1px dashed #d8d8d8;line-height:140px}.hi-upload--avatar .hi-upload__item--upload:hover,.hi-upload--photo .hi-upload__item--upload:hover{border-color:#0099fb}.hi-upload--avatar .hi-upload__item-mask,.hi-upload--photo .hi-upload__item-mask{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0,0,0,0.4);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff;opacity:0;-webkit-transition:0.3s ease;transition:0.3s ease;z-index:2;border-radius:4px;cursor:pointer}.hi-upload--avatar .hi-upload__item-mask i,.hi-upload--photo .hi-upload__item-mask i{line-height:32px;font-size:32px}.hi-upload--avatar .hi-upload__item-mask span,.hi-upload--photo .hi-upload__item-mask span{font-size:16px}.hi-upload--avatar .hi-upload__item:hover .hi-upload__photo-del,.hi-upload--photo .hi-upload__item:hover .hi-upload__photo-del{display:block;color:#000;z-index:4}.hi-upload--avatar .hi-upload__item:hover .hi-upload__item-mask,.hi-upload--photo .hi-upload__item:hover .hi-upload__item-mask{opacity:1}.hi-upload--photo .hi-upload__item--small{width:80px;height:80px;line-height:80px}.hi-upload--photo .hi-upload__item--small .hi-upload__thumb{max-width:80px;max-height:80px}.hi-upload--photo .hi-upload__item--large{width:200px;height:200px;line-height:200px}.hi-upload--photo .hi-upload__item--large .hi-upload__thumb{max-width:200px;max-height:200px}.hi-upload__thumb{max-width:140px;max-height:140px}.hi-upload--avatar .hi-upload__item--upload{width:80px;height:80px;line-height:80px;-webkit-box-sizing:border-box;box-sizing:border-box}.hi-upload__photo-del{position:absolute;right:-8px;top:-10px;font-size:20px;line-height:20px;display:none;z-index:3}.hi-upload__precent{position:absolute;width:140px;height:140px;left:0;top:0;background:rgba(0,0,0,0.5);color:#fff;font-size:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:2px}.hi-upload__precent--small{width:80px;height:80px}.hi-upload__precent--large{width:200px;height:200px}.hi-upload__loading-bar{width:0;height:4px;position:absolute;left:0;bottom:0;background:#4284f5;z-index:3}.hi-upload__loading-shadow{width:100%;height:4px;position:absolute;left:0;bottom:0;background:#000;opacity:0.34;z-index:2}.hi-upload--picture-card .hi-upload__upstatus{width:100%;margin-left:0}.hi-upload--picture-card .hi-upload__right-content{padding-left:0}.hi-upload--picture-card .upload--disabled{cursor:not-allowed}.hi-upload--picture-card .hi-upload__list{margin-top:15px;overflow:auto}.hi-upload--picture-card .hi-upload__list .hi-upload__item{height:64px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #d8d8d8;border-radius:2px;padding:8px 18px 8px 6px;margin-bottom:12px;font-size:12px;color:#333}.hi-upload--picture-card .hi-upload__list .hi-upload__item--error{border:1px solid #f44141}.hi-upload--picture-card .hi-upload__list .hi-upload__item:hover{background:#f7f7f7}.hi-upload--picture-card .hi-upload__list .hi-upload__item.loading{color:#999}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap{float:left;width:50px;height:50px;margin-right:12px;position:relative}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap img{position:absolute;left:0;top:0;right:0;bottom:0;margin:auto;max-width:50px;max-height:50px}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap .img-mask{width:50px;height:50px;position:absolute;left:0;top:0;background:rgba(0,0,0,0.3)}.hi-upload .hi-modal__content{padding:16px 24px}.hi-upload__modal-tips{display:-webkit-box;display:-ms-flexbox;display:flex}.hi-upload__error—content{margin:12px}.hi-upload__error-title{width:300px;line-height:24px;font-size:16px;color:#333;margin-bottom:4px}.hi-upload__error-info{font-size:14px;color:#666}.hi-upload p{margin:0;padding:0}.hi-upload ul{margin:0;padding:0;list-style:none}.hi-upload li{list-style:none}.hi-modal .content{font-size:0}.theme__orange.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#f63}.theme__orange.hi-upload--drag .hi-upload__operate-icon{color:#f63}.theme__orange.hi-upload--drag .drop-over{border:1px dashed #f63}.theme__orange.hi-upload--drag .show-drop-content .icon::before{color:#f63}.theme__orange.hi-upload .hi-upload__item-tips{color:#f63}.theme__orange.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#f63}.theme__orange.hi-upload .hi-upload__item-tips .icon-tishi{color:#f63}.theme__orange.hi-upload--avatar .hi-upload__item--upload:hover,.theme__orange.hi-upload--photo .hi-upload__item--upload:hover{border-color:#f63}.theme__orange.hi-upload .hi-upload__upstatus-line{background-color:#f63}.theme__orange.hi-upload .hi-upload__upstatus-num{color:#f63}.theme__orange.hi-upload .hi-upload__loading-bar{background:#f63}.theme__cyan.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#46bc99}.theme__cyan.hi-upload--drag .hi-upload__operate-icon{color:#46bc99}.theme__cyan.hi-upload--drag .drop-over{border:1px dashed #46bc99}.theme__cyan.hi-upload--drag .show-drop-content .icon::before{color:#46bc99}.theme__cyan.hi-upload .hi-upload__item-tips{color:#46bc99}.theme__cyan.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#46bc99}.theme__cyan.hi-upload .hi-upload__item-tips .icon-tishi{color:#46bc99}.theme__cyan.hi-upload--avatar .hi-upload__item--upload:hover,.theme__cyan.hi-upload--photo .hi-upload__item--upload:hover{border-color:#46bc99}.theme__cyan.hi-upload .hi-upload__upstatus-line{background-color:#46bc99}.theme__cyan.hi-upload .hi-upload__upstatus-num{color:#46bc99}.theme__cyan.hi-upload .hi-upload__loading-bar{background:#46bc99}.theme__magenta.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#ff5975}.theme__magenta.hi-upload--drag .hi-upload__operate-icon{color:#ff5975}.theme__magenta.hi-upload--drag .drop-over{border:1px dashed #ff5975}.theme__magenta.hi-upload--drag .show-drop-content .icon::before{color:#ff5975}.theme__magenta.hi-upload .hi-upload__item-tips{color:#ff5975}.theme__magenta.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#ff5975}.theme__magenta.hi-upload .hi-upload__item-tips .icon-tishi{color:#ff5975}.theme__magenta.hi-upload--avatar .hi-upload__item--upload:hover,.theme__magenta.hi-upload--photo .hi-upload__item--upload:hover{border-color:#ff5975}.theme__magenta.hi-upload .hi-upload__upstatus-line{background-color:#ff5975}.theme__magenta.hi-upload .hi-upload__upstatus-num{color:#ff5975}.theme__magenta.hi-upload .hi-upload__loading-bar{background:#ff5975}.theme__lavender.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#b450de}.theme__lavender.hi-upload--drag .hi-upload__operate-icon{color:#b450de}.theme__lavender.hi-upload--drag .drop-over{border:1px dashed #b450de}.theme__lavender.hi-upload--drag .show-drop-content .icon::before{color:#b450de}.theme__lavender.hi-upload .hi-upload__item-tips{color:#b450de}.theme__lavender.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#b450de}.theme__lavender.hi-upload .hi-upload__item-tips .icon-tishi{color:#b450de}.theme__lavender.hi-upload--avatar .hi-upload__item--upload:hover,.theme__lavender.hi-upload--photo .hi-upload__item--upload:hover{border-color:#b450de}.theme__lavender.hi-upload .hi-upload__upstatus-line{background-color:#b450de}.theme__lavender.hi-upload .hi-upload__upstatus-num{color:#b450de}.theme__lavender.hi-upload .hi-upload__loading-bar{background:#b450de}.theme__blue.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#3da8f5}.theme__blue.hi-upload--drag .hi-upload__operate-icon{color:#3da8f5}.theme__blue.hi-upload--drag .drop-over{border:1px dashed #3da8f5}.theme__blue.hi-upload--drag .show-drop-content .icon::before{color:#3da8f5}.theme__blue.hi-upload .hi-upload__item-tips{color:#3da8f5}.theme__blue.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#3da8f5}.theme__blue.hi-upload .hi-upload__item-tips .icon-tishi{color:#3da8f5}.theme__blue.hi-upload--avatar .hi-upload__item--upload:hover,.theme__blue.hi-upload--photo .hi-upload__item--upload:hover{border-color:#3da8f5}.theme__blue.hi-upload .hi-upload__upstatus-line{background-color:#3da8f5}.theme__blue.hi-upload .hi-upload__upstatus-num{color:#3da8f5}.theme__blue.hi-upload .hi-upload__loading-bar{background:#3da8f5}.theme__purple.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#8a8acb}.theme__purple.hi-upload--drag .hi-upload__operate-icon{color:#8a8acb}.theme__purple.hi-upload--drag .drop-over{border:1px dashed #8a8acb}.theme__purple.hi-upload--drag .show-drop-content .icon::before{color:#8a8acb}.theme__purple.hi-upload .hi-upload__item-tips{color:#8a8acb}.theme__purple.hi-upload .hi-upload__item-tips .hi-upload__operate-icon{color:#8a8acb}.theme__purple.hi-upload .hi-upload__item-tips .icon-tishi{color:#8a8acb}.theme__purple.hi-upload--avatar .hi-upload__item--upload:hover,.theme__purple.hi-upload--photo .hi-upload__item--upload:hover{border-color:#8a8acb}.theme__purple.hi-upload .hi-upload__upstatus-line{background-color:#8a8acb}.theme__purple.hi-upload .hi-upload__upstatus-num{color:#8a8acb}.theme__purple.hi-upload .hi-upload__loading-bar{background:#8a8acb}
|
|
1
|
+
.hi-upload--disabled{cursor:not-allowed}.hi-upload__button{display:inline-block;width:88px;height:32px;font-size:14px;background:#4284f5;color:#fff;cursor:pointer;line-height:32px;text-align:center;border-radius:2px}.hi-upload__button--disabled{cursor:not-allowed;opacity:0.5}.hi-upload__tips{font-size:12px;color:#999}.hi-upload__tips--single-line{display:block;padding:12px 0 8px}.hi-upload__tips--exist{padding-left:3px}.hi-upload__list{width:100%;overflow:hidden}.hi-upload__item{height:36px;cursor:default;color:#666;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px 0;overflow:hidden;position:relative}.hi-upload__item-tips{color:#428ef5;background:#edf2fc;border-radius:2px;font-size:14px;padding:4px 6px;height:auto !important;border:1px solid #d8e5ff}.hi-upload__item .hi-icon{cursor:pointer;font-size:18px}.hi-upload__item .icon-plus{font-size:32px}.hi-upload__right-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:8px;overflow:hidden}.hi-upload__filename{-webkit-box-flex:1;-ms-flex:1;flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:14px}.hi-upload__filename--error{color:red}.hi-upload__upstatus{width:100%;height:2px;background:#f2f2f2;border-radius:9px;position:absolute;bottom:0}.hi-upload__upstatus-line{display:inline-block;height:2px;width:0;background:#4284f5;border-radius:4px 0 0 4px;position:absolute;left:0;top:0;-webkit-transition:width 0.1s linear;transition:width 0.1s linear}.hi-upload__upstatus-num{position:absolute;right:38px;top:-32px;font-style:normal;font-size:12px;color:#999}.hi-upload--drag{position:relative;width:100%;min-height:140px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px dashed #dbdbdb;cursor:pointer;padding:12px}.hi-upload--drag:hover:not(.hi-upload--nohover){border-color:#4284f5}.hi-upload--drag .hi-upload__operate-icon{color:#4284f5;cursor:pointer}.hi-upload--drag.hi-upload--disabled{cursor:not-allowed;opacity:0.6}.hi-upload--drag.hi-upload--disabled,.hi-upload--drag.hi-upload--disabled:hover{border-color:#d9d9d9}.hi-upload--drag.hi-upload--disabled .drop-click{cursor:not-allowed}.hi-upload--drag .hi-upload__item:not(:first-child):not(:last-child){border-bottom:1px solid #e6e6e6}.hi-upload--drag .drop-content{display:none}.hi-upload--drag .show-drop-content{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;display:inline-block;height:60px;text-align:center;font-size:12px;color:#333;letter-spacing:0;line-height:20px;cursor:inherit}.hi-upload--drag .show-drop-content .icon{display:block;cursor:inherit;margin-bottom:10px}.hi-upload--drag .show-drop-content .icon::before{font-size:30px;color:#4284f5}.hi-upload--drag .drop-over{border:1px dashed #0099fb}.hi-upload--avatar.hi-upload--disabled .photo-upload,.hi-upload--photo.hi-upload--disabled .photo-upload{cursor:not-allowed}.hi-upload--avatar.hi-upload--disabled .photo-upload,.hi-upload--avatar.hi-upload--disabled .photo-upload:hover,.hi-upload--photo.hi-upload--disabled .photo-upload,.hi-upload--photo.hi-upload--disabled .photo-upload:hover{border-color:#d9d9d9}.hi-upload--avatar .hi-upload__list,.hi-upload--photo .hi-upload__list{overflow:visible}.hi-upload--avatar .hi-upload__item,.hi-upload--photo .hi-upload__item{width:140px;height:140px;display:inline-block;position:relative;text-align:center;padding:0;margin:8px;overflow:visible;vertical-align:middle;background:#fff}.hi-upload--avatar .hi-upload__item:not(:last-child),.hi-upload--photo .hi-upload__item:not(:last-child){background:#e7e7e7}.hi-upload--avatar .hi-upload__item img,.hi-upload--photo .hi-upload__item img{margin-top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.hi-upload--avatar .hi-upload__item--upload,.hi-upload--photo .hi-upload__item--upload{text-align:center;font-size:28px;color:#e7e7e7;border:1px dashed #d8d8d8;line-height:140px}.hi-upload--avatar .hi-upload__item--upload:hover,.hi-upload--photo .hi-upload__item--upload:hover{border-color:#0099fb}.hi-upload--avatar .hi-upload__item:hover .hi-upload__photo-del,.hi-upload--photo .hi-upload__item:hover .hi-upload__photo-del{display:block}.hi-upload__photo-del{position:absolute;right:-8px;top:-12px;font-size:18px;display:none;z-index:2}.hi-upload__precent{position:absolute;width:140px;height:140px;left:0;top:0;background:rgba(0,0,0,0.4);color:#fff;font-size:14px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.hi-upload__loading-bar{width:0;height:4px;position:absolute;left:0;bottom:0;background:#4284f5}.hi-upload__thumb{max-width:140px;max-height:140px}.hi-upload--picture-card .upload--disabled{cursor:not-allowed}.hi-upload--picture-card .hi-upload__list{margin-top:15px;overflow:auto}.hi-upload--picture-card .hi-upload__list .hi-upload__item{height:64px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #d8d8d8;border-radius:2px;padding:8px 18px 8px 8px;margin-bottom:8px;font-size:12px;color:#333}.hi-upload--picture-card .hi-upload__list .hi-upload__item--error{border:1px solid #f44141}.hi-upload--picture-card .hi-upload__list .hi-upload__item:hover{background:#f7f7f7}.hi-upload--picture-card .hi-upload__list .hi-upload__item.loading{color:#999}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap{float:left;width:50px;height:50px;margin-right:12px;position:relative}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap img{position:absolute;left:0;top:0;right:0;bottom:0;margin:auto;max-width:50px;max-height:50px}.hi-upload--picture-card .hi-upload__list .hi-upload__item .img-wrap .img-mask{width:50px;height:50px;position:absolute;left:0;top:0;background:rgba(0,0,0,0.3)}.hi-upload__modal-tips{display:-webkit-box;display:-ms-flexbox;display:flex}.hi-upload__error—content{margin:12px}.hi-upload__error-title{width:300px;line-height:24px;font-size:16px;color:#333;margin-bottom:4px}.hi-upload__error-info{font-size:14px;color:#666}.hi-upload p{margin:0;padding:0}.hi-upload ul{margin:0;padding:0;list-style:none}.hi-upload li{list-style:none}.hi-modal .content{font-size:0}
|
package/es/upload/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/hiui",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.11",
|
|
4
4
|
"description": "HIUI for React",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node_modules/.bin/standard && node_modules/.bin/stylelint --config .stylelintrc 'components/**/*.scss'",
|
|
@@ -169,5 +169,8 @@
|
|
|
169
169
|
"stylelint --config .stylelintrc --fix",
|
|
170
170
|
"git add"
|
|
171
171
|
]
|
|
172
|
+
},
|
|
173
|
+
"engines": {
|
|
174
|
+
"node": "11.15.x"
|
|
172
175
|
}
|
|
173
176
|
}
|