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.
Files changed (87) hide show
  1. package/README.md +20 -1
  2. package/assets/HqCheckButton/index.less +13 -0
  3. package/assets/HqImage/index.less +11 -0
  4. package/assets/HqInputPicker/index.less +8 -0
  5. package/assets/selector/resultview/index.less +53 -0
  6. package/assets/selector/selectormodal/index.less +15 -0
  7. package/assets/selector/table/index.less +211 -0
  8. package/assets/selector/tree/index.less +138 -0
  9. package/assets/stuSelector/index.less +24 -0
  10. package/assets/teaSelector/index.less +4 -0
  11. package/lib/components/HqButton/index.js +95 -0
  12. package/lib/components/HqCascader/index.js +306 -0
  13. package/lib/components/HqCheckBox/index.js +375 -0
  14. package/lib/components/HqCheckButton/index.js +284 -0
  15. package/lib/components/HqConfirm/index.js +81 -0
  16. package/lib/components/HqFormItem/FormRules.js +27 -0
  17. package/lib/components/HqFormItem/index.js +309 -0
  18. package/lib/components/HqImage/index.js +553 -0
  19. package/lib/components/HqInputPicker/edit-page.js +585 -0
  20. package/lib/components/HqInputPicker/index.js +226 -0
  21. package/lib/components/HqInputPicker/input-const.js +134 -0
  22. package/lib/components/HqInputPicker/render.js +2496 -0
  23. package/lib/components/HqInputPicker/setting-checkbox.js +853 -0
  24. package/lib/components/HqInputPicker/setting-datepicker.js +430 -0
  25. package/lib/components/HqInputPicker/setting-datetimepicker.js +443 -0
  26. package/lib/components/HqInputPicker/setting-input.js +555 -0
  27. package/lib/components/HqInputPicker/setting-inputNumber.js +658 -0
  28. package/lib/components/HqInputPicker/setting-monthpicker.js +434 -0
  29. package/lib/components/HqInputPicker/setting-multiSelect.js +533 -0
  30. package/lib/components/HqInputPicker/setting-nhcascader.js +588 -0
  31. package/lib/components/HqInputPicker/setting-old-upload.js +428 -0
  32. package/lib/components/HqInputPicker/setting-radio.js +468 -0
  33. package/lib/components/HqInputPicker/setting-rangepicker.js +466 -0
  34. package/lib/components/HqInputPicker/setting-select.js +534 -0
  35. package/lib/components/HqInputPicker/setting-stu-selector.js +508 -0
  36. package/lib/components/HqInputPicker/setting-switch.js +274 -0
  37. package/lib/components/HqInputPicker/setting-tea-selector.js +508 -0
  38. package/lib/components/HqInputPicker/setting-textarea.js +619 -0
  39. package/lib/components/HqInputPicker/setting-timepicker.js +437 -0
  40. package/lib/components/HqInputPicker/setting-upload.js +795 -0
  41. package/lib/components/HqMultiSelect/index.js +495 -0
  42. package/lib/components/HqOldUpload/index.js +350 -0
  43. package/lib/components/HqSelect/getSelectName.js +20 -0
  44. package/lib/components/HqSelect/index.js +495 -0
  45. package/lib/components/HqSelector/HqLsrySelector/index.js +269 -267
  46. package/lib/components/HqSelector/HqRySelector/index.js +4 -2
  47. package/lib/components/HqSelector/HqWzSelector/index.js +4 -2
  48. package/lib/components/HqStuSelector/index.js +267 -0
  49. package/lib/components/HqSwitch/index.js +280 -0
  50. package/lib/components/HqTeaSelector/index.js +221 -0
  51. package/lib/components/KyCollapse/index.js +23 -24
  52. package/lib/components/KyContainerFrame/index.js +2 -2
  53. package/lib/components/KyEditableTable/component.js +38 -38
  54. package/lib/components/KyEditableTable/index.js +203 -181
  55. package/lib/components/KyExcel/index.js +191 -153
  56. package/lib/components/KyModal/index.js +43 -33
  57. package/lib/components/KyTable/AddFieldsModal.js +66 -59
  58. package/lib/components/KyTable/checkButtons.js +3 -13
  59. package/lib/components/KyTable/index.js +2 -2
  60. package/lib/components/KyTableCardList/AddFieldsModal.js +280 -282
  61. package/lib/components/KyTableCardList/index.js +15 -26
  62. package/lib/components/KyTree/index.js +7 -7
  63. package/lib/components/KyUpload/index.js +170 -165
  64. package/lib/components/NHSelector/ListSort/index.js +411 -0
  65. package/lib/components/NHSelector/index.js +636 -0
  66. package/lib/components/NHSelector/resultview/index.js +408 -0
  67. package/lib/components/NHSelector/selectormodal/index.js +303 -0
  68. package/lib/components/NHSelector/table/index.js +784 -0
  69. package/lib/components/NHSelector/tree/index.js +554 -0
  70. package/lib/index.js +164 -36
  71. package/lib/layouts/LeftMenu/index.js +6 -6
  72. package/lib/layouts/Login/index-pre.js +107 -103
  73. package/lib/layouts/Login/index.js +2 -2
  74. package/lib/layouts/Login/login.js +178 -172
  75. package/lib/layouts/NavigationBar/index.js +67 -67
  76. package/lib/layouts/Top/editPassWord.js +84 -64
  77. package/lib/layouts/Top/index.js +117 -117
  78. package/lib/layouts/TopMenu/index.js +53 -53
  79. package/lib/layouts/layout/index.js +115 -118
  80. package/lib/layouts/mixTop/index.js +95 -95
  81. package/lib/layouts/settingDrawer/index.js +96 -96
  82. package/lib/routes/AuthorizedRoute.js +33 -32
  83. package/lib/utils/NHCore.js +65 -65
  84. package/package.json +2 -2
  85. package/lib/utils/createUuid.js +0 -40
  86. package/lib/utils/getLoginUser.js +0 -10
  87. package/lib/utils/getSize.js +0 -27
