@lingxiteam/assets 0.11.30-alpha.1 → 0.11.30-alpha.3
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/IconSvg/index.js +7 -13
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +9 -16
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.less +50 -25
- package/es/error/errorDisplay/Mobile/Drawer/index.js +17 -45
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +63 -48
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +7 -7
- package/es/error/errorDisplay/Mobile/Modal/Modal.less +21 -18
- package/es/error/errorDisplay/Mobile/Modal/index.js +18 -44
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +49 -84
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +15 -1
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +18 -72
- package/es/error/errorDisplay/Web/Drawer/index.js +19 -40
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +154 -119
- package/es/error/errorDisplay/Web/Notification/Notice.js +96 -39
- package/es/error/errorDisplay/Web/Notification/Notification.js +12 -49
- package/es/error/errorDisplay/Web/Notification/Notification.less +32 -3
- package/es/error/errorDisplay/Web/Notification/index.js +8 -22
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/animation.less +10 -0
- package/es/error/errorDisplay/compUtils.js +0 -4
- package/es/error/errorDisplay/const.js +31 -1
- package/es/error/errorDisplay/http.js +10 -27
- package/es/error/errorDisplay/variables.less +1 -0
- package/es/security/encipher/aes.js +2 -4
- package/es/security/encipher/des.js +0 -2
- package/es/security/encipher/rsa.js +0 -2
- package/es/security/encipher/sign.js +25 -48
- package/es/security/fetch.js +41 -86
- package/es/security/httpEncryption.js +13 -22
- package/es/utils/url.js +4 -11
- package/lib/index.js +0 -5
- package/package.json +1 -1
package/es/IconSvg/index.js
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _excluded = ["style", "src"];
|
|
2
|
-
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
|
|
11
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
-
|
|
13
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
11
|
import { getSvgImageBase64 } from '../utils/img';
|
|
15
|
-
|
|
16
12
|
var IconSvg = function IconSvg(props) {
|
|
17
13
|
var _props$style = props.style,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
15
|
+
src = props.src,
|
|
16
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
22
17
|
return _jsx("i", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
23
18
|
style: _objectSpread(_objectSpread({}, restProps), {}, {
|
|
24
19
|
backgroundImage: getSvgImageBase64(src)
|
|
25
20
|
})
|
|
26
21
|
}));
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
export default IconSvg;
|
|
@@ -3,24 +3,21 @@ import classnames from 'classnames';
|
|
|
3
3
|
import { BackIcon } from '../../SVGstring';
|
|
4
4
|
import { getSvgImageBase64 } from '../../../../utils/img';
|
|
5
5
|
import './Drawer.less';
|
|
6
|
-
|
|
7
6
|
var isDomEle = function isDomEle(target) {
|
|
8
7
|
return typeof target === 'string' || /*#__PURE__*/isValidElement(target);
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
var emptyTxt = '暂无匹配信息,请联系平台管理员';
|
|
12
10
|
var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13
11
|
var visible = props.visible,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
title = props.title,
|
|
13
|
+
tabs = props.tabs,
|
|
14
|
+
activeTabsKey = props.activeTabsKey,
|
|
15
|
+
onTabsChange = props.onTabsChange,
|
|
16
|
+
dataSource = props.dataSource,
|
|
17
|
+
onCancel = props.onCancel,
|
|
18
|
+
onClickRecord = props.onClickRecord,
|
|
19
|
+
_props$mode = props.mode,
|
|
20
|
+
mode = _props$mode === void 0 ? 'content' : _props$mode;
|
|
24
21
|
var renderItems = function renderItems() {
|
|
25
22
|
if (Array.isArray(dataSource) && dataSource.length > 0) {
|
|
26
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -43,12 +40,10 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
43
40
|
}, (item === null || item === void 0 ? void 0 : item.content) || ''));
|
|
44
41
|
}));
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
44
|
className: "lxm-drawer-empty"
|
|
49
45
|
}, "\u6682\u65E0\u6570\u636E");
|
|
50
46
|
};
|
|
51
|
-
|
|
52
47
|
var renderContent = function renderContent() {
|
|
53
48
|
if (dataSource && ((dataSource === null || dataSource === void 0 ? void 0 : dataSource.title) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.author) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.content))) {
|
|
54
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -68,12 +63,10 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
68
63
|
}
|
|
69
64
|
})));
|
|
70
65
|
}
|
|
71
|
-
|
|
72
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
73
67
|
className: "lxm-drawer-empty"
|
|
74
68
|
}, emptyTxt);
|
|
75
69
|
};
|
|
76
|
-
|
|
77
70
|
return visible ? /*#__PURE__*/React.createElement("div", {
|
|
78
71
|
ref: ref,
|
|
79
72
|
className: "lxm-drawer-wraper"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import url('../../animation.less');
|
|
2
|
+
@import url('../../variables.less');
|
|
2
3
|
|
|
3
4
|
.lxm-drawer {
|
|
4
5
|
&-wraper {
|
|
@@ -29,26 +30,26 @@
|
|
|
29
30
|
&-header {
|
|
30
31
|
display: flex;
|
|
31
32
|
align-items: center;
|
|
32
|
-
height:
|
|
33
|
+
height: 44 * @hd;
|
|
33
34
|
background-color: #f6f8fa;
|
|
34
35
|
|
|
35
36
|
&-close {
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
37
|
+
width: 24 * @hd;
|
|
38
|
+
height: 24 * @hd;
|
|
38
39
|
display: inline-block;
|
|
39
40
|
vertical-align: middle;
|
|
40
41
|
cursor: pointer;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
&-extend {
|
|
44
|
-
width:
|
|
45
|
-
padding: 0
|
|
45
|
+
width: 80 * @hd;
|
|
46
|
+
padding: 0 20* @hd;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
&-title {
|
|
49
50
|
flex: 1;
|
|
50
51
|
text-align: center;
|
|
51
|
-
font-size:
|
|
52
|
+
font-size: 18* @hd;
|
|
52
53
|
font-weight: 500;
|
|
53
54
|
color: #1c242e;
|
|
54
55
|
white-space: nowrap;
|
|
@@ -58,13 +59,13 @@
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
&-tabs {
|
|
61
|
-
padding:
|
|
62
|
+
padding: 8* @hd 20* @hd;
|
|
62
63
|
background-color: #f6f8fa;
|
|
63
64
|
|
|
64
65
|
&-row {
|
|
65
66
|
background: #f0f0f0;
|
|
66
|
-
border-radius:
|
|
67
|
-
padding:
|
|
67
|
+
border-radius: 8* @hd;
|
|
68
|
+
padding: 4* @hd;
|
|
68
69
|
display: flex;
|
|
69
70
|
align-items: center;
|
|
70
71
|
}
|
|
@@ -72,17 +73,17 @@
|
|
|
72
73
|
&-row &-btn {
|
|
73
74
|
color: #1c242e;
|
|
74
75
|
text-align: center;
|
|
75
|
-
padding:
|
|
76
|
-
font-size:
|
|
76
|
+
padding: 4* @hd;
|
|
77
|
+
font-size: 14* @hd;
|
|
77
78
|
flex: 1;
|
|
78
|
-
border-radius:
|
|
79
|
+
border-radius: 8* @hd;
|
|
79
80
|
cursor: pointer;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
&-row &-btn.active {
|
|
83
84
|
background-color: #fff;
|
|
84
85
|
font-weight: 500;
|
|
85
|
-
box-shadow: 0
|
|
86
|
+
box-shadow: 0 1* @hd 6* @hd -4* @hd rgba(28, 36, 46, 0.15);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
|
|
@@ -94,34 +95,58 @@
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
&-content {
|
|
97
|
-
padding:
|
|
98
|
+
padding: 20* @hd;
|
|
98
99
|
|
|
99
100
|
&-head {
|
|
100
|
-
margin-bottom:
|
|
101
|
+
margin-bottom: 20* @hd;
|
|
101
102
|
|
|
102
103
|
&-title {
|
|
103
|
-
font-size:
|
|
104
|
+
font-size: 21* @hd;
|
|
104
105
|
font-weight: 500;
|
|
105
106
|
color: #1c242e;
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
&-author {
|
|
109
|
-
font-size:
|
|
110
|
+
font-size: 13* @hd;
|
|
110
111
|
color: rgba(28, 36, 46, 0.45);;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
&-body {
|
|
115
|
-
font-size:
|
|
116
|
+
font-size: 15* @hd;
|
|
116
117
|
color: rgba(28, 36, 46, 0.75);
|
|
118
|
+
|
|
119
|
+
// 内置文章样式
|
|
120
|
+
dt {
|
|
121
|
+
font-size: 17* @hd;
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
margin-top: 30* @hd;
|
|
124
|
+
}
|
|
125
|
+
dd {
|
|
126
|
+
padding: 8* @hd 0;
|
|
127
|
+
margin: 0;
|
|
128
|
+
font-size: 15* @hd;
|
|
129
|
+
}
|
|
130
|
+
ol, ul {
|
|
131
|
+
padding: 0;
|
|
132
|
+
margin: 0;
|
|
133
|
+
}
|
|
134
|
+
ol, ul {
|
|
135
|
+
list-style: inside inside;
|
|
136
|
+
}
|
|
137
|
+
li, p {
|
|
138
|
+
line-height: 24* @hd;
|
|
139
|
+
letter-spacing: 1px;
|
|
140
|
+
margin: 4* @hd 0;
|
|
141
|
+
}
|
|
117
142
|
}
|
|
118
143
|
}
|
|
119
144
|
|
|
120
145
|
&-list {
|
|
121
|
-
padding: 0
|
|
146
|
+
padding: 0 20* @hd;
|
|
122
147
|
|
|
123
148
|
&-item {
|
|
124
|
-
padding:
|
|
149
|
+
padding: 8* @hd 0;
|
|
125
150
|
border-bottom: 1px solid #f0f0f0;
|
|
126
151
|
|
|
127
152
|
&.purple &-dt {
|
|
@@ -147,29 +172,29 @@
|
|
|
147
172
|
|
|
148
173
|
&-title {
|
|
149
174
|
flex: 1;
|
|
150
|
-
font-size:
|
|
175
|
+
font-size: 14* @hd;
|
|
151
176
|
font-weight: 500;
|
|
152
177
|
}
|
|
153
178
|
|
|
154
179
|
&-extra {
|
|
155
|
-
font-size:
|
|
180
|
+
font-size: 12* @hd;
|
|
156
181
|
color: rgba(28, 36, 46, 0.45);
|
|
157
182
|
}
|
|
158
183
|
|
|
159
184
|
&-title + &-extra {
|
|
160
|
-
margin-left:
|
|
185
|
+
margin-left: 8* @hd;
|
|
161
186
|
}
|
|
162
187
|
}
|
|
163
188
|
|
|
164
189
|
&-dd {
|
|
165
|
-
font-size:
|
|
190
|
+
font-size: 12* @hd;
|
|
166
191
|
color: rgba(28, 36, 46, 0.75);
|
|
167
192
|
}
|
|
168
193
|
}
|
|
169
194
|
}
|
|
170
195
|
|
|
171
196
|
&-empty {
|
|
172
|
-
padding:
|
|
197
|
+
padding: 20* @hd;
|
|
173
198
|
text-align: center;
|
|
174
199
|
color: rgba(28, 36, 46, 0.45);
|
|
175
200
|
}
|
|
@@ -1,51 +1,41 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _excluded = ["getContainer"],
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
_excluded2 = ["close", "onTabsChange", "visible", "getContainer"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
-
|
|
6
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
-
|
|
14
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
-
|
|
16
12
|
import React from 'react';
|
|
17
13
|
import { createPortal, render, unmountComponentAtNode } from 'react-dom';
|
|
18
14
|
import { getChildren } from '../../compUtils';
|
|
19
15
|
import Drawer from './Drawer';
|
|
20
|
-
|
|
21
16
|
var DrawerWraper = function DrawerWraper(props) {
|
|
22
17
|
var _props$getContainer = props.getContainer,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
getContainer = _props$getContainer === void 0 ? function () {
|
|
19
|
+
return document.body;
|
|
20
|
+
} : _props$getContainer,
|
|
21
|
+
config = _objectWithoutProperties(props, _excluded);
|
|
28
22
|
var root = getContainer() || document.body;
|
|
29
23
|
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Drawer, config), root);
|
|
30
24
|
};
|
|
31
|
-
|
|
32
25
|
var LxMobileDrawerNodes = {};
|
|
33
26
|
var nbr = 0;
|
|
34
27
|
var closeTimer;
|
|
35
|
-
|
|
36
28
|
function open() {
|
|
37
29
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38
|
-
|
|
39
30
|
var close = props.close,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
_onTabsChange = props.onTabsChange,
|
|
32
|
+
_props$visible = props.visible,
|
|
33
|
+
visible = _props$visible === void 0 ? true : _props$visible,
|
|
34
|
+
_props$getContainer2 = props.getContainer,
|
|
35
|
+
getContainer = _props$getContainer2 === void 0 ? function () {
|
|
36
|
+
return document.body;
|
|
37
|
+
} : _props$getContainer2,
|
|
38
|
+
config = _objectWithoutProperties(props, _excluded2);
|
|
49
39
|
var createDrawer = function createDrawer() {
|
|
50
40
|
var key = "lxm-drawer-".concat(nbr);
|
|
51
41
|
var root = getContainer() || document.body;
|
|
@@ -53,22 +43,18 @@ function open() {
|
|
|
53
43
|
var div = rootChild.find(function (item) {
|
|
54
44
|
return item.getAttribute('lxm-drawer-key') === key;
|
|
55
45
|
});
|
|
56
|
-
|
|
57
46
|
if (!div) {
|
|
58
47
|
div = document.createElement('div');
|
|
59
48
|
div.setAttribute('lxm-drawer-key', key);
|
|
60
49
|
root.appendChild(div);
|
|
61
50
|
}
|
|
62
|
-
|
|
63
51
|
var onCloseDrawer = function onCloseDrawer() {
|
|
64
52
|
if (LxMobileDrawerNodes[key]) {
|
|
65
53
|
var _LxMobileDrawerNodes$, _LxMobileDrawerNodes$2;
|
|
66
|
-
|
|
67
54
|
(_LxMobileDrawerNodes$ = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$ === void 0 ? void 0 : (_LxMobileDrawerNodes$2 = _LxMobileDrawerNodes$.nodeDiv) === null || _LxMobileDrawerNodes$2 === void 0 ? void 0 : _LxMobileDrawerNodes$2.classList.add('lxm-drawer-close-move');
|
|
68
55
|
clearTimeout(closeTimer);
|
|
69
56
|
closeTimer = setTimeout(function () {
|
|
70
57
|
var _LxMobileDrawerNodes$3, _LxMobileDrawerNodes$4, _LxMobileDrawerNodes$5;
|
|
71
|
-
|
|
72
58
|
unmountComponentAtNode((_LxMobileDrawerNodes$3 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$3 === void 0 ? void 0 : _LxMobileDrawerNodes$3.nodeDiv);
|
|
73
59
|
(_LxMobileDrawerNodes$4 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$4 === void 0 ? void 0 : (_LxMobileDrawerNodes$5 = _LxMobileDrawerNodes$4.nodeDiv) === null || _LxMobileDrawerNodes$5 === void 0 ? void 0 : _LxMobileDrawerNodes$5.remove();
|
|
74
60
|
delete LxMobileDrawerNodes[key];
|
|
@@ -76,7 +62,6 @@ function open() {
|
|
|
76
62
|
}, 300);
|
|
77
63
|
}
|
|
78
64
|
};
|
|
79
|
-
|
|
80
65
|
var renderNode = function renderNode() {
|
|
81
66
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
82
67
|
render( /*#__PURE__*/React.createElement(Drawer, _extends({
|
|
@@ -85,14 +70,12 @@ function open() {
|
|
|
85
70
|
if ((config === null || config === void 0 ? void 0 : config.onClose) instanceof Function) {
|
|
86
71
|
config === null || config === void 0 ? void 0 : config.onClose();
|
|
87
72
|
}
|
|
88
|
-
|
|
89
73
|
onCloseDrawer();
|
|
90
74
|
},
|
|
91
75
|
onOk: function onOk() {
|
|
92
76
|
if ((config === null || config === void 0 ? void 0 : config.onOk) instanceof Function) {
|
|
93
77
|
config === null || config === void 0 ? void 0 : config.onOk();
|
|
94
78
|
}
|
|
95
|
-
|
|
96
79
|
onCloseDrawer();
|
|
97
80
|
},
|
|
98
81
|
onTabsChange: function onTabsChange(record) {
|
|
@@ -101,7 +84,6 @@ function open() {
|
|
|
101
84
|
update: function update(prarms) {
|
|
102
85
|
if (LxMobileDrawerNodes[key]) {
|
|
103
86
|
var _LxMobileDrawerNodes$6;
|
|
104
|
-
|
|
105
87
|
(_LxMobileDrawerNodes$6 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$6 === void 0 ? void 0 : _LxMobileDrawerNodes$6.renderNode(_objectSpread(_objectSpread({}, config), prarms));
|
|
106
88
|
}
|
|
107
89
|
}
|
|
@@ -110,7 +92,6 @@ function open() {
|
|
|
110
92
|
}
|
|
111
93
|
}, args)), div);
|
|
112
94
|
};
|
|
113
|
-
|
|
114
95
|
renderNode(config);
|
|
115
96
|
LxMobileDrawerNodes[key] = {
|
|
116
97
|
root: root,
|
|
@@ -120,18 +101,14 @@ function open() {
|
|
|
120
101
|
nbr += 1;
|
|
121
102
|
return key;
|
|
122
103
|
};
|
|
123
|
-
|
|
124
104
|
var modalKey = createDrawer();
|
|
125
|
-
|
|
126
105
|
var onClose = function onClose() {
|
|
127
106
|
if (LxMobileDrawerNodes[modalKey]) {
|
|
128
107
|
var _LxMobileDrawerNodes$7, _LxMobileDrawerNodes$8;
|
|
129
|
-
|
|
130
108
|
(_LxMobileDrawerNodes$7 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$7 === void 0 ? void 0 : (_LxMobileDrawerNodes$8 = _LxMobileDrawerNodes$7.nodeDiv) === null || _LxMobileDrawerNodes$8 === void 0 ? void 0 : _LxMobileDrawerNodes$8.classList.add('lxm-drawer-close-move');
|
|
131
109
|
clearTimeout(closeTimer);
|
|
132
110
|
closeTimer = setTimeout(function () {
|
|
133
111
|
var _LxMobileDrawerNodes$9, _LxMobileDrawerNodes$10, _LxMobileDrawerNodes$11;
|
|
134
|
-
|
|
135
112
|
unmountComponentAtNode((_LxMobileDrawerNodes$9 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$9 === void 0 ? void 0 : _LxMobileDrawerNodes$9.nodeDiv);
|
|
136
113
|
(_LxMobileDrawerNodes$10 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$10 === void 0 ? void 0 : (_LxMobileDrawerNodes$11 = _LxMobileDrawerNodes$10.nodeDiv) === null || _LxMobileDrawerNodes$11 === void 0 ? void 0 : _LxMobileDrawerNodes$11.remove();
|
|
137
114
|
delete LxMobileDrawerNodes[modalKey];
|
|
@@ -139,22 +116,17 @@ function open() {
|
|
|
139
116
|
}, 300);
|
|
140
117
|
}
|
|
141
118
|
};
|
|
142
|
-
|
|
143
119
|
var onUpdate = function onUpdate() {
|
|
144
120
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
145
|
-
|
|
146
121
|
if (LxMobileDrawerNodes[modalKey]) {
|
|
147
122
|
var _LxMobileDrawerNodes$12;
|
|
148
|
-
|
|
149
123
|
(_LxMobileDrawerNodes$12 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$12 === void 0 ? void 0 : _LxMobileDrawerNodes$12.renderNode(_objectSpread(_objectSpread({}, config), args));
|
|
150
124
|
}
|
|
151
125
|
};
|
|
152
|
-
|
|
153
126
|
return {
|
|
154
127
|
onClose: onClose,
|
|
155
128
|
onUpdate: onUpdate
|
|
156
129
|
};
|
|
157
130
|
}
|
|
158
|
-
|
|
159
131
|
DrawerWraper.open = open;
|
|
160
132
|
export default DrawerWraper;
|