dlt-for-react 1.1.16 → 1.1.18
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/README.md +20 -1
- package/assets/HqCheckButton/index.less +13 -0
- package/assets/HqImage/index.less +11 -0
- package/assets/HqInputPicker/index.less +8 -0
- package/assets/selector/resultview/index.less +53 -0
- package/assets/selector/selectormodal/index.less +15 -0
- package/assets/selector/table/index.less +211 -0
- package/assets/selector/tree/index.less +138 -0
- package/assets/stuSelector/index.less +24 -0
- package/assets/teaSelector/index.less +4 -0
- package/lib/components/HqButton/index.js +95 -0
- package/lib/components/HqCascader/index.js +306 -0
- package/lib/components/HqCheckBox/index.js +375 -0
- package/lib/components/HqCheckButton/index.js +284 -0
- package/lib/components/HqConfirm/index.js +81 -0
- package/lib/components/HqFormItem/FormRules.js +27 -0
- package/lib/components/HqFormItem/index.js +309 -0
- package/lib/components/HqImage/index.js +553 -0
- package/lib/components/HqInputPicker/edit-page.js +585 -0
- package/lib/components/HqInputPicker/index.js +226 -0
- package/lib/components/HqInputPicker/input-const.js +134 -0
- package/lib/components/HqInputPicker/render.js +2496 -0
- package/lib/components/HqInputPicker/setting-checkbox.js +853 -0
- package/lib/components/HqInputPicker/setting-datepicker.js +430 -0
- package/lib/components/HqInputPicker/setting-datetimepicker.js +443 -0
- package/lib/components/HqInputPicker/setting-input.js +555 -0
- package/lib/components/HqInputPicker/setting-inputNumber.js +658 -0
- package/lib/components/HqInputPicker/setting-monthpicker.js +434 -0
- package/lib/components/HqInputPicker/setting-multiSelect.js +533 -0
- package/lib/components/HqInputPicker/setting-nhcascader.js +588 -0
- package/lib/components/HqInputPicker/setting-old-upload.js +428 -0
- package/lib/components/HqInputPicker/setting-radio.js +468 -0
- package/lib/components/HqInputPicker/setting-rangepicker.js +466 -0
- package/lib/components/HqInputPicker/setting-select.js +534 -0
- package/lib/components/HqInputPicker/setting-stu-selector.js +508 -0
- package/lib/components/HqInputPicker/setting-switch.js +274 -0
- package/lib/components/HqInputPicker/setting-tea-selector.js +508 -0
- package/lib/components/HqInputPicker/setting-textarea.js +619 -0
- package/lib/components/HqInputPicker/setting-timepicker.js +437 -0
- package/lib/components/HqInputPicker/setting-upload.js +795 -0
- package/lib/components/HqMultiSelect/index.js +495 -0
- package/lib/components/HqOldUpload/index.js +350 -0
- package/lib/components/HqSelect/getSelectName.js +20 -0
- package/lib/components/HqSelect/index.js +495 -0
- package/lib/components/HqSelector/HqLsrySelector/index.js +269 -267
- package/lib/components/HqSelector/HqRySelector/index.js +4 -2
- package/lib/components/HqSelector/HqWzSelector/index.js +4 -2
- package/lib/components/HqStuSelector/index.js +267 -0
- package/lib/components/HqSwitch/index.js +280 -0
- package/lib/components/HqTeaSelector/index.js +221 -0
- package/lib/components/KyCollapse/index.js +23 -24
- package/lib/components/KyContainerFrame/index.js +2 -2
- package/lib/components/KyEditableTable/component.js +38 -38
- package/lib/components/KyEditableTable/index.js +203 -181
- package/lib/components/KyExcel/index.js +191 -153
- package/lib/components/KyModal/index.js +43 -33
- package/lib/components/KyTable/AddFieldsModal.js +66 -59
- package/lib/components/KyTable/checkButtons.js +3 -13
- package/lib/components/KyTable/index.js +2 -2
- package/lib/components/KyTableCardList/AddFieldsModal.js +280 -282
- package/lib/components/KyTableCardList/index.js +15 -26
- package/lib/components/KyTree/index.js +7 -7
- package/lib/components/KyUpload/index.js +170 -165
- package/lib/components/NHSelector/ListSort/index.js +411 -0
- package/lib/components/NHSelector/index.js +636 -0
- package/lib/components/NHSelector/resultview/index.js +408 -0
- package/lib/components/NHSelector/selectormodal/index.js +303 -0
- package/lib/components/NHSelector/table/index.js +784 -0
- package/lib/components/NHSelector/tree/index.js +554 -0
- package/lib/index.js +164 -36
- package/lib/layouts/LeftMenu/index.js +6 -6
- package/lib/layouts/Login/index-pre.js +107 -103
- package/lib/layouts/Login/index.js +2 -2
- package/lib/layouts/Login/login.js +178 -172
- package/lib/layouts/NavigationBar/index.js +67 -67
- package/lib/layouts/Top/editPassWord.js +84 -64
- package/lib/layouts/Top/index.js +117 -117
- package/lib/layouts/TopMenu/index.js +53 -53
- package/lib/layouts/layout/index.js +115 -118
- package/lib/layouts/mixTop/index.js +95 -95
- package/lib/layouts/settingDrawer/index.js +96 -96
- package/lib/routes/AuthorizedRoute.js +33 -32
- package/lib/utils/NHCore.js +65 -65
- package/package.json +2 -2
- package/lib/utils/createUuid.js +0 -40
- package/lib/utils/getLoginUser.js +0 -10
- package/lib/utils/getSize.js +0 -27
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = undefined;
|
|
7
7
|
|
|
8
|
-
var _extends2 = require(
|
|
8
|
+
var _extends2 = require("babel-runtime/helpers/extends");
|
|
9
9
|
|
|
10
10
|
var _extends3 = _interopRequireDefault(_extends2);
|
|
11
11
|
|
|
12
|
-
var _icon = require(
|
|
12
|
+
var _icon = require("antd/lib/icon");
|
|
13
13
|
|
|
14
14
|
var _icon2 = _interopRequireDefault(_icon);
|
|
15
15
|
|
|
16
|
-
var _getPrototypeOf = require(
|
|
16
|
+
var _getPrototypeOf = require("babel-runtime/core-js/object/get-prototype-of");
|
|
17
17
|
|
|
18
18
|
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
19
19
|
|
|
20
|
-
var _classCallCheck2 = require(
|
|
20
|
+
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
|
21
21
|
|
|
22
22
|
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
23
23
|
|
|
24
|
-
var _createClass2 = require(
|
|
24
|
+
var _createClass2 = require("babel-runtime/helpers/createClass");
|
|
25
25
|
|
|
26
26
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
27
27
|
|
|
28
|
-
var _possibleConstructorReturn2 = require(
|
|
28
|
+
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
|
29
29
|
|
|
30
30
|
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
31
31
|
|
|
32
|
-
var _inherits2 = require(
|
|
32
|
+
var _inherits2 = require("babel-runtime/helpers/inherits");
|
|
33
33
|
|
|
34
34
|
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
35
35
|
|
|
36
|
-
var _menu = require(
|
|
36
|
+
var _menu = require("antd/lib/menu");
|
|
37
37
|
|
|
38
38
|
var _menu2 = _interopRequireDefault(_menu);
|
|
39
39
|
|
|
40
|
-
require(
|
|
40
|
+
require("antd/lib/icon/style");
|
|
41
41
|
|
|
42
|
-
require(
|
|
42
|
+
require("antd/lib/menu/style");
|
|
43
43
|
|
|
44
|
-
var _react = require(
|
|
44
|
+
var _react = require("react");
|
|
45
45
|
|
|
46
46
|
var _react2 = _interopRequireDefault(_react);
|
|
47
47
|
|
|
48
|
-
var _router = require(
|
|
48
|
+
var _router = require("dva/router");
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _index = require("../../index");
|
|
51
51
|
|
|
52
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
53
53
|
|
|
@@ -69,10 +69,10 @@ var index = function (_Component) {
|
|
|
69
69
|
var _this = (0, _possibleConstructorReturn3.default)(this, (index.__proto__ || (0, _getPrototypeOf2.default)(index)).call(this, props));
|
|
70
70
|
|
|
71
71
|
_this.loginSkip = function () {
|
|
72
|
-
var leftMenu = (0,
|
|
72
|
+
var leftMenu = (0, _index.getLoginUser)().menus ? (0, _index.getLoginUser)().menus : [];
|
|
73
73
|
// 如果不需要登录的服务就取props的菜单
|
|
74
74
|
leftMenu = _this.props.config.noNeedLogin ? _this.props.allMenu : leftMenu;
|
|
75
|
-
var curUrl = window.location.href.split(
|
|
75
|
+
var curUrl = window.location.href.split("#")[1] + "/";
|
|
76
76
|
var addRootSubmenuKeys = [];
|
|
77
77
|
for (var i = 0; i < leftMenu.length; i++) {
|
|
78
78
|
addRootSubmenuKeys.push(leftMenu[i].key);
|
|
@@ -80,7 +80,7 @@ var index = function (_Component) {
|
|
|
80
80
|
for (var j = 0; j < leftMenu[i].children.length; j++) {
|
|
81
81
|
if (leftMenu[i].children[j].children) {
|
|
82
82
|
for (var k = 0; k < leftMenu[i].children[j].children.length; k++) {
|
|
83
|
-
if (curUrl.startsWith(leftMenu[i].children[j].children[k].url +
|
|
83
|
+
if (curUrl.startsWith(leftMenu[i].children[j].children[k].url + "/")) {
|
|
84
84
|
_this.setState({
|
|
85
85
|
selectedKeys: leftMenu[i].children[j].children[k].key,
|
|
86
86
|
openKeys: [leftMenu[i].key]
|
|
@@ -88,7 +88,7 @@ var index = function (_Component) {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
} else {
|
|
91
|
-
if (curUrl.startsWith(leftMenu[i].children[j].url +
|
|
91
|
+
if (curUrl.startsWith(leftMenu[i].children[j].url + "/")) {
|
|
92
92
|
_this.setState({
|
|
93
93
|
selectedKeys: leftMenu[i].children[j].key,
|
|
94
94
|
openKeys: [leftMenu[i].key]
|
|
@@ -97,7 +97,7 @@ var index = function (_Component) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
} else {
|
|
100
|
-
if (curUrl.startsWith(leftMenu[i].url +
|
|
100
|
+
if (curUrl.startsWith(leftMenu[i].url + "/")) {
|
|
101
101
|
_this.setState({
|
|
102
102
|
selectedKeys: leftMenu[i].key,
|
|
103
103
|
openKeys: []
|
|
@@ -149,30 +149,30 @@ var index = function (_Component) {
|
|
|
149
149
|
_this.renderIcon = function (menuIcons, icon, curUrl) {
|
|
150
150
|
if (!icon) {
|
|
151
151
|
// 占位元素
|
|
152
|
-
return _react2.default.createElement(
|
|
152
|
+
return _react2.default.createElement("i", { className: "anticon" });
|
|
153
153
|
}
|
|
154
154
|
var customIcon = menuIcons[icon];
|
|
155
|
-
if (typeof customIcon ===
|
|
155
|
+
if (typeof customIcon === "string") {
|
|
156
156
|
// 兼容旧版本
|
|
157
157
|
return _react2.default.createElement(
|
|
158
|
-
|
|
158
|
+
"div",
|
|
159
159
|
{
|
|
160
|
-
className:
|
|
160
|
+
className: "anticon",
|
|
161
161
|
style: {
|
|
162
|
-
display:
|
|
163
|
-
verticalAlign:
|
|
164
|
-
width:
|
|
165
|
-
height:
|
|
166
|
-
marginRight:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
162
|
+
display: "inline-block",
|
|
163
|
+
verticalAlign: "-0.046296rem",
|
|
164
|
+
width: "0.259195rem",
|
|
165
|
+
height: "0.259195rem",
|
|
166
|
+
marginRight: "0.135rem",
|
|
167
|
+
"-webkit-mask-image": "url(" + (curUrl + customIcon) + ")",
|
|
168
|
+
"-webkit-mask-size": "contain",
|
|
169
|
+
"mask-image": "url(" + (curUrl + customIcon) + ")",
|
|
170
|
+
"mask-size": "contain",
|
|
171
171
|
fontSize: 100,
|
|
172
|
-
overflow:
|
|
172
|
+
overflow: "hidden"
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
|
|
175
|
+
"\u2588"
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
178
|
return customIcon ? _react2.default.createElement(_icon2.default, { component: customIcon }) : _react2.default.createElement(_icon2.default, { type: icon });
|
|
@@ -188,34 +188,34 @@ var index = function (_Component) {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
(0, _createClass3.default)(index, [{
|
|
191
|
-
key:
|
|
191
|
+
key: "componentDidMount",
|
|
192
192
|
value: function componentDidMount() {
|
|
193
193
|
this.loginSkip();
|
|
194
194
|
// 监听页面地址变化,防止手动点击浏览器前进后退按钮导致导航栏选中值错误
|
|
195
|
-
window.addEventListener(
|
|
195
|
+
window.addEventListener("hashchange", this.loginSkip);
|
|
196
196
|
}
|
|
197
197
|
}, {
|
|
198
|
-
key:
|
|
198
|
+
key: "componentWillUnmount",
|
|
199
199
|
value: function componentWillUnmount() {
|
|
200
|
-
window.removeEventListener(
|
|
200
|
+
window.removeEventListener("hashchange", this.loginSkip);
|
|
201
201
|
}
|
|
202
202
|
}, {
|
|
203
|
-
key:
|
|
203
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
204
204
|
value: function UNSAFE_componentWillReceiveProps() {
|
|
205
205
|
//this.loginSkip();
|
|
206
206
|
}
|
|
207
207
|
// 渲染菜单图标
|
|
208
208
|
|
|
209
209
|
}, {
|
|
210
|
-
key:
|
|
210
|
+
key: "render",
|
|
211
211
|
value: function render() {
|
|
212
212
|
var _this2 = this;
|
|
213
213
|
|
|
214
|
-
var leftMenu = (0,
|
|
214
|
+
var leftMenu = (0, _index.getLoginUser)().menus ? (0, _index.getLoginUser)().menus : [];
|
|
215
215
|
// 如果不需要登录的服务就取props的菜单
|
|
216
216
|
leftMenu = this.props.config.noNeedLogin ? this.props.allMenu : leftMenu;
|
|
217
217
|
var menuIcons = this.props.menuIcons ? this.props.menuIcons : {};
|
|
218
|
-
var curUrl = window.location.href.split(
|
|
218
|
+
var curUrl = window.location.href.split("#")[0];
|
|
219
219
|
// console.info(curUrl);
|
|
220
220
|
// console.info(menuIcons);
|
|
221
221
|
// 判断menu收缩时不设置值openKeys,解决收缩时二级菜单不跟随问题
|
|
@@ -228,12 +228,12 @@ var index = function (_Component) {
|
|
|
228
228
|
fixSiderbar = _props$setting.fixSiderbar,
|
|
229
229
|
autoHideHeader = _props$setting.autoHideHeader;
|
|
230
230
|
|
|
231
|
-
var defaultProps = this.props.collapsed || layout ===
|
|
231
|
+
var defaultProps = this.props.collapsed || layout === "topmenu" ? {} : { openKeys: this.state.openKeys };
|
|
232
232
|
return _react2.default.createElement(
|
|
233
233
|
_menu2.default,
|
|
234
234
|
(0, _extends3.default)({
|
|
235
235
|
theme: navTheme,
|
|
236
|
-
mode:
|
|
236
|
+
mode: "horizontal"
|
|
237
237
|
// openKeys={this.state.openKeys}
|
|
238
238
|
}, defaultProps, {
|
|
239
239
|
selectedKeys: [this.state.selectedKeys],
|
|
@@ -241,10 +241,10 @@ var index = function (_Component) {
|
|
|
241
241
|
onClick: this.onClick
|
|
242
242
|
}),
|
|
243
243
|
leftMenu.map(function (item, index) {
|
|
244
|
-
if (item.children && item.children !==
|
|
244
|
+
if (item.children && item.children !== "" && item.children.length > 0) {
|
|
245
245
|
var htmlct = [];
|
|
246
246
|
var menuItem = item.children.map(function (itemM, index) {
|
|
247
|
-
if (itemM.children && itemM.children !==
|
|
247
|
+
if (itemM.children && itemM.children !== "" && itemM.children.length > 0) {
|
|
248
248
|
var menuItemC = itemM.children.map(function (itemC, index) {
|
|
249
249
|
return _react2.default.createElement(
|
|
250
250
|
_menu2.default.Item,
|
|
@@ -254,7 +254,7 @@ var index = function (_Component) {
|
|
|
254
254
|
{ key: 1, to: itemC.url },
|
|
255
255
|
_this2.renderIcon(menuIcons, itemC.icon, curUrl),
|
|
256
256
|
_react2.default.createElement(
|
|
257
|
-
|
|
257
|
+
"span",
|
|
258
258
|
null,
|
|
259
259
|
itemC.name
|
|
260
260
|
)
|
|
@@ -266,11 +266,11 @@ var index = function (_Component) {
|
|
|
266
266
|
{
|
|
267
267
|
key: itemM.key,
|
|
268
268
|
title: _react2.default.createElement(
|
|
269
|
-
|
|
269
|
+
"span",
|
|
270
270
|
null,
|
|
271
271
|
_this2.renderIcon(menuIcons, itemM.icon, curUrl),
|
|
272
272
|
_react2.default.createElement(
|
|
273
|
-
|
|
273
|
+
"span",
|
|
274
274
|
null,
|
|
275
275
|
itemM.name
|
|
276
276
|
)
|
|
@@ -287,7 +287,7 @@ var index = function (_Component) {
|
|
|
287
287
|
{ key: 1, to: itemM.url },
|
|
288
288
|
_this2.renderIcon(menuIcons, itemM.icon, curUrl),
|
|
289
289
|
_react2.default.createElement(
|
|
290
|
-
|
|
290
|
+
"span",
|
|
291
291
|
null,
|
|
292
292
|
itemM.name
|
|
293
293
|
)
|
|
@@ -300,11 +300,11 @@ var index = function (_Component) {
|
|
|
300
300
|
{
|
|
301
301
|
key: item.key,
|
|
302
302
|
title: _react2.default.createElement(
|
|
303
|
-
|
|
303
|
+
"span",
|
|
304
304
|
null,
|
|
305
305
|
_this2.renderIcon(menuIcons, item.icon, curUrl),
|
|
306
306
|
_react2.default.createElement(
|
|
307
|
-
|
|
307
|
+
"span",
|
|
308
308
|
null,
|
|
309
309
|
item.name
|
|
310
310
|
)
|
|
@@ -322,7 +322,7 @@ var index = function (_Component) {
|
|
|
322
322
|
{ key: 1, to: item.url },
|
|
323
323
|
_this2.renderIcon(menuIcons, item.icon, curUrl),
|
|
324
324
|
_react2.default.createElement(
|
|
325
|
-
|
|
325
|
+
"span",
|
|
326
326
|
null,
|
|
327
327
|
item.name
|
|
328
328
|
)
|