eoss 0.1.0-alpha.21 → 0.1.0-alpha.22

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 (195) hide show
  1. package/lib/account-login.js +129 -129
  2. package/lib/alert.js +2 -2
  3. package/lib/aside.js +2 -2
  4. package/lib/autocomplete.js +216 -216
  5. package/lib/avatar.js +2 -2
  6. package/lib/backtop.js +2 -2
  7. package/lib/badge.js +2 -2
  8. package/lib/breadcrumb.js +2 -2
  9. package/lib/ca-login.js +6 -6
  10. package/lib/calendar.js +2 -2
  11. package/lib/card.js +2 -2
  12. package/lib/carousel-item.js +21 -21
  13. package/lib/carousel.js +16 -16
  14. package/lib/cascader-panel.js +6 -6
  15. package/lib/cascader.js +230 -230
  16. package/lib/checkbox-group.js +138 -138
  17. package/lib/col.js +2 -2
  18. package/lib/collapse-item.js +423 -410
  19. package/lib/collapse.js +426 -412
  20. package/lib/color-picker.js +23 -23
  21. package/lib/container.js +2 -2
  22. package/lib/cron.js +2 -2
  23. package/lib/data-table.js +123 -123
  24. package/lib/date-picker.js +233 -233
  25. package/lib/dialog.js +8 -8
  26. package/lib/divider.js +2 -2
  27. package/lib/drawer.js +4 -4
  28. package/lib/dropdown-item.js +2 -2
  29. package/lib/dropdown-menu.js +6 -6
  30. package/lib/dropdown.js +13 -13
  31. package/lib/email-login.js +124 -124
  32. package/lib/empty.js +2 -2
  33. package/lib/eoss.common.js +21948 -21788
  34. package/lib/flip.js +2 -2
  35. package/lib/flow-group.js +251 -251
  36. package/lib/flow.js +15934 -18947
  37. package/lib/flows.js +9195 -0
  38. package/lib/footer.js +2 -2
  39. package/lib/form-item.js +28 -17
  40. package/lib/form.js +426 -412
  41. package/lib/header.js +2 -2
  42. package/lib/icon.js +128 -128
  43. package/lib/icons.js +2 -2
  44. package/lib/image-viewer.js +6 -6
  45. package/lib/image.js +2 -2
  46. package/lib/index.js +1 -1
  47. package/lib/infinite-scroll.js +2 -2
  48. package/lib/input.js +4 -4
  49. package/lib/link.js +2 -2
  50. package/lib/loading.js +4 -4
  51. package/lib/login.js +190 -156
  52. package/lib/lowcode.js +562 -272
  53. package/lib/main.js +348 -282
  54. package/lib/marquee.js +6 -6
  55. package/lib/menu.js +209 -209
  56. package/lib/message-box.js +8 -8
  57. package/lib/message.js +8 -8
  58. package/lib/notification.js +8 -8
  59. package/lib/option-group.js +2 -2
  60. package/lib/option.js +4 -4
  61. package/lib/page-header.js +2 -2
  62. package/lib/pagination.js +6 -6
  63. package/lib/phone-login.js +124 -124
  64. package/lib/popconfirm.js +2 -2
  65. package/lib/popover.js +209 -209
  66. package/lib/progress.js +2 -2
  67. package/lib/qr-code.js +2 -2
  68. package/lib/qrcode-login.js +123 -123
  69. package/lib/radio-group.js +121 -121
  70. package/lib/rate.js +4 -4
  71. package/lib/row.js +2 -2
  72. package/lib/scrollbar.js +6 -6
  73. package/lib/select.js +470 -457
  74. package/lib/selector-panel.js +141 -141
  75. package/lib/selector.js +130 -130
  76. package/lib/step.js +426 -412
  77. package/lib/steps.js +6 -6
  78. package/lib/submenu.js +4 -4
  79. package/lib/switch.js +4 -4
  80. package/lib/tab-pane.js +2 -2
  81. package/lib/table-column.js +6 -6
  82. package/lib/table.js +460 -460
  83. package/lib/tabs.js +6 -6
  84. package/lib/tag.js +2 -2
  85. package/lib/theme-chalk/autocomplete.css +1 -1
  86. package/lib/theme-chalk/base.css +1 -1
  87. package/lib/theme-chalk/cascader-panel.css +1 -1
  88. package/lib/theme-chalk/cascader.css +1 -1
  89. package/lib/theme-chalk/checkbox-group.css +1 -1
  90. package/lib/theme-chalk/date-picker.css +1 -1
  91. package/lib/theme-chalk/descriptions-item.css +1 -1
  92. package/lib/theme-chalk/descriptions.css +1 -1
  93. package/lib/theme-chalk/empty.css +1 -1
  94. package/lib/theme-chalk/flow.css +1 -1
  95. package/lib/theme-chalk/flows.css +1 -0
  96. package/lib/theme-chalk/form.css +1 -1
  97. package/lib/theme-chalk/index.css +1 -1
  98. package/lib/theme-chalk/input-number.css +1 -1
  99. package/lib/theme-chalk/input.css +1 -1
  100. package/lib/theme-chalk/lowcode.css +1 -1
  101. package/lib/theme-chalk/main.css +1 -1
  102. package/lib/theme-chalk/menu.css +1 -1
  103. package/lib/theme-chalk/message-box.css +1 -1
  104. package/lib/theme-chalk/message.css +1 -1
  105. package/lib/theme-chalk/notification.css +1 -1
  106. package/lib/theme-chalk/pagination.css +1 -1
  107. package/lib/theme-chalk/scrollbar.css +1 -1
  108. package/lib/theme-chalk/select.css +1 -1
  109. package/lib/theme-chalk/selector-panel.css +1 -1
  110. package/lib/theme-chalk/selector.css +1 -1
  111. package/lib/theme-chalk/slider.css +1 -1
  112. package/lib/theme-chalk/table.css +1 -1
  113. package/lib/theme-chalk/tabs.css +1 -1
  114. package/lib/theme-chalk/time-picker.css +1 -1
  115. package/lib/theme-chalk/time-select.css +1 -1
  116. package/lib/theme-chalk/timeline-item.css +1 -1
  117. package/lib/theme-chalk/transfer.css +1 -1
  118. package/lib/theme-chalk/tree.css +1 -1
  119. package/lib/theme-chalk/upload.css +1 -1
  120. package/lib/time-picker.js +8 -8
  121. package/lib/time-select.js +6 -6
  122. package/lib/timeline-item.js +2 -2
  123. package/lib/timeline.js +2 -2
  124. package/lib/tips.js +124 -124
  125. package/lib/toolbar.js +4 -4
  126. package/lib/tooltip.js +209 -209
  127. package/lib/transfer.js +4 -4
  128. package/lib/tree-group.js +122 -122
  129. package/lib/tree.js +121 -121
  130. package/lib/upload.js +131 -131
  131. package/package.json +1 -1
  132. package/packages/carousel/src/carousel.vue +2 -2
  133. package/packages/flow/index.js +4 -4
  134. package/packages/flow/src/component/FreeCirculation.vue +4 -3
  135. package/packages/flow/src/component/SendMsg.vue +2 -4
  136. package/packages/flow/src/component/opinions.vue +203 -226
  137. package/packages/flow/src/component/taskUnionExamine.vue +2 -4
  138. package/packages/flow/src/freeStartFlow.vue +2 -2
  139. package/packages/flow/src/selectUser.vue +36 -1
  140. package/packages/flow/src/supervise.vue +4 -2
  141. package/packages/flows/index.js +7 -0
  142. package/packages/flows/readme.md +600 -0
  143. package/packages/flows/src/components/basis.vue +108 -0
  144. package/packages/flows/src/components/distribute.vue +42 -0
  145. package/packages/flows/src/components/opinions-file.vue +123 -0
  146. package/packages/{flow-copy/src/component → flows/src/components}/opinions.vue +227 -204
  147. package/packages/flows/src/components/quick-actions.vue +64 -0
  148. package/packages/flows/src/components/reject.vue +83 -0
  149. package/packages/flows/src/components/start-flow.vue +210 -0
  150. package/packages/flows/src/flow.vue +510 -0
  151. package/packages/{flow/src/flow.vue → flows/src/flows.vue} +40 -1327
  152. package/packages/form/src/form-item.vue +9 -2
  153. package/packages/form/src/label-wrap.vue +4 -1
  154. package/packages/login/src/login.vue +61 -32
  155. package/packages/lowcode/src/lowcode.vue +141 -40
  156. package/packages/lowcode/src/pages.vue +27 -7
  157. package/packages/lowcode/src/toolbar.vue +3 -18
  158. package/packages/main/src/components/pages.vue +97 -65
  159. package/packages/main/src/components/router-page.vue +0 -2
  160. package/packages/main/src/gzw.vue +3 -2
  161. package/packages/main/src/minxs.js +71 -51
  162. package/packages/select/src/select.vue +5 -0
  163. package/packages/theme-chalk/src/base.scss +6 -0
  164. package/packages/theme-chalk/src/checkbox-group.scss +1 -0
  165. package/packages/theme-chalk/src/common/var.scss +1 -1
  166. package/packages/theme-chalk/src/flow.scss +7 -4
  167. package/packages/theme-chalk/src/flows.scss +141 -0
  168. package/packages/theme-chalk/src/form.scss +1 -1
  169. package/packages/theme-chalk/src/index.scss +1 -0
  170. package/packages/theme-chalk/src/input.scss +1 -0
  171. package/packages/theme-chalk/src/select.scss +3 -1
  172. package/packages/theme-chalk/src/selector.scss +1 -1
  173. package/src/index.js +4 -1
  174. package/packages/flow/src/component/quick-actions.vue +0 -1168
  175. package/packages/flow-copy/index.js +0 -7
  176. package/packages/flow-copy/src/component/Circulate.vue +0 -452
  177. package/packages/flow-copy/src/component/CustomPreset.vue +0 -333
  178. package/packages/flow-copy/src/component/FreeCirculation.vue +0 -275
  179. package/packages/flow-copy/src/component/Preset.vue +0 -273
  180. package/packages/flow-copy/src/component/SendMsg.vue +0 -290
  181. package/packages/flow-copy/src/component/TimeLimit.vue +0 -205
  182. package/packages/flow-copy/src/component/taskUnionExamine.vue +0 -818
  183. package/packages/flow-copy/src/freeStartFlow.vue +0 -2912
  184. package/packages/flow-copy/src/processForm.vue +0 -1411
  185. package/packages/flow-copy/src/processReject.vue +0 -319
  186. package/packages/flow-copy/src/reset.vue +0 -944
  187. package/packages/flow-copy/src/selectUser.vue +0 -513
  188. package/packages/flow-copy/src/startTaskRead.vue +0 -723
  189. package/packages/flow-copy/src/supervise.vue +0 -182
  190. package/packages/flow-copy/src/table.vue +0 -65
  191. /package/packages/{flow-copy → flow}/src/component/FileList.vue +0 -0
  192. /package/packages/{flow-copy → flow}/src/main.vue +0 -0
  193. /package/packages/{flow-copy/src → flows/src/components}/form.vue +0 -0
  194. /package/packages/{flow/src/component → flows/src/components}/message.vue +0 -0
  195. /package/packages/{flow/src/component → flows/src/components}/opinions-list.vue +0 -0
