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