@@ -1,23 +1,23 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.download = exports.getBase64 = exports.createScript = exports.compatibleAnimationFrame = exports.setCookie = exports.getCookie = exports.validateCode = exports.getOffset = exports.computeFontSize = exports.browserJudge = exports.getLoginUser = exports.hasAuthList = exports.hasAuth = exports.getStyle = exports.createUuid = exports.getSuitHeight = exports.getSize = undefined;
7
7
 
8
- var _promise = require('babel-runtime/core-js/promise');
8
+ var _promise = require("babel-runtime/core-js/promise");
9
9
 
10
10
  var _promise2 = _interopRequireDefault(_promise);
11
11
 
12
- var _regenerator = require('babel-runtime/regenerator');
12
+ var _regenerator = require("babel-runtime/regenerator");
13
13
 
14
14
  var _regenerator2 = _interopRequireDefault(_regenerator);
15
15
 
16
- var _stringify = require('babel-runtime/core-js/json/stringify');
16
+ var _stringify = require("babel-runtime/core-js/json/stringify");
17
17
 
18
18
  var _stringify2 = _interopRequireDefault(_stringify);
19
19
 
20
- var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
20
+ var _asyncToGenerator2 = require("babel-runtime/helpers/asyncToGenerator");
21
21
 
22
22
  var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
23
23
 
@@ -28,14 +28,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
28
28
 
29
29
  // 获取窗口信息