package/lib/flip.js CHANGED
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 198);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 199);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 198:
90
+ /***/ 199:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
package/lib/flow-group.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 199);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 200);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -191,7 +191,7 @@ module.exports =
191
191
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return warning; });
192
192
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
193
193
  /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
194
- /* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
194
+ /* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
195
195
  /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
196
196
  /* harmony import */ var _storage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
197
197
  /* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
@@ -2143,7 +2143,7 @@ var loadJs = function loadJs(url, callback) {
2143
2143
  var loading = function loading() {
2144
2144
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '请求中...';
2145
2145
 
2146
- var Loading = __webpack_require__(19).default;
2146
+ var Loading = __webpack_require__(18).default;
2147
2147
  return Loading.service({
2148
2148
  text: text,
2149
2149
  spinner: 'es-icon-jiazai',
@@ -3997,7 +3997,7 @@ const timeCycle = function (time) {
3997
3997
 
3998
3998
  /***/ }),
3999
3999
 
4000
- /***/ 13:
4000
+ /***/ 12:
4001
4001
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4002
4002
 
4003
4003
  "use strict";
@@ -4198,14 +4198,259 @@ var getRgb = function getRgb($color) {
4198
4198
 
4199
4199
  /***/ }),
4200
4200
 
4201
- /***/ 19:
4201
+ /***/ 18:
4202
4202
  /***/ (function(module, exports) {
4203
4203
 
4204
4204
  module.exports = require("eoss/lib/loading");
4205
4205
 
4206
4206
  /***/ }),
