cloud-b2b 1.1.86 → 1.1.87
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/es/Area/Area.js +10 -13
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +20 -23
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +83 -86
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +111 -116
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +139 -94
- package/es/SuperTable/SuperTable.less +11 -0
- package/es/SuperTable2/SuperTable2.js +89 -92
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +12 -15
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +11 -15
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +20 -23
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +84 -88
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +112 -118
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +139 -94
- package/lib/SuperTable/SuperTable.less +11 -0
- package/lib/SuperTable2/SuperTable2.js +90 -94
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +12 -15
- package/lib/SuperUpload/SuperUpload.js +39 -40
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
package/es/Area/Area.js
CHANGED
|
@@ -12,10 +12,9 @@ import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
|
12
12
|
import _Icon from "antd/es/icon";
|
|
13
13
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
14
14
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
15
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
16
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
17
15
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
18
16
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
17
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
19
18
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
20
19
|
import _Button from "antd/es/button";
|
|
21
20
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
@@ -23,8 +22,8 @@ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWitho
|
|
|
23
22
|
var _excluded = ["type", "children"];
|
|
24
23
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
-
function
|
|
27
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
27
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
29
28
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
30
29
|
import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
|
|
@@ -57,13 +56,11 @@ var ButtonEx = function ButtonEx(_ref) {
|
|
|
57
56
|
};
|
|
58
57
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
59
58
|
var Area = /*#__PURE__*/function (_React$Component) {
|
|
60
|
-
_inherits(Area, _React$Component);
|
|
61
|
-
var _super = _createSuper(Area);
|
|
62
59
|
function Area(_props) {
|
|
63
60
|
var _this;
|
|
64
61
|
_classCallCheck(this, Area);
|
|
65
|
-
_this =
|
|
66
|
-
_defineProperty(
|
|
62
|
+
_this = _callSuper(this, Area, [_props]);
|
|
63
|
+
_defineProperty(_this, "onChange", function (key, keyValue) {
|
|
67
64
|
var _this$props = _this.props,
|
|
68
65
|
onParentChange = _this$props.onParentChange,
|
|
69
66
|
child = _this$props.child,
|
|
@@ -85,7 +82,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
|
|
|
85
82
|
return onParentChange && onParentChange(_this.state.value);
|
|
86
83
|
});
|
|
87
84
|
});
|
|
88
|
-
_defineProperty(
|
|
85
|
+
_defineProperty(_this, "onSearch", function (key, control, parentKey, KeyValue) {
|
|
89
86
|
var _this$props2 = _this.props,
|
|
90
87
|
onAreaSearch = _this$props2.onAreaSearch,
|
|
91
88
|
child = _this$props2.child,
|
|
@@ -103,7 +100,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
|
|
|
103
100
|
});
|
|
104
101
|
return flag ? onAreaSearch && onAreaSearch(key, KeyValue, parentKey) : helper.showError('请输入上级选择器');
|
|
105
102
|
});
|
|
106
|
-
_defineProperty(
|
|
103
|
+
_defineProperty(_this, "toControl", function (item, props) {
|
|
107
104
|
if (item.type === 'button') {
|
|
108
105
|
var key = item.key,
|
|
109
106
|
title = item.title,
|
|
@@ -157,7 +154,7 @@ var Area = /*#__PURE__*/function (_React$Component) {
|
|
|
157
154
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
158
155
|
}
|
|
159
156
|
});
|
|
160
|
-
_defineProperty(
|
|
157
|
+
_defineProperty(_this, "onClick", function (e) {
|
|
161
158
|
var onClick = _this.props.onClick;
|
|
162
159
|
var key = _typeof(e) === 'object' ? e.key : e;
|
|
163
160
|
onClick && onClick(key);
|
|
@@ -168,7 +165,8 @@ var Area = /*#__PURE__*/function (_React$Component) {
|
|
|
168
165
|
};
|
|
169
166
|
return _this;
|
|
170
167
|
}
|
|
171
|
-
|
|
168
|
+
_inherits(Area, _React$Component);
|
|
169
|
+
return _createClass(Area, [{
|
|
172
170
|
key: "componentWillReceiveProps",
|
|
173
171
|
value: function componentWillReceiveProps(props) {
|
|
174
172
|
if (props.value !== this.props.value) {
|
|
@@ -227,6 +225,5 @@ var Area = /*#__PURE__*/function (_React$Component) {
|
|
|
227
225
|
}));
|
|
228
226
|
}
|
|
229
227
|
}]);
|
|
230
|
-
return Area;
|
|
231
228
|
}(React.Component);
|
|
232
229
|
export default Area;
|
|
@@ -11,16 +11,15 @@ import _Input from "antd/es/input";
|
|
|
11
11
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
12
12
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
13
13
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
14
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
15
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
14
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
17
15
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
16
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
18
17
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
19
18
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
20
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
22
|
-
function
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
25
24
|
import _setInterval from "@babel/runtime-corejs3/core-js-stable/set-interval";
|
|
26
25
|
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
@@ -42,30 +41,28 @@ var PROPS = {
|
|
|
42
41
|
};
|
|
43
42
|
var PROPS_KEYS = _Object$keys(PROPS);
|
|
44
43
|
var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
45
|
-
_inherits(CodeInput, _React$Component);
|
|
46
|
-
var _super = _createSuper(CodeInput);
|
|
47
44
|
function CodeInput(_props) {
|
|
48
45
|
var _this;
|
|
49
46
|
_classCallCheck(this, CodeInput);
|
|
50
|
-
_this =
|
|
51
|
-
_defineProperty(
|
|
47
|
+
_this = _callSuper(this, CodeInput, [_props]);
|
|
48
|
+
_defineProperty(_this, "onGetCode", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
52
49
|
var onGetCode, that, s;
|
|
53
|
-
return _regeneratorRuntime.wrap(function
|
|
50
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
54
51
|
while (1) switch (_context.prev = _context.next) {
|
|
55
52
|
case 0:
|
|
56
53
|
// const url = await helper.fetchJson();
|
|
57
54
|
onGetCode = _this.props.onGetCode;
|
|
58
|
-
_context.next =
|
|
55
|
+
_context.next = 1;
|
|
59
56
|
return onGetCode && onGetCode();
|
|
60
|
-
case
|
|
57
|
+
case 1:
|
|
61
58
|
if (!_context.sent) {
|
|
62
|
-
_context.next =
|
|
59
|
+
_context.next = 2;
|
|
63
60
|
break;
|
|
64
61
|
}
|
|
65
62
|
_this.setState({
|
|
66
63
|
time: _this.props.time || 60
|
|
67
64
|
});
|
|
68
|
-
that =
|
|
65
|
+
that = _this;
|
|
69
66
|
s = _setInterval(function () {
|
|
70
67
|
that.setState({
|
|
71
68
|
time: that.state.time -= 1
|
|
@@ -74,15 +71,15 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
74
71
|
clearInterval(s);
|
|
75
72
|
}
|
|
76
73
|
}, 1000);
|
|
77
|
-
case
|
|
74
|
+
case 2:
|
|
78
75
|
;
|
|
79
|
-
case
|
|
76
|
+
case 3:
|
|
80
77
|
case "end":
|
|
81
78
|
return _context.stop();
|
|
82
79
|
}
|
|
83
80
|
}, _callee);
|
|
84
81
|
})));
|
|
85
|
-
_defineProperty(
|
|
82
|
+
_defineProperty(_this, "btnProps", function (props) {
|
|
86
83
|
var btnProps = _Object$assign(helper.getObjectExclude(props, ['onGetCode']));
|
|
87
84
|
return _objectSpread(_objectSpread({}, btnProps), {}, {
|
|
88
85
|
size: 'large',
|
|
@@ -90,7 +87,7 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
90
87
|
onClick: _this.onGetCode
|
|
91
88
|
});
|
|
92
89
|
});
|
|
93
|
-
_defineProperty(
|
|
90
|
+
_defineProperty(_this, "inputProps", function (props) {
|
|
94
91
|
var inpPros = _Object$assign(helper.getObjectExclude(props, ['onGetCode', 'value']));
|
|
95
92
|
return _objectSpread(_objectSpread({}, inpPros), {}, {
|
|
96
93
|
size: 'large',
|
|
@@ -103,7 +100,8 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
103
100
|
};
|
|
104
101
|
return _this;
|
|
105
102
|
}
|
|
106
|
-
|
|
103
|
+
_inherits(CodeInput, _React$Component);
|
|
104
|
+
return _createClass(CodeInput, [{
|
|
107
105
|
key: "render",
|
|
108
106
|
value: function render() {
|
|
109
107
|
var _this$props = this.props,
|
|
@@ -118,6 +116,5 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
118
116
|
}, /*#__PURE__*/React.createElement(_Input, this.inputProps(this.props)), /*#__PURE__*/React.createElement(_Button, this.btnProps(this.props), time === 0 ? "\u83B7\u53D6\u9A8C\u8BC1\u7801" : "".concat(time, "s\u83B7\u53D6\u9A8C\u8BC1\u7801")));
|
|
119
117
|
}
|
|
120
118
|
}]);
|
|
121
|
-
return CodeInput;
|
|
122
119
|
}(React.Component);
|
|
123
120
|
export default CodeInput;
|
package/es/Enhance/Dialogs.js
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
2
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
9
8
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
10
9
|
import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
|
|
11
|
-
function
|
|
12
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
12
|
import React from 'react';
|
|
14
13
|
import { getObjectExclude } from '../helper';
|
|
15
14
|
var Enhance = function Enhance(Container, keys, Dialogs) {
|
|
16
15
|
var noContainer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
17
16
|
return /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
|
|
19
|
-
var _super = _createSuper(_class2);
|
|
20
|
-
function _class2() {
|
|
17
|
+
function _class() {
|
|
21
18
|
var _context;
|
|
22
19
|
var _this;
|
|
23
|
-
_classCallCheck(this,
|
|
20
|
+
_classCallCheck(this, _class);
|
|
24
21
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25
22
|
args[_key] = arguments[_key];
|
|
26
23
|
}
|
|
27
|
-
_this =
|
|
28
|
-
_defineProperty(
|
|
24
|
+
_this = _callSuper(this, _class, _concatInstanceProperty(_context = []).call(_context, args));
|
|
25
|
+
_defineProperty(_this, "toDialogs", function () {
|
|
29
26
|
return _reduceInstanceProperty(keys).call(keys, function (result, key, index) {
|
|
30
27
|
var Dialog = Dialogs[index];
|
|
31
|
-
_this.props[key] && result.push(
|
|
28
|
+
_this.props[key] && result.push(/*#__PURE__*/React.createElement(Dialog, {
|
|
32
29
|
key: key,
|
|
33
|
-
container:
|
|
30
|
+
container: _this
|
|
34
31
|
}));
|
|
35
32
|
return result;
|
|
36
33
|
}, []);
|
|
37
34
|
});
|
|
38
35
|
return _this;
|
|
39
36
|
}
|
|
40
|
-
|
|
37
|
+
_inherits(_class, _React$Component);
|
|
38
|
+
return _createClass(_class, [{
|
|
41
39
|
key: "render",
|
|
42
40
|
value: function render() {
|
|
43
41
|
var props = getObjectExclude(this.props, keys);
|
|
@@ -46,7 +44,6 @@ var Enhance = function Enhance(Container, keys, Dialogs) {
|
|
|
46
44
|
}, /*#__PURE__*/React.createElement(Container, props), this.toDialogs());
|
|
47
45
|
}
|
|
48
46
|
}]);
|
|
49
|
-
return _class2;
|
|
50
47
|
}(React.Component);
|
|
51
48
|
};
|
|
52
49
|
export default Enhance;
|
package/es/Enhance/Loading.js
CHANGED
|
@@ -9,16 +9,15 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
|
|
|
9
9
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
10
10
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
11
11
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
12
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
13
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
14
12
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
15
13
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
14
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
15
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
17
16
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
18
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
20
|
-
function
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
19
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
21
|
import React from 'react';
|
|
23
22
|
import PropTypes from 'prop-types';
|
|
24
23
|
import Loading from '../Loading';
|
|
@@ -40,19 +39,17 @@ var STATUS = ['loadingWithInit',
|
|
|
40
39
|
* onRefreshForHome:[可选],检测到来至首页时会触发该事件,原型为func()
|
|
41
40
|
*/
|
|
42
41
|
var Enhance = function Enhance(Component) {
|
|
43
|
-
var
|
|
44
|
-
return
|
|
45
|
-
|
|
46
|
-
var _super = _createSuper(_class);
|
|
47
|
-
function _class() {
|
|
42
|
+
var _Class;
|
|
43
|
+
return _Class = /*#__PURE__*/function (_React$Component) {
|
|
44
|
+
function _Class() {
|
|
48
45
|
var _context;
|
|
49
46
|
var _this;
|
|
50
|
-
_classCallCheck(this,
|
|
47
|
+
_classCallCheck(this, _Class);
|
|
51
48
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
49
|
args[_key] = arguments[_key];
|
|
53
50
|
}
|
|
54
|
-
_this =
|
|
55
|
-
_defineProperty(
|
|
51
|
+
_this = _callSuper(this, _Class, _concatInstanceProperty(_context = []).call(_context, args));
|
|
52
|
+
_defineProperty(_this, "triggerEvent", function () {
|
|
56
53
|
if (!global.isServer) {
|
|
57
54
|
var _this$props = _this.props,
|
|
58
55
|
_this$props$status = _this$props.status,
|
|
@@ -79,13 +76,13 @@ var Enhance = function Enhance(Component) {
|
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
});
|
|
82
|
-
_defineProperty(
|
|
79
|
+
_defineProperty(_this, "onRetry", function () {
|
|
83
80
|
var _this$props2 = _this.props,
|
|
84
81
|
status = _this$props2.status,
|
|
85
82
|
onInit = _this$props2.onInit;
|
|
86
83
|
onInit && onInit(status === 'retryForHome');
|
|
87
84
|
});
|
|
88
|
-
_defineProperty(
|
|
85
|
+
_defineProperty(_this, "getPageProps", function () {
|
|
89
86
|
var props = _objectSpread({}, _this.props);
|
|
90
87
|
delete props.status;
|
|
91
88
|
delete props.home;
|
|
@@ -95,7 +92,8 @@ var Enhance = function Enhance(Component) {
|
|
|
95
92
|
});
|
|
96
93
|
return _this;
|
|
97
94
|
}
|
|
98
|
-
|
|
95
|
+
_inherits(_Class, _React$Component);
|
|
96
|
+
return _createClass(_Class, [{
|
|
99
97
|
key: "componentDidMount",
|
|
100
98
|
value: function componentDidMount() {
|
|
101
99
|
this.triggerEvent();
|
|
@@ -120,12 +118,11 @@ var Enhance = function Enhance(Component) {
|
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
}]);
|
|
123
|
-
|
|
124
|
-
}(React.Component), _defineProperty(_class, "propTypes", {
|
|
121
|
+
}(React.Component), _defineProperty(_Class, "propTypes", {
|
|
125
122
|
status: PropTypes.oneOf(STATUS),
|
|
126
123
|
home: PropTypes.bool,
|
|
127
124
|
onInit: PropTypes.func,
|
|
128
125
|
onRefreshForHome: PropTypes.func
|
|
129
|
-
}),
|
|
126
|
+
}), _Class;
|
|
130
127
|
};
|
|
131
128
|
export default Enhance;
|
package/es/Header/Header.js
CHANGED
|
@@ -11,16 +11,15 @@ import _Dropdown from "antd/es/dropdown";
|
|
|
11
11
|
import _Badge from "antd/es/badge";
|
|
12
12
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
13
13
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
14
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
15
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
16
14
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
17
15
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
16
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
18
17
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
19
18
|
import _Menu from "antd/es/menu";
|
|
20
19
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
|
-
function
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
import React from 'react';
|
|
25
24
|
import Link from '../Link';
|
|
26
25
|
import SuperIcon from '../SuperIcon';
|
|
@@ -29,13 +28,11 @@ import Vertical from './Vertical';
|
|
|
29
28
|
import variables from '../variables';
|
|
30
29
|
var MenuItem = _Menu.Item;
|
|
31
30
|
var Header = /*#__PURE__*/function (_React$Component) {
|
|
32
|
-
_inherits(Header, _React$Component);
|
|
33
|
-
var _super = _createSuper(Header);
|
|
34
31
|
function Header(_props) {
|
|
35
32
|
var _this;
|
|
36
33
|
_classCallCheck(this, Header);
|
|
37
|
-
_this =
|
|
38
|
-
_defineProperty(
|
|
34
|
+
_this = _callSuper(this, Header, [_props]);
|
|
35
|
+
_defineProperty(_this, "toLogo", function () {
|
|
39
36
|
var img = _this.props.logoImg || '/logo.png';
|
|
40
37
|
var props = _this.getLinkProps('home', _this.state['main'] || _this.props.homeUrl || '/', {
|
|
41
38
|
role: 'logo'
|
|
@@ -45,7 +42,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
45
42
|
alt: "logo"
|
|
46
43
|
}));
|
|
47
44
|
});
|
|
48
|
-
_defineProperty(
|
|
45
|
+
_defineProperty(_this, "toIcon", function (type) {
|
|
49
46
|
var style = {
|
|
50
47
|
fontSize: 18,
|
|
51
48
|
verticalAlign: 'middle'
|
|
@@ -55,7 +52,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
55
52
|
style: style
|
|
56
53
|
});
|
|
57
54
|
});
|
|
58
|
-
_defineProperty(
|
|
55
|
+
_defineProperty(_this, "getLinkProps", function (key, url) {
|
|
59
56
|
var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
60
57
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
61
58
|
to: url,
|
|
@@ -63,7 +60,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
63
60
|
'data-active': _this.props.selectKey === key ? 'true' : null
|
|
64
61
|
});
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "toSetting", function (settingUrl) {
|
|
67
64
|
if (settingUrl) {
|
|
68
65
|
var props = _this.getLinkProps('setting', _this.state['setting'] || settingUrl);
|
|
69
66
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('pld-setting'));
|
|
@@ -71,7 +68,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
71
68
|
return null;
|
|
72
69
|
}
|
|
73
70
|
});
|
|
74
|
-
_defineProperty(
|
|
71
|
+
_defineProperty(_this, "toMessage", function (messageUrl) {
|
|
75
72
|
var count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
76
73
|
if (messageUrl) {
|
|
77
74
|
var props = _this.getLinkProps('message', _this.state['message'] || messageUrl);
|
|
@@ -87,12 +84,12 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
87
84
|
return null;
|
|
88
85
|
}
|
|
89
86
|
});
|
|
90
|
-
_defineProperty(
|
|
87
|
+
_defineProperty(_this, "onMenuItemClick", function (_ref) {
|
|
91
88
|
var key = _ref.key;
|
|
92
89
|
var onMenuClick = _this.props.onMenuClick;
|
|
93
90
|
onMenuClick && onMenuClick(key);
|
|
94
91
|
});
|
|
95
|
-
_defineProperty(
|
|
92
|
+
_defineProperty(_this, "menu", function (hasImport) {
|
|
96
93
|
return /*#__PURE__*/React.createElement(_Menu, {
|
|
97
94
|
className: variables('Header').menu,
|
|
98
95
|
onClick: _this.onMenuItemClick
|
|
@@ -104,7 +101,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
104
101
|
key: "modify"
|
|
105
102
|
}, "\u4FEE\u6539\u5BC6\u7801"));
|
|
106
103
|
});
|
|
107
|
-
_defineProperty(
|
|
104
|
+
_defineProperty(_this, "avatar", function (hasImport) {
|
|
108
105
|
return /*#__PURE__*/React.createElement(_Dropdown, {
|
|
109
106
|
placement: "bottomRight",
|
|
110
107
|
overlay: _this.menu(hasImport)
|
|
@@ -115,13 +112,13 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
115
112
|
}
|
|
116
113
|
}, _this.toIcon(_this.props.userIcon)));
|
|
117
114
|
});
|
|
118
|
-
_defineProperty(
|
|
115
|
+
_defineProperty(_this, "toPerson", function () {
|
|
119
116
|
var hasImport = _this.props.hasImport || true;
|
|
120
117
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
118
|
role: "person"
|
|
122
119
|
}, /*#__PURE__*/React.createElement("div", null), _this.avatar(hasImport), /*#__PURE__*/React.createElement("span", null, _this.props.userName));
|
|
123
120
|
});
|
|
124
|
-
_defineProperty(
|
|
121
|
+
_defineProperty(_this, "toLogout", function () {
|
|
125
122
|
var props = {
|
|
126
123
|
to: _this.props.loginUrl,
|
|
127
124
|
'data-role': 'block',
|
|
@@ -129,7 +126,7 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
129
126
|
};
|
|
130
127
|
return /*#__PURE__*/React.createElement(Link, props, _this.toIcon('logout'), /*#__PURE__*/React.createElement("span", null, "\u9000\u51FA"));
|
|
131
128
|
});
|
|
132
|
-
_defineProperty(
|
|
129
|
+
_defineProperty(_this, "toTail", function () {
|
|
133
130
|
var _this$props = _this.props,
|
|
134
131
|
settingUrl = _this$props.settingUrl,
|
|
135
132
|
messageUrl = _this$props.messageUrl,
|
|
@@ -141,7 +138,8 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
141
138
|
}
|
|
142
139
|
return _this;
|
|
143
140
|
}
|
|
144
|
-
|
|
141
|
+
_inherits(Header, _React$Component);
|
|
142
|
+
return _createClass(Header, [{
|
|
145
143
|
key: "componentWillReceiveProps",
|
|
146
144
|
value: function componentWillReceiveProps(props) {
|
|
147
145
|
if (props.selectUrl) {
|
|
@@ -156,7 +154,6 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
|
156
154
|
}, this.toLogo(), this.toTail());
|
|
157
155
|
}
|
|
158
156
|
}]);
|
|
159
|
-
return Header;
|
|
160
157
|
}(React.Component);
|
|
161
158
|
_defineProperty(Header, "Vertical", Vertical);
|
|
162
159
|
export default Header;
|
package/es/Header/Vertical.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
2
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
9
8
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
10
9
|
import _setTimeout from "@babel/runtime-corejs3/core-js-stable/set-timeout";
|
|
11
10
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
12
11
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
13
|
-
function
|
|
14
|
-
function _isNativeReflectConstruct() {
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
14
|
import React from 'react';
|
|
16
15
|
import PropTypes from 'prop-types';
|
|
17
16
|
import Link from '../Link';
|
|
@@ -29,8 +28,6 @@ var ITEM_TYPE = {
|
|
|
29
28
|
* url:url优先级高于item中的href
|
|
30
29
|
*/
|
|
31
30
|
var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
32
|
-
_inherits(Vertical, _React$Component);
|
|
33
|
-
var _super = _createSuper(Vertical);
|
|
34
31
|
function Vertical() {
|
|
35
32
|
var _context;
|
|
36
33
|
var _this;
|
|
@@ -38,17 +35,17 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
38
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
36
|
args[_key] = arguments[_key];
|
|
40
37
|
}
|
|
41
|
-
_this =
|
|
42
|
-
_defineProperty(
|
|
38
|
+
_this = _callSuper(this, Vertical, _concatInstanceProperty(_context = []).call(_context, args));
|
|
39
|
+
_defineProperty(_this, "state", {
|
|
43
40
|
id: ''
|
|
44
41
|
});
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(_this, "isSelect", function (item) {
|
|
46
43
|
return item.key === _this.props.selectKey;
|
|
47
44
|
});
|
|
48
|
-
_defineProperty(
|
|
45
|
+
_defineProperty(_this, "getUrl", function (item) {
|
|
49
46
|
return _this.props.url[item.key] || item.href;
|
|
50
47
|
});
|
|
51
|
-
_defineProperty(
|
|
48
|
+
_defineProperty(_this, "onClick", function (selectKey) {
|
|
52
49
|
_this.props.onSelectKey && _this.props.onSelectKey(selectKey);
|
|
53
50
|
if (_this.state.id) {
|
|
54
51
|
clearTimeout(_this.state.id);
|
|
@@ -61,7 +58,7 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
61
58
|
}, 500)
|
|
62
59
|
});
|
|
63
60
|
});
|
|
64
|
-
_defineProperty(
|
|
61
|
+
_defineProperty(_this, "toItem", function (item) {
|
|
65
62
|
if (!item.jumpOut) {
|
|
66
63
|
var _context2;
|
|
67
64
|
return /*#__PURE__*/React.createElement(Link, {
|
|
@@ -85,7 +82,8 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
85
82
|
});
|
|
86
83
|
return _this;
|
|
87
84
|
}
|
|
88
|
-
|
|
85
|
+
_inherits(Vertical, _React$Component);
|
|
86
|
+
return _createClass(Vertical, [{
|
|
89
87
|
key: "render",
|
|
90
88
|
value: function render() {
|
|
91
89
|
var _context3;
|
|
@@ -95,7 +93,6 @@ var Vertical = /*#__PURE__*/function (_React$Component) {
|
|
|
95
93
|
}, _mapInstanceProperty(_context3 = this.props.items).call(_context3, this.toItem));
|
|
96
94
|
}
|
|
97
95
|
}]);
|
|
98
|
-
return Vertical;
|
|
99
96
|
}(React.Component);
|
|
100
97
|
_defineProperty(Vertical, "propTypes", {
|
|
101
98
|
selectKey: PropTypes.string,
|
|
@@ -2,30 +2,27 @@ import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/co
|
|
|
2
2
|
import _Empty from "antd/es/empty";
|
|
3
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
7
5
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
8
6
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
8
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
9
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
11
|
-
function
|
|
12
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
12
|
import React from 'react';
|
|
14
13
|
import { ModalWithDrag, Title } from '../index';
|
|
15
14
|
import variables from '../variables';
|
|
16
15
|
var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
17
|
-
_inherits(ImageView, _React$Component);
|
|
18
|
-
var _super = _createSuper(ImageView);
|
|
19
16
|
function ImageView(_props) {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, ImageView);
|
|
22
|
-
_this =
|
|
23
|
-
_defineProperty(
|
|
19
|
+
_this = _callSuper(this, ImageView, [_props]);
|
|
20
|
+
_defineProperty(_this, "ClosePreview", function () {
|
|
24
21
|
_this.setState({
|
|
25
22
|
previewVisible: false
|
|
26
23
|
});
|
|
27
24
|
});
|
|
28
|
-
_defineProperty(
|
|
25
|
+
_defineProperty(_this, "showBigImg", function () {
|
|
29
26
|
var imgList = _this.props.imgList;
|
|
30
27
|
var _this$state = _this.state,
|
|
31
28
|
previewVisible = _this$state.previewVisible,
|
|
@@ -46,14 +43,14 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
46
43
|
src: imgList[index].fileUrl
|
|
47
44
|
}));
|
|
48
45
|
});
|
|
49
|
-
_defineProperty(
|
|
46
|
+
_defineProperty(_this, "toSeeImg", function (e) {
|
|
50
47
|
if (_this.props.toSeeImg) {
|
|
51
48
|
_this.props.toSeeImg(e);
|
|
52
49
|
} else {
|
|
53
50
|
_this.myClick(e.index);
|
|
54
51
|
}
|
|
55
52
|
});
|
|
56
|
-
_defineProperty(
|
|
53
|
+
_defineProperty(_this, "myClick", function (index) {
|
|
57
54
|
_this.setState({
|
|
58
55
|
previewVisible: true,
|
|
59
56
|
index: index
|
|
@@ -65,7 +62,8 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
65
62
|
};
|
|
66
63
|
return _this;
|
|
67
64
|
}
|
|
68
|
-
|
|
65
|
+
_inherits(ImageView, _React$Component);
|
|
66
|
+
return _createClass(ImageView, [{
|
|
69
67
|
key: "render",
|
|
70
68
|
value: function render() {
|
|
71
69
|
var _this2 = this;
|
|
@@ -95,6 +93,5 @@ var ImageView = /*#__PURE__*/function (_React$Component) {
|
|
|
95
93
|
}), toSeeImg ? null : this.showBigImg());
|
|
96
94
|
}
|
|
97
95
|
}]);
|
|
98
|
-
return ImageView;
|
|
99
96
|
}(React.Component);
|
|
100
97
|
export default ImageView;
|