30
30
  var getSize = exports.getSize = function getSize() {
31
- var setting = sessionStorage.getItem('setting');
31
+ var setting = sessionStorage.getItem("setting");
32
32
  var breadcrumbHeight = 0; //面包屑高度
33
33
  if (setting) {
34
34
  // 存在布局配置
35
35
  var _JSON$parse = JSON.parse(setting),
36
36
  layout = _JSON$parse.layout;
37
37
 
38
- breadcrumbHeight = layout === 'mixmenu' ? 40 : 0; //若是混合布局 contentH高度需要减去面包屑高度
38
+ breadcrumbHeight = layout === "mixmenu" ? 40 : 0; //若是混合布局 contentH高度需要减去面包屑高度
39
39
  }
40
40
  var windowW = void 0,
41
41
  windowH = void 0,
@@ -70,13 +70,13 @@ function SuitHeight(node) {
70
70
  var childrenObj = parentObj.childNodes;
71
71
  var elseChildrenHeight = 0;
72
72
  for (var i = 0; i < childrenObj.length; i++) {
73
- if (childrenObj[i].nodeName === '#text' && !/\s/.test(childrenObj.nodeValue)) {
73
+ if (childrenObj[i].nodeName === "#text" && !/\s/.test(childrenObj.nodeValue)) {
74
74
  continue;
75
75
  }
76
- if (childrenObj[i] !== node && childrenObj[i].tagName !== 'SCRIPT' && childrenObj[i].tagName !== 'STYLE' && childrenObj[i].style.display !== 'none' && childrenObj[i].style.position !== 'absolute') {
76
+ if (childrenObj[i] !== node && childrenObj[i].tagName !== "SCRIPT" && childrenObj[i].tagName !== "STYLE" && childrenObj[i].style.display !== "none" && childrenObj[i].style.position !== "absolute") {
77
77
  //吧script的高度也排除掉
78
- var marginTop = getDomStyle(childrenObj[i], 'marginTop') ? parseInt(getDomStyle(childrenObj[i], 'marginTop'), 10) : 0;
79
- var marginBottom = getDomStyle(childrenObj[i], 'marginBottom') ? parseInt(getDomStyle(childrenObj[i], 'marginBottom'), 10) : 0;
78
+ var marginTop = getDomStyle(childrenObj[i], "marginTop") ? parseInt(getDomStyle(childrenObj[i], "marginTop"), 10) : 0;
79
+ var marginBottom = getDomStyle(childrenObj[i], "marginBottom") ? parseInt(getDomStyle(childrenObj[i], "marginBottom"), 10) : 0;
80
80
  if (childrenObj[i].offsetHeight && childrenObj[i].offsetHeight > 0) {
81
81
  //获得所有非本元素的其他父类子元素的margin的值
82
82
  elseChildrenHeight += childrenObj[i].offsetHeight + marginTop + marginBottom;
@@ -93,7 +93,7 @@ var createUuid = exports.createUuid = function createUuid() {
93
93
  var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
94
94
  var radix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
95
95
 
96
- var chars = '0123456789abcdefghijklmnopqrstuvwxyz'.split('');
96
+ var chars = "0123456789abcdefghijklmnopqrstuvwxyz".split("");
97
97
  var uuid = [],
98
98
  i;
99
99
  radix = radix || chars.length;
@@ -108,8 +108,8 @@ var createUuid = exports.createUuid = function createUuid() {
108
108
  var r;
109
109
 
110
110
  // rfc4122 requires these characters
111
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
112
- uuid[14] = '4';
111
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
112
+ uuid[14] = "4";
113
113
 
114
114
  // Fill in random data. At i==19 set the high bits of clock sequence as
115
115
  // per rfc4122, sec. 4.1.5
@@ -121,7 +121,7 @@ var createUuid = exports.createUuid = function createUuid() {
121
121
  }
122
122
  }
123
123
 
124
- return uuid.join('');
124
+ return uuid.join("");
125
125
  };
126
126
 
127
127
  var getStyle = exports.getStyle = function getStyle(element, attr) {
@@ -129,11 +129,11 @@ var getStyle = exports.getStyle = function getStyle(element, attr) {
129
129
  };
130
130
 
131
131
  function getDomStyle(curEle, attr) {
132
- if ('getComputedStyle' in window) {
132
+ if ("getComputedStyle" in window) {
133
133
  return window.getComputedStyle(curEle, null)[attr];
134
134
  } else {
135
- if (attr === 'opacity') {
136
- var val = curEle.currentStyle['filter'];
135
+ if (attr === "opacity") {
136
+ var val = curEle.currentStyle["filter"];
137
137
  var reg = /^alpha\(opacity=(\d+(?:\.\d+)?)\)$/i;
138
138
  return reg.test(val) ? reg.exec(val)[1] / 100 : 1;
139
139
  } else {
@@ -144,14 +144,14 @@ function getDomStyle(curEle, attr) {
144
144
 
145
145
  //判断该用户是否存在该权限
146
146
  var hasAuth = exports.hasAuth = function hasAuth(auth) {
147
- var initState = sessionStorage.getItem('userLogin') ? JSON.parse(sessionStorage.getItem('userLogin')) : {};
147
+ var initState = sessionStorage.getItem("userLogin") ? JSON.parse(sessionStorage.getItem("userLogin")) : {};
148
148
  var auths = initState.authorization ? initState.authorization : {};
149
149
  return auths[auth] !== undefined;
150
150
  };
151
151
 
152
152
  //判断该用户是否存在该权限
153
153
  var hasAuthList = exports.hasAuthList = function hasAuthList(authList) {
154
- var initState = sessionStorage.getItem('userLogin') ? JSON.parse(sessionStorage.getItem('userLogin')) : {};
154
+ var initState = sessionStorage.getItem("userLogin") ? JSON.parse(sessionStorage.getItem("userLogin")) : {};
155
155
  var auths = initState.authorization ? initState.authorization : {};
156
156
  var res = authList && authList.length && authList.find(function (auth) {
157
157
  return auths[auth] !== undefined;
@@ -160,8 +160,8 @@ var hasAuthList = exports.hasAuthList = function hasAuthList(authList) {
160
160
  };
161
161
 
162
162
  //获取登陆用户信息
163
- var getLoginUser = exports.getLoginUser = function getLoginUser(auth) {
164
- var loginUser = sessionStorage.getItem('userLogin') ? JSON.parse(sessionStorage.getItem('userLogin')) : { authorization: {}, menus: [] };
163
+ var getLoginUser = exports.getLoginUser = function getLoginUser() {
164
+ var loginUser = sessionStorage.getItem("userLogin") ? JSON.parse(sessionStorage.getItem("userLogin")) : { authorization: {}, menus: [] };
165
165
  return loginUser;
166
166
  };
167
167
 
@@ -169,13 +169,13 @@ var getLoginUser = exports.getLoginUser = function getLoginUser(auth) {
169
169
  * 判断浏览器是否是IE内核,如果是IE内核就不让访问
170
170
  */
171
171
  function isIE() {
172
- if (!!window.ActiveXObject || 'ActiveXObject' in window) return true;else return false;
172
+ if (!!window.ActiveXObject || "ActiveXObject" in window) return true;else return false;
173
173
  }
174
174
  var browserJudge = exports.browserJudge = function browserJudge(func) {
175
175
  if (isIE()) {
176
176
  var str = "<font size='5'>你的浏览器版本过低,无法完整的体验本系统的所有功能!</font>";
177
177
  var str2 = "推荐使用:<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>谷歌</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>火狐</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%8C%8E%E8%B1%B9%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>猎豹</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=360%E6%B5%8F%E8%A7%88%E5%99%A8%0A' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>360浏览器</a>等双核急速模式";
178
- document.getElementById('root').innerHTML = "<table style='width:100%;height:100%;background-color:#fff;z-index:99999;position:absolute;'><tr><td align='center'>" + "<div style='text-align:center; width:800px;border:1px solid #0099CC;background-color:#99CCFF;top:0;left:0;z-index:1234;border-radius:5px;padding:2px;'>" + "<div align='left' style='padding:2px;padding: 8px;font-size: 15px;font-weight:700;border-radius: 5px 5px 0px 0px;color:#fff;'>Web项目体验性研究提示:</div>" + "<div style='background-color:#fff;height:300px;border-radius:0px 0px 5px 5px;border:1px solid #0099CC'><h2 style='padding-top:80px;margin:0'><strong>" + str + '<br/></strong></h2><p>' + str2 + "</p><h2 style='margin:0'><strong>如果你的使用的是双核浏览器,请切换到极速模式访问<br/></strong></h2></div></div></td></tr></table>";
178
+ document.getElementById("root").innerHTML = "<table style='width:100%;height:100%;background-color:#fff;z-index:99999;position:absolute;'><tr><td align='center'>" + "<div style='text-align:center; width:800px;border:1px solid #0099CC;background-color:#99CCFF;top:0;left:0;z-index:1234;border-radius:5px;padding:2px;'>" + "<div align='left' style='padding:2px;padding: 8px;font-size: 15px;font-weight:700;border-radius: 5px 5px 0px 0px;color:#fff;'>Web项目体验性研究提示:</div>" + "<div style='background-color:#fff;height:300px;border-radius:0px 0px 5px 5px;border:1px solid #0099CC'><h2 style='padding-top:80px;margin:0'><strong>" + str + "<br/></strong></h2><p>" + str2 + "</p><h2 style='margin:0'><strong>如果你的使用的是双核浏览器,请切换到极速模式访问<br/></strong></h2></div></div></td></tr></table>";
179
179
  } else {
180
180
  func && func();
181
181
  }
@@ -190,9 +190,9 @@ var browserJudge = exports.browserJudge = function browserJudge(func) {
190
190
  */
191
191
 
192
192
  var computeFontSize = exports.computeFontSize = function computeFontSize(ele, size, family) {
193
- var spanDom = document.createElement('span');
193
+ var spanDom = document.createElement("span");
194
194
  spanDom.style.fontSize = size;
195
- spanDom.style.opacity = '0';
195
+ spanDom.style.opacity = "0";
196
196
  spanDom.style.fontFamily = family;
197
197
  spanDom.innerHTML = ele;
198
198
  document.body.append(spanDom);
@@ -213,7 +213,7 @@ var getOffset = exports.getOffset = function getOffset(ele) {
213
213
  var left = ele.offsetLeft;
214
214
  while (ele.offsetParent) {
215
215
  ele = ele.offsetParent;
216
- if (window.navigator.userAgent.indexOf('MSTE 8') > -1) {
216
+ if (window.navigator.userAgent.indexOf("MSTE 8") > -1) {
217
217
  top += ele.offsetTop;
218
218
  left += ele.offsetLeft;
219
219
  } else {
@@ -243,7 +243,7 @@ var validateCode = exports.validateCode = function () {
243
243
  switch (_context.prev = _context.next) {
244
244
  case 0:
245
245
  _context.prev = 0;
246
- specialCharPattern = sessionStorage.getItem('specialCharPattern') ? JSON.parse(sessionStorage.getItem('specialCharPattern')) : {};
246
+ specialCharPattern = sessionStorage.getItem("specialCharPattern") ? JSON.parse(sessionStorage.getItem("specialCharPattern")) : {};
247
247
  // 第一次为调用接口,之后有缓存则使用缓存
248
248
 
249
249
  if (specialCharPattern.apiUsed) {
@@ -251,10 +251,10 @@ var validateCode = exports.validateCode = function () {
251
251
  break;
252
252
  }
253
253
 
254
- baseUrl = window.xtglUrl || 'api/hq-xtgl';
254
+ baseUrl = window.xtglUrl || "api/hq-xtgl";
255
255
  _context.next = 6;
256
- return NHFetch(baseUrl + '/outer/getCsszByCsbz', 'GET', {
257
- csbz: 'XTGL_TSZF'
256
+ return NHFetch(baseUrl + "/outer/getCsszByCsbz", "GET", {
257
+ csbz: "XTGL_TSZF"
258
258
  });
259
259
 
260
260
  case 6:
@@ -265,7 +265,7 @@ var validateCode = exports.validateCode = function () {
265
265
 
266
266
  specialCharPattern.pattern = data.pattern;
267
267
  specialCharPattern.open = data.open;
268
- sessionStorage.setItem('specialCharPattern', (0, _stringify2.default)({
268
+ sessionStorage.setItem("specialCharPattern", (0, _stringify2.default)({
269
269
  pattern: data.pattern,
270
270
  open: data.open,
271
271
  apiUsed: true
@@ -284,7 +284,7 @@ var validateCode = exports.validateCode = function () {
284
284
  reg = new RegExp(text);
285
285
 
286
286
  if (reg.test(value)) {
287
- callback('您的输入中存在特殊字符' + reg.exec(value)[0]);
287
+ callback("您的输入中存在特殊字符" + reg.exec(value)[0]);
288
288
  } else {
289
289
  callback();
290
290
  }
@@ -293,13 +293,13 @@ var validateCode = exports.validateCode = function () {
293
293
 
294
294
  case 13:
295
295
  _context.prev = 13;
296
- _context.t0 = _context['catch'](0);
296
+ _context.t0 = _context["catch"](0);
297
297
 
298
- console.log('配置的正则表达式有误,请联系管理员!');
298
+ console.log("配置的正则表达式有误,请联系管理员!");
299
299
  callback();
300
300
 
301
301
  case 17:
302
- case 'end':
302
+ case "end":
303
303
  return _context.stop();
304
304
  }
305
305
  }
@@ -313,15 +313,15 @@ var validateCode = exports.validateCode = function () {
313
313
 
314
314
  /** 获取cookie */
315
315
  var getCookie = exports.getCookie = function getCookie(key) {
316
- var name = key + '=';
317
- var ca = document.cookie.split(';');
316
+ var name = key + "=";
317
+ var ca = document.cookie.split(";");
318
318
  for (var i = 0; i < ca.length; i++) {
319
319
  var c = ca[i].trim();
320
320
  if (c.indexOf(name) === 0) {
321
321
  return c.substring(name.length, c.length);
322
322
  }
323
323
  }
324
- return '';
324
+ return "";
325
325
  };
326
326
 
327
327
  /** 设置cookie */
@@ -330,14 +330,14 @@ var setCookie = exports.setCookie = function setCookie(key, value) {
330
330
 
331
331
  var d = new Date();
332
332
  d.setTime(d.getTime() + day * 24 * 60 * 60 * 1000);
333
- var expires = 'expires=' + d.toGMTString();
334
- document.cookie = key + '=' + value + '; ' + expires;
333
+ var expires = "expires=" + d.toGMTString();
334
+ document.cookie = key + "=" + value + "; " + expires;
335
335
  };
336
336
 
337
337
  function loadScript(src) {
338
338
  return new _promise2.default(function (resolve, reject) {
339
- var script = document.createElement('script');
340
- script.type = 'text/javascript';
339
+ var script = document.createElement("script");
340
+ script.type = "text/javascript";
341
341
  script.src = src;
342
342
  script.onload = resolve;
343
343
  script.onerror = reject;
@@ -352,10 +352,10 @@ function loadScript(src) {
352
352
  */
353
353
  function animationFramePolyfill() {
354
354
  var lastTime = 0;
355
- var vendors = ['ms', 'moz', 'webkit', 'o'];
355
+ var vendors = ["ms", "moz", "webkit", "o"];
356
356
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
357
- window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
358
- window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
357
+ window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
358
+ window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"];
359
359
  }
360
360
 
361
361
  if (!window.requestAnimationFrame) {
@@ -380,10 +380,10 @@ function animationFramePolyfill() {
380
380
  // 兼容requestAnimationFrame
381
381
  var compatibleAnimationFrame = exports.compatibleAnimationFrame = function compatibleAnimationFrame() {
382
382
  var lastTime = 0;
383
- var vendors = ['webkit', 'moz'];
383
+ var vendors = ["webkit", "moz"];
384
384
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
385
- window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
386
- window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
385
+ window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
386
+ window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"];
387
387
  }
388
388
 
389
389
  if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback, element) {
@@ -407,13 +407,13 @@ var compatibleAnimationFrame = exports.compatibleAnimationFrame = function compa
407
407
  * @returns
408
408
  */
409
409
  var createScript = exports.createScript = function createScript() {
410
- var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
410
+ var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
411
411
 
412
- var scriptTags = window.document.querySelectorAll('script');
412
+ var scriptTags = window.document.querySelectorAll("script");
413
413
  var len = scriptTags.length;
414
414
  var i = 0;
415
415
  // 截取字符串,去掉可能url是相对路径的
416
- url = url.indexOf('.') === 0 ? url.substr(1) : url;
416
+ url = url.indexOf(".") === 0 ? url.substr(1) : url;
417
417
  var _url = location.origin + url;
418
418
  return new _promise2.default(function (resolve, reject) {
419
419
  var isHas = false;
@@ -426,8 +426,8 @@ var createScript = exports.createScript = function createScript() {
426
426
  }
427
427
  }
428
428
  if (!isHas) {
429
- var node = document.createElement('script');
430
- node.type = 'text/javascript';
429
+ var node = document.createElement("script");
430
+ node.type = "text/javascript";
431
431
  node.src = url;
432
432
  node.onload = resolve;
433
433
  document.body.appendChild(node);
@@ -457,12 +457,12 @@ var getBase64 = exports.getBase64 = function getBase64(file) {
457
457
  var download = exports.download = function download(res) {
458
458
  var blob = new Blob([res.data]);
459
459
  // 提取文件名
460
- var contentDisposition = '';
461
- if (res.headers['content-disposition']) {
462
- contentDisposition = res.headers['content-disposition'];
460
+ var contentDisposition = "";
461
+ if (res.headers["content-disposition"]) {
462
+ contentDisposition = res.headers["content-disposition"];
463
463
  }
464
- if (res.headers['Content-disposition']) {
465
- contentDisposition = res.headers['Content-disposition'];
464
+ if (res.headers["Content-disposition"]) {
465
+ contentDisposition = res.headers["Content-disposition"];
466
466
  }
467
467
  var err = contentDisposition.match(/err=(.*)/);
468
468
  if (err && err[1]) {
@@ -474,20 +474,20 @@ var download = exports.download = function download(res) {
474
474
  return false;
475
475
  }
476
476
  var fileName = fileNameArr[1];
477
- if (typeof window.navigator.msSaveBlob !== 'undefined') {
477
+ if (typeof window.navigator.msSaveBlob !== "undefined") {
478
478
  // 兼容IE,window.navigator.msSaveBlob:以本地方式保存文件
479
479
  window.navigator.msSaveBlob(blob, decodeURI(fileName));
480
480
  } else {
481
481
  // 创建新的URL并指向File对象或者Blob对象的地址
482
482
  var blobURL = window.URL.createObjectURL(blob);
483
483
  // 创建a标签,用于跳转至下载链接
484
- var tempLink = document.createElement('a');
485
- tempLink.style.display = 'none';
484
+ var tempLink = document.createElement("a");
485
+ tempLink.style.display = "none";
486
486
  tempLink.href = blobURL;
487
- tempLink.setAttribute('download', decodeURI(fileName));
487
+ tempLink.setAttribute("download", decodeURI(fileName));
488
488
  // 兼容:某些浏览器不支持HTML5的download属性
489
- if (typeof tempLink.download === 'undefined') {
490
- tempLink.setAttribute('target', '_blank');
489
+ if (typeof tempLink.download === "undefined") {
490
+ tempLink.setAttribute("target", "_blank");
491
491
  }
492
492
  // 挂载a标签
493
493
  document.body.appendChild(tempLink);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlt-for-react",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -77,7 +77,7 @@
77
77
  "jsencrypt": "3.0.0-rc.1",
78
78
  "react": "^16.3.1",
79
79
  "react-color": "^2.19.3",
80
- "react-custom-scrollbars": "^4.2.1",
80
+ "react-custom-scrollbars-patched": "^4.2.1",
81
81
  "react-dom": "^16.3.1",
82
82
  "react-file-viewer": "^1.2.1",
83
83
  "react-pdf-js": "^5.1.0",
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //获取UUID
7
- var createUuid = function createUuid() {
8
- var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
9
- var radix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
10
-
11
- var chars = '0123456789abcdefghijklmnopqrstuvwxyz'.split('');
12
- var uuid = [],
13
- i;
14
- radix = radix || chars.length;
15
-
16
- if (len) {
17
- // Compact form
18
- for (i = 0; i < len; i++) {
19
- uuid[i] = chars[0 | Math.random() * radix];
20
- }
21
- } else {
22
- // rfc4122, version 4 form
23
- var r;
24
-
25
- // rfc4122 requires these characters
26
- uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
27
- uuid[14] = '4';
28
-
29
- // Fill in random data. At i==19 set the high bits of clock sequence as
30
- // per rfc4122, sec. 4.1.5
31
- for (i = 0; i < 36; i++) {
32
- if (!uuid[i]) {
33
- r = 0 | Math.random() * 16;
34
- uuid[i] = chars[i == 19 ? r & 0x3 | 0x8 : r];
35
- }
36
- }
37
- }
38
- return uuid.join('');
39
- };
40
- exports.default = createUuid;
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var getLoginUser = function getLoginUser(auth) {
7
- var loginUser = sessionStorage.getItem('userLogin') ? JSON.parse(sessionStorage.getItem('userLogin')) : { authorization: {}, menus: [] };
8
- return loginUser;
9
- };
10
- exports.default = getLoginUser;
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var getSize = function getSize() {
7
- var setting = sessionStorage.getItem('setting');
8
- var breadcrumbHeight = 0; //面包屑高度
9
- if (setting) {
10
- // 存在布局配置
11
- var _JSON$parse = JSON.parse(setting),
12
- layout = _JSON$parse.layout;
13
-
14
- breadcrumbHeight = layout === 'mixmenu' ? 40 : 0; //若是混合布局 contentH高度需要减去面包屑高度
15
- }
16
- var windowW = void 0,
17
- windowH = void 0,
18
- contentH = void 0,
19
- scrollT = void 0;
20
- windowH = window.innerHeight;
21
- windowW = window.innerWidth;
22
- scrollT = document.documentElement.scrollTop || document.body.scrollTop;
23
- contentH = windowH - 65 - breadcrumbHeight;
24
- return { windowW: windowW, windowH: windowH, contentH: contentH, scrollT: scrollT };
25
- };
26
-
27
- exports.default = getSize;