4207
4207
 
4208
- /***/ 199:
4208
+ /***/ 2:
4209
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4210
+
4211
+ "use strict";
4212
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setStorage; });
4213
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getStorage; });
4214
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeStorage; });
4215
+ /* unused harmony export setCookie */
4216
+ /* unused harmony export getCookie */
4217
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4218
+
4219
+ /**
4220
+ * setStorage
4221
+ * @desc:设置本地储存数据
4222
+ * @author huangbo
4223
+ * @date 2022年5月7日
4224
+ * @param {String|Object} [key] - 数据的名称或包含type、key、value的对象
4225
+ * @param {String} [value] - 数据的值(当第一个参数为字符串时使用)
4226
+ **/
4227
+ var setStorage = function setStorage(key, value) {
4228
+ // 解析参数,支持两种调用方式:setStorage(key, value) 和 setStorage({type, key, value})
4229
+ var type = void 0,
4230
+ finalKey = void 0,
4231
+ finalValue = void 0;
4232
+
4233
+ if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object' && key !== null) {
4234
+ // 对象调用方式:setStorage({type, key, value})
4235
+ type = key.type;
4236
+ finalKey = key.key;
4237
+ finalValue = key.value;
4238
+ } else {
4239
+ // 字符串调用方式:setStorage(key, value)
4240
+ type = getStorage('storageType');
4241
+ finalKey = key;
4242
+ finalValue = value;
4243
+ }
4244
+
4245
+ // 使用默认存储类型如果未指定
4246
+ type = type || getStorage('storageType');
4247
+
4248
+ // 获取存储对象
4249
+ var storage = type === 'localStorage' ? localStorage : sessionStorage;
4250
+
4251
+ // 处理不同类型的key
4252
+ if (typeof finalKey === 'string') {
4253
+ // 单个字符串key
4254
+ var storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
4255
+ storage.setItem(finalKey, storedValue);
4256
+ if (finalKey === 'token') {
4257
+ setCookie('token', storedValue);
4258
+ }
4259
+ } else if (Array.isArray(finalKey)) {
4260
+ // 数组key,为多个key设置同一个value
4261
+ var _storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
4262
+ for (var i = 0; i < finalKey.length; i++) {
4263
+ storage.setItem(finalKey[i], _storedValue);
4264
+ if (finalKey[i] === 'token') {
4265
+ setCookie('token', _storedValue);
4266
+ }
4267
+ }
4268
+ } else if ((typeof finalKey === 'undefined' ? 'undefined' : _typeof(finalKey)) === 'object' && finalKey !== null) {
4269
+ // 对象key,对象的属性名称作为key,属性值作为value
4270
+ for (var k in finalKey) {
4271
+ if (Object.prototype.hasOwnProperty.call(finalKey, k)) {
4272
+ var _storedValue2 = _typeof(finalKey[k]) === 'object' ? JSON.stringify(finalKey[k]) : finalKey[k];
4273
+ storage.setItem(k, _storedValue2);
4274
+ if (k === 'token') {
4275
+ setCookie('token', _storedValue2);
4276
+ }
4277
+ }
4278
+ }
4279
+ }
4280
+ };
4281
+
4282
+ /**
4283
+ * getStorage
4284
+ * @desc:获取本地储存数据
4285
+ * @author huangbo
4286
+ * @date 2022年5月7日
4287
+ * @param {String} [key] - 获取的名称
4288
+ **/
4289
+ var getStorage = function getStorage(key) {
4290
+ if (key) {
4291
+ var res = sessionStorage.getItem(key) || localStorage.getItem(key);
4292
+ if (!res && key === 'token') {
4293
+ res = getCookie('token');
4294
+ }
4295
+ if (key === 'host' && !res) {
4296
+ res = '';
4297
+ }
4298
+ return res;
4299
+ }
4300
+ var defaults = {};
4301
+ var token = sessionStorage.getItem('token') || localStorage.getItem('token') || getCookie('token');
4302
+ var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || getCookie('ssId');
4303
+
4304
+ var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || getCookie('deviceUnique');
4305
+ if (token) {
4306
+ defaults.Authorization = token;
4307
+ }
4308
+ if (ssId) {
4309
+ defaults.ssId = ssId;
4310
+ }
4311
+ if (deviceUnique) {
4312
+ defaults.deviceUnique = deviceUnique;
4313
+ }
4314
+ return defaults;
4315
+ };
4316
+
4317
+ /**
4318
+ * removeStorage
4319
+ * @desc:删除本地储存数据
4320
+ * @author huangbo
4321
+ * @date 2022年5月7日
4322
+ * @param {String, Array} [key] - 获取的名称
4323
+ **/
4324
+ var removeStorage = function removeStorage(key) {
4325
+ if (Array.isArray(key)) {
4326
+ for (var i = 0; i < key.length; i++) {
4327
+ sessionStorage.removeItem(key[i]);
4328
+ localStorage.removeItem(key[i]);
4329
+ if (key[i] === 'token') {
4330
+ removeCookie('token');
4331
+ }
4332
+ }
4333
+ } else if (key) {
4334
+ sessionStorage.removeItem(key);
4335
+ localStorage.removeItem(key);
4336
+ if (key === 'token') {
4337
+ removeCookie('token');
4338
+ }
4339
+ } else {
4340
+ sessionStorage.clear();
4341
+ localStorage.clear();
4342
+ removeCookie('token');
4343
+ }
4344
+ };
4345
+
4346
+ /**
4347
+ * setCookie
4348
+ * @desc 设置cookie
4349
+ * @author huangbo
4350
+ * @param {string} [name] cookie名称
4351
+ * @param {string} [value] cookie值
4352
+ * @param {boolean} [isSession] 是否是会话cookie
4353
+ **/
4354
+ var setCookie = function setCookie(name, value) {
4355
+ var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
4356
+ var time = arguments[3];
4357
+
4358
+ try {
4359
+ var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
4360
+ ];
4361
+ // 会话/持久Cookie设置
4362
+ if (!isSession) {
4363
+ if (/MSIE|Trident/.test(navigator.userAgent)) {
4364
+ // IE使用expires
4365
+ var date = new Date();
4366
+ date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
4367
+ cookieParts.push('expires=' + date.toUTCString());
4368
+ } else {
4369
+ // 其他浏览器使用max-age
4370
+ cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
4371
+ }
4372
+ }
4373
+ // 内核兼容处理
4374
+ if (/MSIE|Trident/.test(navigator.userAgent)) {
4375
+ // IE特殊处理:添加P3P协议头
4376
+ cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
4377
+ } else {
4378
+ // 现代浏览器设置
4379
+ cookieParts.push('samesite=lax');
4380
+ if (window.location.protocol === 'https:') {
4381
+ cookieParts.push('secure');
4382
+ }
4383
+ }
4384
+
4385
+ // 设置Cookie
4386
+ document.cookie = cookieParts.join('; ');
4387
+ return true;
4388
+ } catch (e) {
4389
+ console.error('Cookie设置失败:', e);
4390
+ return false;
4391
+ }
4392
+ };
4393
+
4394
+ /**
4395
+ * getCookie
4396
+ * @desc 获取cookie中指定名称的值
4397
+ * @author huangbo
4398
+ * @param {string} [name] cookie名称
4399
+ **/
4400
+ var getCookie = function getCookie(name) {
4401
+ var cookies = document.cookie.split(';');
4402
+ for (var _iterator = cookies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
4403
+ var _ref;
4404
+
4405
+ if (_isArray) {
4406
+ if (_i >= _iterator.length) break;
4407
+ _ref = _iterator[_i++];
4408
+ } else {
4409
+ _i = _iterator.next();
4410
+ if (_i.done) break;
4411
+ _ref = _i.value;
4412
+ }
4413
+
4414
+ var cookie = _ref;
4415
+
4416
+ var _cookie$trim$split = cookie.trim().split('='),
4417
+ cookieName = _cookie$trim$split[0],
4418
+ cookieValue = _cookie$trim$split[1];
4419
+
4420
+ if (decodeURIComponent(cookieName) === name) {
4421
+ return decodeURIComponent(cookieValue);
4422
+ }
4423
+ }
4424
+ return null;
4425
+ };
4426
+
4427
+ /**
4428
+ * removeCookie
4429
+ * @desc:删除cookie
4430
+ * @author huangbo
4431
+ * @date 2022年5月7日
4432
+ * @param {String, Array} [key] - 获取的名称
4433
+ **/
4434
+ var removeCookie = function removeCookie(key) {
4435
+ if (Array.isArray(key)) {
4436
+ for (var i = 0; i < key.length; i++) {
4437
+ document.cookie = encodeURIComponent(key[i]) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
4438
+ }
4439
+ } else {
4440
+ document.cookie = encodeURIComponent(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
4441
+ }
4442
+ };
4443
+
4444
+ /***/ }),
4445
+
4446
+ /***/ 20:
4447
+ /***/ (function(module, exports) {
4448
+
4449
+ module.exports = require("lodash/get");
4450
+
4451
+ /***/ }),
4452
+
4453
+ /***/ 200:
4209
4454
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4210
4455
 
