tntd 1.4.26 → 1.4.28
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/babel.config.js +20 -20
- package/dist/stats.json +90 -90
- package/es/ArrayInput/icon.js +3 -11
- package/es/ArrayInput/index.js +57 -67
- package/es/AuthContext.js +3 -13
- package/es/Columns/index.js +12 -24
- package/es/DevelopmentLogin/LoginModal.js +22 -29
- package/es/DevelopmentLogin/index.js +13 -29
- package/es/Ellipsis/Svg/CopySVG.js +2 -11
- package/es/Ellipsis/Svg/TickSVG.js +2 -11
- package/es/Ellipsis/index.js +25 -33
- package/es/Handle/index.js +29 -46
- package/es/Icon/fonts/iconfont.js +0 -2
- package/es/Icon/iconList.js +1 -8
- package/es/Icon/index.js +5 -25
- package/es/Img/Contain.js +8 -21
- package/es/Img/Cover.js +11 -29
- package/es/Img/index.js +8 -22
- package/es/Layout/ActionsContext.js +2 -12
- package/es/Layout/AppList.js +42 -58
- package/es/Layout/Application.js +24 -44
- package/es/Layout/Avatar.js +23 -45
- package/es/Layout/CompatibleLanguage.js +29 -51
- package/es/Layout/EnterpriseLayout/Avatar.js +32 -54
- package/es/Layout/EnterpriseLayout/Language.js +15 -39
- package/es/Layout/EnterpriseLayout/Theme.js +15 -31
- package/es/Layout/EnterpriseLayout/index.js +9 -24
- package/es/Layout/GlobalNavigation/NavigationPopup.js +29 -53
- package/es/Layout/GlobalNavigation/index.js +23 -51
- package/es/Layout/Header.js +19 -40
- package/es/Layout/HeaderActions.js +19 -43
- package/es/Layout/HeaderNavs.js +12 -35
- package/es/Layout/HeaderTabs.js +25 -50
- package/es/Layout/Iconfont.js +4 -16
- package/es/Layout/Language.js +14 -38
- package/es/Layout/Layout.js +32 -58
- package/es/Layout/Logo.js +12 -26
- package/es/Layout/OrgAppList.js +36 -52
- package/es/Layout/SideMenu.js +32 -57
- package/es/Layout/Theme.js +21 -39
- package/es/Layout/createActions.js +6 -19
- package/es/Layout/images/index.js +58 -95
- package/es/Layout/index.js +28 -70
- package/es/Layout/paaslayout/CompactSideMenu.js +17 -35
- package/es/Layout/paaslayout/Header.js +17 -31
- package/es/Layout/paaslayout/Logo.js +9 -19
- package/es/Layout/paaslayout/SideMenu.js +12 -29
- package/es/Layout/paaslayout/index.js +32 -58
- package/es/Layout/storage.js +21 -71
- package/es/LoadingButton/index.js +8 -17
- package/es/Modal/index.js +16 -29
- package/es/Page/Box.js +8 -18
- package/es/Page/index.js +29 -47
- package/es/Page/utils.js +1 -12
- package/es/QueryForm/Field/Checkbox.js +5 -13
- package/es/QueryForm/Field/Select.js +12 -28
- package/es/QueryForm/Field/SelectInput.js +18 -33
- package/es/QueryForm/Field/fieldsMap.js +23 -36
- package/es/QueryForm/Field/index.js +12 -25
- package/es/QueryForm/createActions.js +7 -20
- package/es/QueryForm/index.js +50 -66
- package/es/QueryForm/useForm.js +4 -16
- package/es/QueryListScene/List.js +30 -43
- package/es/QueryListScene/QueryForm.js +9 -21
- package/es/QueryListScene/QueryListScene.js +16 -29
- package/es/QueryListScene/Title.js +5 -17
- package/es/QueryListScene/Toolbar.js +4 -16
- package/es/QueryListScene/createActions.js +13 -26
- package/es/QueryListScene/index.js +19 -40
- package/es/QueryListScene/useActions.js +4 -16
- package/es/Select/DropDownWrap.js +6 -18
- package/es/Select/index.js +15 -28
- package/es/Table/ResizableTable/index.js +18 -32
- package/es/Table/index.js +11 -30
- package/es/Title/index.js +5 -18
- package/es/index.js +20 -193
- package/es/locale.js +8 -27
- package/es/utils/checkAuth.js +4 -15
- package/es/utils/findMenuInfoByPath.js +5 -16
- package/es/utils/index.js +10 -70
- package/lib/ArrayInput/index.js +28 -12
- package/lib/Columns/index.js +10 -4
- package/lib/DevelopmentLogin/LoginModal.js +23 -9
- package/lib/Ellipsis/index.js +10 -4
- package/lib/Handle/index.js +19 -9
- package/lib/Layout/AppList.js +30 -12
- package/lib/Layout/Application.js +5 -3
- package/lib/Layout/Avatar.js +12 -6
- package/lib/Layout/CompatibleLanguage.js +5 -3
- package/lib/Layout/EnterpriseLayout/Avatar.js +18 -8
- package/lib/Layout/EnterpriseLayout/Theme.js +5 -3
- package/lib/Layout/HeaderActions.js +7 -5
- package/lib/Layout/Layout.js +9 -7
- package/lib/Layout/OrgAppList.js +19 -7
- package/lib/Layout/SideMenu.js +9 -7
- package/lib/Layout/Theme.js +5 -3
- package/lib/Layout/paaslayout/index.js +10 -8
- package/lib/LoadingButton/index.js +6 -2
- package/lib/Modal/index.js +5 -3
- package/lib/Page/Box.js +5 -3
- package/lib/QueryForm/Field/Checkbox.js +6 -2
- package/lib/QueryForm/Field/Select.js +8 -4
- package/lib/QueryForm/Field/SelectInput.js +13 -5
- package/lib/QueryForm/Field/fieldsMap.js +18 -8
- package/lib/QueryForm/Field/index.js +7 -3
- package/lib/QueryForm/index.js +27 -13
- package/lib/QueryListScene/List.js +7 -5
- package/lib/Select/index.js +14 -8
- package/lib/Table/ResizableTable/index.js +5 -3
- package/lib/Table/index.js +7 -5
- package/package.json +1 -1
package/es/ArrayInput/index.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _antd = require("antd");
|
|
13
|
-
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
|
-
var _icon = require("./icon");
|
|
17
|
-
|
|
18
|
-
require("./index.less");
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
1
|
+
import "antd/lib/row/style";
|
|
2
|
+
import _Row from "antd/lib/row";
|
|
3
|
+
import "antd/lib/tooltip/style";
|
|
4
|
+
import _Tooltip from "antd/lib/tooltip";
|
|
5
|
+
import "antd/lib/col/style";
|
|
6
|
+
import _Col from "antd/lib/col";
|
|
7
|
+
import "antd/lib/table/style";
|
|
8
|
+
import _Table from "antd/lib/table";
|
|
23
9
|
|
|
24
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; }
|
|
25
11
|
|
|
@@ -47,13 +33,17 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
47
33
|
|
|
48
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
35
|
|
|
50
|
-
|
|
36
|
+
import React, { useEffect, useState, useCallback, isValidElement } from "react";
|
|
37
|
+
import { isFunction, isArray, sumBy, sum, set, get } from "lodash";
|
|
38
|
+
import { plusIcon, deleteIcon } from "./icon";
|
|
39
|
+
import "./index.less";
|
|
40
|
+
var Column = _Table.Column;
|
|
51
41
|
|
|
52
42
|
var getWidth = function getWidth(span) {
|
|
53
43
|
return 1000 / span;
|
|
54
44
|
};
|
|
55
45
|
|
|
56
|
-
function ArrayInput(_ref) {
|
|
46
|
+
export default function ArrayInput(_ref) {
|
|
57
47
|
var children = _ref.children,
|
|
58
48
|
defaultValue = _ref.defaultValue,
|
|
59
49
|
value = _ref.value,
|
|
@@ -71,20 +61,20 @@ function ArrayInput(_ref) {
|
|
|
71
61
|
_ref$addText = _ref.addText,
|
|
72
62
|
addText = _ref$addText === void 0 ? "添加" : _ref$addText;
|
|
73
63
|
|
|
74
|
-
if (!
|
|
64
|
+
if (!isFunction(children)) {
|
|
75
65
|
throw new Error("ArrayInput的children必须是函数");
|
|
76
66
|
}
|
|
77
67
|
|
|
78
|
-
var _useState =
|
|
68
|
+
var _useState = useState(value || defaultValue),
|
|
79
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
80
70
|
_value = _useState2[0],
|
|
81
71
|
setValue = _useState2[1];
|
|
82
72
|
|
|
83
|
-
|
|
73
|
+
useEffect(function () {
|
|
84
74
|
setValue(value);
|
|
85
75
|
}, [value]);
|
|
86
76
|
|
|
87
|
-
var _onChange =
|
|
77
|
+
var _onChange = useCallback(function (value) {
|
|
88
78
|
if (onChange) {
|
|
89
79
|
onChange(value);
|
|
90
80
|
} else {
|
|
@@ -121,22 +111,22 @@ function ArrayInput(_ref) {
|
|
|
121
111
|
};
|
|
122
112
|
|
|
123
113
|
if (mode === "list") {
|
|
124
|
-
return
|
|
114
|
+
return React.createElement("div", {
|
|
125
115
|
className: "tntd-array-input"
|
|
126
116
|
}, inValue.map(function (item, index) {
|
|
127
117
|
var fields = children(item, index);
|
|
128
118
|
|
|
129
|
-
if (!
|
|
130
|
-
fields =
|
|
119
|
+
if (!isArray(fields)) {
|
|
120
|
+
fields = get(fields, "props.children", []);
|
|
131
121
|
}
|
|
132
122
|
|
|
133
|
-
return
|
|
123
|
+
return React.createElement(_Row, {
|
|
134
124
|
gutter: gutter,
|
|
135
125
|
key: index,
|
|
136
126
|
className: "tntd-array-input-item"
|
|
137
127
|
}, fields.map(function (field, i) {
|
|
138
|
-
if (!
|
|
139
|
-
return field ?
|
|
128
|
+
if (!isValidElement(field)) {
|
|
129
|
+
return field ? React.createElement(_Col, {
|
|
140
130
|
span: 4,
|
|
141
131
|
key: i
|
|
142
132
|
}, field) : "";
|
|
@@ -149,10 +139,10 @@ function ArrayInput(_ref) {
|
|
|
149
139
|
fieldChange = _ref2.onChange,
|
|
150
140
|
other = _objectWithoutProperties(_ref2, ["name", "span", "onChange"]);
|
|
151
141
|
|
|
152
|
-
return
|
|
142
|
+
return React.createElement(_Col, {
|
|
153
143
|
span: span,
|
|
154
144
|
key: i
|
|
155
|
-
},
|
|
145
|
+
}, React.cloneElement(field, _objectSpread({
|
|
156
146
|
value: item[name] || undefined,
|
|
157
147
|
onChange: function onChange(e) {
|
|
158
148
|
fieldChange && fieldChange(e, index, changeValue);
|
|
@@ -160,38 +150,38 @@ function ArrayInput(_ref) {
|
|
|
160
150
|
changeValue(index, name, newValue);
|
|
161
151
|
}
|
|
162
152
|
}, other)));
|
|
163
|
-
}),
|
|
164
|
-
span: 24 -
|
|
165
|
-
return
|
|
153
|
+
}), React.createElement(_Col, {
|
|
154
|
+
span: 24 - sum(fields.map(function (f) {
|
|
155
|
+
return get(f, "props.span", 4);
|
|
166
156
|
})) % 24
|
|
167
|
-
},
|
|
157
|
+
}, React.createElement("span", {
|
|
168
158
|
className: "tntd-array-input-action"
|
|
169
|
-
}, plusTip ?
|
|
159
|
+
}, plusTip ? React.createElement(_Tooltip, {
|
|
170
160
|
title: plusTip,
|
|
171
161
|
placement: "left"
|
|
172
|
-
},
|
|
162
|
+
}, React.createElement("span", {
|
|
173
163
|
className: "mr10",
|
|
174
164
|
onClick: function onClick() {
|
|
175
165
|
return onAdd(index);
|
|
176
166
|
}
|
|
177
|
-
},
|
|
167
|
+
}, plusIcon)) : React.createElement("span", {
|
|
178
168
|
className: "mr10",
|
|
179
169
|
onClick: function onClick() {
|
|
180
170
|
return onAdd(index);
|
|
181
171
|
}
|
|
182
|
-
},
|
|
172
|
+
}, plusIcon), deleteTip ? React.createElement(_Tooltip, {
|
|
183
173
|
title: deleteTip,
|
|
184
174
|
placement: "right"
|
|
185
|
-
},
|
|
175
|
+
}, React.createElement("span", {
|
|
186
176
|
onClick: function onClick() {
|
|
187
177
|
return onDelete(index);
|
|
188
178
|
}
|
|
189
|
-
},
|
|
179
|
+
}, deleteIcon)) : React.createElement("span", {
|
|
190
180
|
onClick: function onClick() {
|
|
191
181
|
return onDelete(index);
|
|
192
182
|
}
|
|
193
|
-
},
|
|
194
|
-
}), inValue.length === 0 &&
|
|
183
|
+
}, deleteIcon))));
|
|
184
|
+
}), inValue.length === 0 && React.createElement("a", {
|
|
195
185
|
onClick: function onClick() {
|
|
196
186
|
return onAdd();
|
|
197
187
|
}
|
|
@@ -199,8 +189,8 @@ function ArrayInput(_ref) {
|
|
|
199
189
|
} else {
|
|
200
190
|
var fields = children({}, 0);
|
|
201
191
|
|
|
202
|
-
if (!
|
|
203
|
-
fields =
|
|
192
|
+
if (!isArray(fields)) {
|
|
193
|
+
fields = get(fields, "props.children", []);
|
|
204
194
|
}
|
|
205
195
|
|
|
206
196
|
var dataSource = inValue.map(function (value, index) {
|
|
@@ -210,17 +200,17 @@ function ArrayInput(_ref) {
|
|
|
210
200
|
var _field$props;
|
|
211
201
|
|
|
212
202
|
var name = field == null ? void 0 : (_field$props = field.props) == null ? void 0 : _field$props.name;
|
|
213
|
-
name &&
|
|
203
|
+
name && set(back, name, field);
|
|
214
204
|
});
|
|
215
205
|
return back;
|
|
216
206
|
});
|
|
217
|
-
return
|
|
207
|
+
return React.createElement("div", {
|
|
218
208
|
className: "tntd-array-input"
|
|
219
|
-
},
|
|
209
|
+
}, React.createElement(_Table, {
|
|
220
210
|
dataSource: dataSource,
|
|
221
211
|
pagination: false,
|
|
222
212
|
locale: {
|
|
223
|
-
emptyText:
|
|
213
|
+
emptyText: React.createElement("a", {
|
|
224
214
|
onClick: function onClick() {
|
|
225
215
|
return onAdd();
|
|
226
216
|
}
|
|
@@ -232,18 +222,18 @@ function ArrayInput(_ref) {
|
|
|
232
222
|
span = _ref3.span,
|
|
233
223
|
title = _ref3.title;
|
|
234
224
|
|
|
235
|
-
return
|
|
225
|
+
return React.createElement(Column, {
|
|
236
226
|
key: name,
|
|
237
227
|
dataIndex: name,
|
|
238
228
|
title: title,
|
|
239
229
|
width: getWidth(span || 24 / (fields.length + 1)),
|
|
240
230
|
render: function render(field, row, index) {
|
|
241
|
-
if (!
|
|
231
|
+
if (!isValidElement(field)) {
|
|
242
232
|
return field;
|
|
243
233
|
}
|
|
244
234
|
|
|
245
235
|
var fieldChange = field.props.onChange;
|
|
246
|
-
return
|
|
236
|
+
return React.cloneElement(field, {
|
|
247
237
|
value: inValue[index][name] || undefined,
|
|
248
238
|
onChange: function onChange(e) {
|
|
249
239
|
fieldChange && fieldChange(e, index, changeValue);
|
|
@@ -253,39 +243,39 @@ function ArrayInput(_ref) {
|
|
|
253
243
|
});
|
|
254
244
|
}
|
|
255
245
|
});
|
|
256
|
-
}),
|
|
246
|
+
}), React.createElement(Column, {
|
|
257
247
|
key: "action",
|
|
258
248
|
dataIndex: "action",
|
|
259
249
|
title: "\u64CD\u4F5C",
|
|
260
|
-
width: getWidth(24 -
|
|
250
|
+
width: getWidth(24 - sumBy(fields, "props.span") % 24),
|
|
261
251
|
render: function render(text, row, index) {
|
|
262
|
-
return
|
|
252
|
+
return React.createElement("span", {
|
|
263
253
|
className: "tntd-array-input-action"
|
|
264
|
-
}, plusTip ?
|
|
254
|
+
}, plusTip ? React.createElement(_Tooltip, {
|
|
265
255
|
title: plusTip,
|
|
266
256
|
placement: "left"
|
|
267
|
-
},
|
|
257
|
+
}, React.createElement("span", {
|
|
268
258
|
className: "mr10",
|
|
269
259
|
onClick: function onClick() {
|
|
270
260
|
return onAdd(index);
|
|
271
261
|
}
|
|
272
|
-
},
|
|
262
|
+
}, plusIcon)) : React.createElement("span", {
|
|
273
263
|
className: "mr10",
|
|
274
264
|
onClick: function onClick() {
|
|
275
265
|
return onAdd(index);
|
|
276
266
|
}
|
|
277
|
-
},
|
|
267
|
+
}, plusIcon), deleteTip ? React.createElement(_Tooltip, {
|
|
278
268
|
title: deleteTip,
|
|
279
269
|
placement: "right"
|
|
280
|
-
},
|
|
270
|
+
}, React.createElement("span", {
|
|
281
271
|
onClick: function onClick() {
|
|
282
272
|
return onDelete(index);
|
|
283
273
|
}
|
|
284
|
-
},
|
|
274
|
+
}, deleteIcon)) : React.createElement("span", {
|
|
285
275
|
onClick: function onClick() {
|
|
286
276
|
return onDelete(index);
|
|
287
277
|
}
|
|
288
|
-
},
|
|
278
|
+
}, deleteIcon));
|
|
289
279
|
}
|
|
290
280
|
})));
|
|
291
281
|
}
|
package/es/AuthContext.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _default = (0, _react.createContext)(function () {
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
export default createContext(function () {
|
|
11
3
|
return true;
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
exports["default"] = _default;
|
|
4
|
+
});
|
package/es/Columns/index.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.Item = void 0;
|
|
7
|
-
|
|
8
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
|
-
var _antd = require("antd");
|
|
11
|
-
|
|
12
|
-
require("./index.less");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1
|
+
import "antd/lib/row/style";
|
|
2
|
+
import _Row from "antd/lib/row";
|
|
3
|
+
import "antd/lib/col/style";
|
|
4
|
+
import _Col from "antd/lib/col";
|
|
15
5
|
|
|
16
6
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
7
|
|
|
@@ -25,9 +15,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
25
15
|
|
|
26
16
|
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; }
|
|
27
17
|
|
|
18
|
+
import classnames from 'classnames';
|
|
19
|
+
import './index.less';
|
|
28
20
|
var clsPrefix = 'tnt-columns';
|
|
29
|
-
|
|
30
|
-
var Item = function Item(props) {
|
|
21
|
+
export var Item = function Item(props) {
|
|
31
22
|
var children = props.children,
|
|
32
23
|
span = props.span,
|
|
33
24
|
extra = props.extra,
|
|
@@ -38,7 +29,7 @@ var Item = function Item(props) {
|
|
|
38
29
|
tabType = props.tabType,
|
|
39
30
|
onTabChange = props.onTabChange;
|
|
40
31
|
var realActiveKey = activeTabKey || defaultActiveTabKey;
|
|
41
|
-
return React.createElement(
|
|
32
|
+
return React.createElement(_Col, {
|
|
42
33
|
className: "".concat(clsPrefix, "-col"),
|
|
43
34
|
span: span < 4 ? 4 : span
|
|
44
35
|
}, React.createElement("div", null, (!tabList || tabList.length < 0) && React.createElement("div", {
|
|
@@ -55,7 +46,7 @@ var Item = function Item(props) {
|
|
|
55
46
|
var tab = _ref.tab,
|
|
56
47
|
key = _ref.key;
|
|
57
48
|
return React.createElement("span", {
|
|
58
|
-
className: (
|
|
49
|
+
className: classnames('tab-item', {
|
|
59
50
|
'active-tab': realActiveKey === key
|
|
60
51
|
}),
|
|
61
52
|
style: {
|
|
@@ -71,8 +62,6 @@ var Item = function Item(props) {
|
|
|
71
62
|
}, children)));
|
|
72
63
|
};
|
|
73
64
|
|
|
74
|
-
exports.Item = Item;
|
|
75
|
-
|
|
76
65
|
var Columns = function Columns(props) {
|
|
77
66
|
var children = props.children,
|
|
78
67
|
height = props.height,
|
|
@@ -85,8 +74,8 @@ var Columns = function Columns(props) {
|
|
|
85
74
|
height: props.height ? "".concat(props.height, "px") : 'calc(100vh)'
|
|
86
75
|
});
|
|
87
76
|
|
|
88
|
-
return React.createElement(
|
|
89
|
-
className: (
|
|
77
|
+
return React.createElement(_Row, _extends({
|
|
78
|
+
className: classnames(clsPrefix, {
|
|
90
79
|
gutter: gutter
|
|
91
80
|
}),
|
|
92
81
|
style: rowStyle
|
|
@@ -94,5 +83,4 @@ var Columns = function Columns(props) {
|
|
|
94
83
|
};
|
|
95
84
|
|
|
96
85
|
Columns.Item = Item;
|
|
97
|
-
|
|
98
|
-
exports["default"] = _default;
|
|
86
|
+
export default Columns;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _antd = require("antd");
|
|
11
|
-
|
|
12
|
-
var _universalCookie = _interopRequireDefault(require("universal-cookie"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
1
|
+
import "antd/lib/modal/style";
|
|
2
|
+
import _Modal from "antd/lib/modal";
|
|
3
|
+
import "antd/lib/form/style";
|
|
4
|
+
import _Form from "antd/lib/form";
|
|
5
|
+
import "antd/lib/input/style";
|
|
6
|
+
import _Input from "antd/lib/input";
|
|
7
|
+
import "antd/lib/message/style";
|
|
8
|
+
import _message from "antd/lib/message";
|
|
15
9
|
|
|
16
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
17
11
|
|
|
@@ -27,19 +21,20 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
27
21
|
|
|
28
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
import Cookies from 'universal-cookie';
|
|
26
|
+
var cookies = new Cookies(); // 默认
|
|
31
27
|
|
|
32
28
|
var accountInfoDefault = {
|
|
33
29
|
account: undefined,
|
|
34
30
|
password: undefined
|
|
35
31
|
};
|
|
36
|
-
|
|
37
|
-
var _default = function _default(_ref) {
|
|
32
|
+
export default (function (_ref) {
|
|
38
33
|
var visible = _ref.visible,
|
|
39
34
|
close = _ref.close,
|
|
40
35
|
signIn = _ref.signIn;
|
|
41
36
|
|
|
42
|
-
var _useState =
|
|
37
|
+
var _useState = useState(false),
|
|
43
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
39
|
confirmLoading = _useState2[0],
|
|
45
40
|
setConfirmLoading = _useState2[1]; // 如果storage中已存在,则取storage
|
|
@@ -53,7 +48,7 @@ var _default = function _default(_ref) {
|
|
|
53
48
|
} catch (e) {}
|
|
54
49
|
}
|
|
55
50
|
|
|
56
|
-
var _useState3 =
|
|
51
|
+
var _useState3 = useState(accountInfoDefault),
|
|
57
52
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
58
53
|
accountInfo = _useState4[0],
|
|
59
54
|
setAccountInfo = _useState4[1];
|
|
@@ -67,7 +62,7 @@ var _default = function _default(_ref) {
|
|
|
67
62
|
|
|
68
63
|
if (returnVal && returnVal.then) {
|
|
69
64
|
returnVal.then(function (res) {
|
|
70
|
-
|
|
65
|
+
_message.success('模拟登陆成功');
|
|
71
66
|
|
|
72
67
|
localStorage.setItem('accountInfo', JSON.stringify(accountInfo));
|
|
73
68
|
setConfirmLoading(false);
|
|
@@ -95,32 +90,32 @@ var _default = function _default(_ref) {
|
|
|
95
90
|
setAccountInfo(_objectSpread({}, accountInfo, _defineProperty({}, key, evt.target.value)));
|
|
96
91
|
};
|
|
97
92
|
|
|
98
|
-
return React.createElement(
|
|
93
|
+
return React.createElement(_Modal, {
|
|
99
94
|
title: "\u5F00\u53D1\u8005\u6A21\u62DF\u767B\u9646",
|
|
100
95
|
visible: visible,
|
|
101
96
|
maskClosable: false,
|
|
102
97
|
onOk: onSubmit,
|
|
103
98
|
onCancel: close,
|
|
104
99
|
confirmLoading: confirmLoading
|
|
105
|
-
}, React.createElement(
|
|
100
|
+
}, React.createElement(_Form, {
|
|
106
101
|
labelCol: {
|
|
107
102
|
span: 5
|
|
108
103
|
},
|
|
109
104
|
wrapperCol: {
|
|
110
105
|
span: 18
|
|
111
106
|
}
|
|
112
|
-
}, React.createElement(
|
|
107
|
+
}, React.createElement(_Form.Item, {
|
|
113
108
|
label: "\u7528\u6237\u540D\uFF1A"
|
|
114
|
-
}, React.createElement(
|
|
109
|
+
}, React.createElement(_Input, {
|
|
115
110
|
type: "text",
|
|
116
111
|
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D",
|
|
117
112
|
value: account || undefined,
|
|
118
113
|
onChange: function onChange(evt) {
|
|
119
114
|
return changeFieldValue('account', evt);
|
|
120
115
|
}
|
|
121
|
-
})), React.createElement(
|
|
116
|
+
})), React.createElement(_Form.Item, {
|
|
122
117
|
label: "\u5BC6\u7801\uFF1A"
|
|
123
|
-
}, React.createElement(
|
|
118
|
+
}, React.createElement(_Input, {
|
|
124
119
|
type: "text",
|
|
125
120
|
placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D",
|
|
126
121
|
value: password || undefined,
|
|
@@ -128,6 +123,4 @@ var _default = function _default(_ref) {
|
|
|
128
123
|
return changeFieldValue('password', evt);
|
|
129
124
|
}
|
|
130
125
|
}))));
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
exports["default"] = _default;
|
|
126
|
+
});
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
11
|
-
|
|
12
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
13
2
|
|
|
14
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
@@ -17,40 +6,35 @@ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) ||
|
|
|
17
6
|
|
|
18
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var DevelopmentLoginModal =
|
|
25
|
-
return
|
|
26
|
-
return _interopRequireWildcard(require('./LoginModal'));
|
|
27
|
-
});
|
|
9
|
+
/**
|
|
10
|
+
* @file 本地开发登录入口
|
|
11
|
+
*/
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
var DevelopmentLoginModal = React.lazy(function () {
|
|
14
|
+
return import('./LoginModal');
|
|
28
15
|
});
|
|
29
|
-
|
|
30
|
-
var _default = function _default(_ref) {
|
|
16
|
+
export default (function (_ref) {
|
|
31
17
|
var signIn = _ref.signIn;
|
|
32
18
|
|
|
33
|
-
var _useState =
|
|
19
|
+
var _useState = useState(false),
|
|
34
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
21
|
loginVisible = _useState2[0],
|
|
36
22
|
setLoginVisible = _useState2[1];
|
|
37
23
|
|
|
38
|
-
return
|
|
24
|
+
return React.createElement(React.Fragment, null, React.createElement("a", {
|
|
39
25
|
style: {
|
|
40
26
|
fontSize: 14
|
|
41
27
|
},
|
|
42
28
|
onClick: function onClick() {
|
|
43
29
|
return setLoginVisible(true);
|
|
44
30
|
}
|
|
45
|
-
}, "\u6A21\u62DF\u767B\u5F55"), loginVisible &&
|
|
46
|
-
fallback:
|
|
47
|
-
},
|
|
31
|
+
}, "\u6A21\u62DF\u767B\u5F55"), loginVisible && React.createElement(React.Suspense, {
|
|
32
|
+
fallback: React.createElement("div", null, "\u6B63\u5728\u52A0\u8F7D\u4E2D")
|
|
33
|
+
}, React.createElement(DevelopmentLoginModal, {
|
|
48
34
|
visible: loginVisible,
|
|
49
35
|
signIn: signIn,
|
|
50
36
|
close: function close() {
|
|
51
37
|
return setLoginVisible(false);
|
|
52
38
|
}
|
|
53
39
|
})));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports["default"] = _default;
|
|
40
|
+
});
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _default = function _default(props) {
|
|
1
|
+
export default (function (props) {
|
|
9
2
|
return React.createElement("div", props, React.createElement("svg", {
|
|
10
3
|
width: "16px",
|
|
11
4
|
height: "16px",
|
|
@@ -67,6 +60,4 @@ var _default = function _default(props) {
|
|
|
67
60
|
y2: "8",
|
|
68
61
|
id: "\u8DEF\u5F84"
|
|
69
62
|
})))))))));
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
exports["default"] = _default;
|
|
63
|
+
});
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _default = function _default(props) {
|
|
1
|
+
export default (function (props) {
|
|
9
2
|
return React.createElement("div", props, React.createElement("svg", {
|
|
10
3
|
width: "17px",
|
|
11
4
|
height: "16px",
|
|
@@ -45,6 +38,4 @@ var _default = function _default(props) {
|
|
|
45
38
|
"stroke-linejoin": "round",
|
|
46
39
|
points: "14.3333333 3.66666667 5.625 12.3333333 1.66666667 8.39393333"
|
|
47
40
|
}))))))));
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports["default"] = _default;
|
|
41
|
+
});
|