4211
4456
  "use strict";
@@ -6305,251 +6550,6 @@ main.install = function (Vue) {
6305
6550
 
6306
6551
  /***/ }),
6307
6552
 
6308
- /***/ 2:
6309
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6310
-
6311
- "use strict";
6312
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return setStorage; });
6313
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getStorage; });
6314
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return removeStorage; });
6315
- /* unused harmony export setCookie */
6316
- /* unused harmony export getCookie */
6317
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
6318
-
6319
- /**
6320
- * setStorage
6321
- * @desc:设置本地储存数据
6322
- * @author huangbo
6323
- * @date 2022年5月7日
6324
- * @param {String|Object} [key] - 数据的名称或包含type、key、value的对象
6325
- * @param {String} [value] - 数据的值(当第一个参数为字符串时使用)
6326
- **/
6327
- var setStorage = function setStorage(key, value) {
6328
- // 解析参数,支持两种调用方式:setStorage(key, value) 和 setStorage({type, key, value})
6329
- var type = void 0,
6330
- finalKey = void 0,
6331
- finalValue = void 0;
6332
-
6333
- if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object' && key !== null) {
6334
- // 对象调用方式:setStorage({type, key, value})
6335
- type = key.type;
6336
- finalKey = key.key;
6337
- finalValue = key.value;
6338
- } else {
6339
- // 字符串调用方式:setStorage(key, value)
6340
- type = getStorage('storageType');
6341
- finalKey = key;
6342
- finalValue = value;
6343
- }
6344
-
6345
- // 使用默认存储类型如果未指定
6346
- type = type || getStorage('storageType');
6347
-
6348
- // 获取存储对象
6349
- var storage = type === 'localStorage' ? localStorage : sessionStorage;
6350
-
6351
- // 处理不同类型的key
6352
- if (typeof finalKey === 'string') {
6353
- // 单个字符串key
6354
- var storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
6355
- storage.setItem(finalKey, storedValue);
6356
- if (finalKey === 'token') {
6357
- setCookie('token', storedValue);
6358
- }
6359
- } else if (Array.isArray(finalKey)) {
6360
- // 数组key,为多个key设置同一个value
6361
- var _storedValue = (typeof finalValue === 'undefined' ? 'undefined' : _typeof(finalValue)) === 'object' ? JSON.stringify(finalValue) : finalValue;
6362
- for (var i = 0; i < finalKey.length; i++) {
6363
- storage.setItem(finalKey[i], _storedValue);
6364
- if (finalKey[i] === 'token') {
6365
- setCookie('token', _storedValue);
6366
- }
6367
- }
6368
- } else if ((typeof finalKey === 'undefined' ? 'undefined' : _typeof(finalKey)) === 'object' && finalKey !== null) {
6369
- // 对象key,对象的属性名称作为key,属性值作为value
6370
- for (var k in finalKey) {
6371
- if (Object.prototype.hasOwnProperty.call(finalKey, k)) {
6372
- var _storedValue2 = _typeof(finalKey[k]) === 'object' ? JSON.stringify(finalKey[k]) : finalKey[k];
6373
- storage.setItem(k, _storedValue2);
6374
- if (k === 'token') {
6375
- setCookie('token', _storedValue2);
6376
- }
6377
- }
6378
- }
6379
- }
6380
- };
6381
-
6382
- /**
6383
- * getStorage
6384
- * @desc:获取本地储存数据
6385
- * @author huangbo
6386
- * @date 2022年5月7日
6387
- * @param {String} [key] - 获取的名称
6388
- **/
6389
- var getStorage = function getStorage(key) {
6390
- if (key) {
6391
- var res = sessionStorage.getItem(key) || localStorage.getItem(key);
6392
- if (!res && key === 'token') {
6393
- res = getCookie('token');
6394
- }
6395
- if (key === 'host' && !res) {
6396
- res = '';
6397
- }
6398
- return res;
6399
- }
6400
- var defaults = {};
6401
- var token = sessionStorage.getItem('token') || localStorage.getItem('token') || getCookie('token');
6402
- var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || getCookie('ssId');
6403
-
6404
- var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || getCookie('deviceUnique');
6405
- if (token) {
6406
- defaults.Authorization = token;
6407
- }
6408
- if (ssId) {
6409
- defaults.ssId = ssId;
6410
- }
6411
- if (deviceUnique) {
6412
- defaults.deviceUnique = deviceUnique;
6413
- }
6414
- return defaults;
6415
- };
6416
-
6417
- /**
6418
- * removeStorage
6419
- * @desc:删除本地储存数据
6420
- * @author huangbo
6421
- * @date 2022年5月7日
6422
- * @param {String, Array} [key] - 获取的名称
6423
- **/
6424
- var removeStorage = function removeStorage(key) {
6425
- if (Array.isArray(key)) {
6426
- for (var i = 0; i < key.length; i++) {
6427
- sessionStorage.removeItem(key[i]);
6428
- localStorage.removeItem(key[i]);
6429
- if (key[i] === 'token') {
6430
- removeCookie('token');
6431
- }
6432
- }
6433
- } else if (key) {
6434
- sessionStorage.removeItem(key);
6435
- localStorage.removeItem(key);
6436
- if (key === 'token') {
6437
- removeCookie('token');
6438
- }
6439
- } else {
6440
- sessionStorage.clear();
6441
- localStorage.clear();
6442
- removeCookie('token');
6443
- }
6444
- };
6445
-
6446
- /**
6447
- * setCookie
6448
- * @desc 设置cookie
6449
- * @author huangbo
6450
- * @param {string} [name] cookie名称
6451
- * @param {string} [value] cookie值
6452
- * @param {boolean} [isSession] 是否是会话cookie
6453
- **/
6454
- var setCookie = function setCookie(name, value) {
6455
- var isSession = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
6456
- var time = arguments[3];
6457
-
6458
- try {
6459
- var cookieParts = [encodeURIComponent(name) + '=' + encodeURIComponent(value), 'path=/' // 仅保留path设置,确保全站访问
6460
- ];
6461
- // 会话/持久Cookie设置
6462
- if (!isSession) {
6463
- if (/MSIE|Trident/.test(navigator.userAgent)) {
6464
- // IE使用expires
6465
- var date = new Date();
6466
- date.setTime(date.getTime() + (time || 7 * 24 * 60 * 60 * 1000));
6467
- cookieParts.push('expires=' + date.toUTCString());
6468
- } else {
6469
- // 其他浏览器使用max-age
6470
- cookieParts.push('max-age=' + (time || 7 * 24 * 60 * 60));
6471
- }
6472
- }
6473
- // 内核兼容处理
6474
- if (/MSIE|Trident/.test(navigator.userAgent)) {
6475
- // IE特殊处理:添加P3P协议头
6476
- cookieParts.push('P3P=CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
6477
- } else {
6478
- // 现代浏览器设置
6479
- cookieParts.push('samesite=lax');
6480
- if (window.location.protocol === 'https:') {
6481
- cookieParts.push('secure');
6482
- }
6483
- }
6484
-
6485
- // 设置Cookie
6486
- document.cookie = cookieParts.join('; ');
6487
- return true;
6488
- } catch (e) {
6489
- console.error('Cookie设置失败:', e);
6490
- return false;
6491
- }
6492
- };
6493
-
6494
- /**
6495
- * getCookie
6496
- * @desc 获取cookie中指定名称的值
6497
- * @author huangbo
6498
- * @param {string} [name] cookie名称
6499
- **/
6500
- var getCookie = function getCookie(name) {
6501
- var cookies = document.cookie.split(';');
6502
- for (var _iterator = cookies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
6503
- var _ref;
6504
-
6505
- if (_isArray) {
6506
- if (_i >= _iterator.length) break;
6507
- _ref = _iterator[_i++];
6508
- } else {
6509
- _i = _iterator.next();
6510
- if (_i.done) break;
6511
- _ref = _i.value;
6512
- }
6513
-
6514
- var cookie = _ref;
6515
-
6516
- var _cookie$trim$split = cookie.trim().split('='),
6517
- cookieName = _cookie$trim$split[0],
6518
- cookieValue = _cookie$trim$split[1];
6519
-
6520
- if (decodeURIComponent(cookieName) === name) {
6521
- return decodeURIComponent(cookieValue);
6522
- }
6523
- }
6524
- return null;
6525
- };
6526
-
6527
- /**
6528
- * removeCookie
6529
- * @desc:删除cookie
6530
- * @author huangbo
6531
- * @date 2022年5月7日
6532
- * @param {String, Array} [key] - 获取的名称
6533
- **/
6534
- var removeCookie = function removeCookie(key) {
6535
- if (Array.isArray(key)) {
6536
- for (var i = 0; i < key.length; i++) {
6537
- document.cookie = encodeURIComponent(key[i]) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
6538
- }
6539
- } else {
6540
- document.cookie = encodeURIComponent(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
6541
- }
6542
- };
6543
-
6544
- /***/ }),
6545
-
6546
- /***/ 20:
6547
- /***/ (function(module, exports) {
6548
-
6549
- module.exports = require("lodash/get");
6550
-
6551
- /***/ }),
6552
-
6553
6553
  /***/ 21:
6554
6554
  /***/ (function(module, exports) {
6555
6555