eoss 0.1.0-alpha.21 → 0.1.0-alpha.23
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/lib/account-login.js +125 -125
- package/lib/alert.js +2 -2
- package/lib/aside.js +2 -2
- package/lib/autocomplete.js +239 -239
- package/lib/avatar.js +2 -2
- package/lib/backtop.js +4 -4
- package/lib/badge.js +2 -2
- package/lib/breadcrumb-item.js +2 -2
- package/lib/breadcrumb.js +2 -2
- package/lib/button-group.js +2 -2
- package/lib/button.js +2 -2
- package/lib/ca-login.js +6 -6
- package/lib/calendar.js +2 -2
- package/lib/card.js +2 -2
- package/lib/carousel-item.js +22 -22
- package/lib/carousel.js +40 -26
- package/lib/cascader-panel.js +12 -12
- package/lib/cascader.js +506 -492
- package/lib/checkbox-button.js +2 -2
- package/lib/checkbox-group.js +137 -137
- package/lib/checkbox.js +2 -2
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +1224 -1030
- package/lib/collapse.js +1225 -1030
- package/lib/color-picker.js +12 -12
- package/lib/container.js +2 -2
- package/lib/cron.js +2 -2
- package/lib/data-table.js +121 -121
- package/lib/date-picker.js +225 -225
- package/lib/dialog.js +17 -17
- package/lib/divider.js +2 -2
- package/lib/drawer.js +6 -6
- package/lib/dropdown-item.js +2 -2
- package/lib/dropdown-menu.js +10 -10
- package/lib/dropdown.js +13 -13
- package/lib/email-login.js +365 -365
- package/lib/empty.js +2 -2
- package/lib/eoss.common.js +21402 -20724
- package/lib/flip.js +2 -2
- package/lib/flow-group.js +251 -251
- package/lib/flow.js +15933 -18946
- package/lib/flows.js +9195 -0
- package/lib/footer.js +2 -2
- package/lib/form-item.js +28 -17
- package/lib/form.js +1228 -1033
- package/lib/header.js +2 -2
- package/lib/icon.js +129 -129
- package/lib/icons.js +4 -4
- package/lib/image-viewer.js +6 -6
- package/lib/image.js +4 -4
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +4 -4
- package/lib/input-number.js +11 -11
- package/lib/input.js +28 -14
- package/lib/link.js +2 -2
- package/lib/loading.js +6 -6
- package/lib/login.js +277 -229
- package/lib/lowcode.js +964 -325
- package/lib/main.js +634 -565
- package/lib/marquee.js +6 -6
- package/lib/menu-item-group.js +2 -2
- package/lib/menu-item.js +2 -2
- package/lib/menu.js +1934 -1934
- package/lib/message-box.js +12 -12
- package/lib/message.js +10 -10
- package/lib/notification.js +16 -16
- package/lib/option-group.js +2 -2
- package/lib/option.js +6 -6
- package/lib/page-header.js +2 -2
- package/lib/pagination.js +16 -16
- package/lib/phone-login.js +127 -127
- package/lib/popconfirm.js +4 -4
- package/lib/popover.js +219 -219
- package/lib/progress.js +2 -2
- package/lib/qr-code.js +8 -8
- package/lib/qrcode-login.js +119 -119
- package/lib/radio-button.js +2 -2
- package/lib/radio-group.js +119 -119
- package/lib/radio.js +2 -2
- package/lib/rate.js +6 -6
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +46 -32
- package/lib/select.js +823 -796
- package/lib/selector-panel.js +141 -141
- package/lib/selector.js +1040 -160
- package/lib/slider.js +2 -2
- package/lib/step.js +1225 -1030
- package/lib/steps.js +6 -6
- package/lib/submenu.js +27 -27
- package/lib/switch.js +15 -15
- package/lib/tab-pane.js +2 -2
- package/lib/table-column.js +8 -8
- package/lib/table.js +2530 -2516
- package/lib/tabs.js +28 -14
- package/lib/tag.js +2 -2
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/cascader-panel.css +1 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/checkbox-group.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/descriptions-item.css +1 -1
- package/lib/theme-chalk/descriptions.css +1 -1
- package/lib/theme-chalk/empty.css +1 -1
- package/lib/theme-chalk/flow.css +1 -1
- package/lib/theme-chalk/flows.css +1 -0
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/input-number.css +1 -1
- package/lib/theme-chalk/input.css +1 -1
- package/lib/theme-chalk/lowcode.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/message-box.css +1 -1
- package/lib/theme-chalk/message.css +1 -1
- package/lib/theme-chalk/notification.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/scrollbar.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/selector-panel.css +1 -1
- package/lib/theme-chalk/selector.css +1 -1
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/tabs.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/time-select.css +1 -1
- package/lib/theme-chalk/timeline-item.css +1 -1
- package/lib/theme-chalk/transfer.css +1 -1
- package/lib/theme-chalk/tree.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/time-picker.js +16 -16
- package/lib/time-select.js +15 -15
- package/lib/timeline-item.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tips.js +129 -129
- package/lib/toolbar.js +4 -4
- package/lib/tooltip.js +220 -220
- package/lib/transfer.js +8 -8
- package/lib/tree-group.js +124 -124
- package/lib/tree.js +144 -144
- package/lib/upload.js +155 -155
- package/lib/utils/resize-event.js +20 -6
- package/package.json +3 -1
- package/packages/carousel/src/carousel.vue +2 -2
- package/packages/flow/index.js +4 -4
- package/packages/flow/src/component/FreeCirculation.vue +4 -3
- package/packages/flow/src/component/SendMsg.vue +2 -4
- package/packages/flow/src/component/opinions.vue +203 -226
- package/packages/flow/src/component/taskUnionExamine.vue +2 -4
- package/packages/flow/src/freeStartFlow.vue +2 -2
- package/packages/flow/src/selectUser.vue +36 -1
- package/packages/flow/src/supervise.vue +4 -2
- package/packages/flows/index.js +7 -0
- package/packages/flows/readme.md +600 -0
- package/packages/flows/src/components/basis.vue +108 -0
- package/packages/flows/src/components/distribute.vue +42 -0
- package/packages/flows/src/components/opinions-file.vue +123 -0
- package/packages/{flow-copy/src/component → flows/src/components}/opinions.vue +227 -204
- package/packages/flows/src/components/quick-actions.vue +64 -0
- package/packages/flows/src/components/reject.vue +83 -0
- package/packages/flows/src/components/start-flow.vue +210 -0
- package/packages/flows/src/flow.vue +510 -0
- package/packages/{flow/src/flow.vue → flows/src/flows.vue} +40 -1327
- package/packages/form/src/form-item.vue +9 -2
- package/packages/form/src/label-wrap.vue +4 -1
- package/packages/login/src/login.vue +61 -32
- package/packages/lowcode/src/aside.vue +15 -2
- package/packages/lowcode/src/editor.vue +187 -0
- package/packages/lowcode/src/lowcode.vue +195 -41
- package/packages/lowcode/src/pages.vue +174 -26
- package/packages/lowcode/src/toolbar.vue +3 -18
- package/packages/main/src/components/pages.vue +97 -65
- package/packages/main/src/components/router-page.vue +0 -2
- package/packages/main/src/gzw.vue +3 -2
- package/packages/main/src/minxs.js +72 -51
- package/packages/menu/src/menu.vue +4 -4
- package/packages/select/src/select.vue +5 -0
- package/packages/selector/src/selector.vue +147 -17
- package/packages/theme-chalk/src/base.scss +6 -0
- package/packages/theme-chalk/src/checkbox-group.scss +1 -0
- package/packages/theme-chalk/src/common/var.scss +1 -1
- package/packages/theme-chalk/src/flow.scss +7 -4
- package/packages/theme-chalk/src/flows.scss +141 -0
- package/packages/theme-chalk/src/form.scss +1 -1
- package/packages/theme-chalk/src/index.scss +1 -0
- package/packages/theme-chalk/src/input.scss +1 -0
- package/packages/theme-chalk/src/lowcode.scss +21 -18
- package/packages/theme-chalk/src/select.scss +3 -1
- package/packages/theme-chalk/src/selector.scss +11 -5
- package/src/index.js +4 -1
- package/src/utils/resize-event.js +21 -7
- package/packages/flow/src/component/quick-actions.vue +0 -1168
- package/packages/flow-copy/index.js +0 -7
- package/packages/flow-copy/src/component/Circulate.vue +0 -452
- package/packages/flow-copy/src/component/CustomPreset.vue +0 -333
- package/packages/flow-copy/src/component/FreeCirculation.vue +0 -275
- package/packages/flow-copy/src/component/Preset.vue +0 -273
- package/packages/flow-copy/src/component/SendMsg.vue +0 -290
- package/packages/flow-copy/src/component/TimeLimit.vue +0 -205
- package/packages/flow-copy/src/component/taskUnionExamine.vue +0 -818
- package/packages/flow-copy/src/freeStartFlow.vue +0 -2912
- package/packages/flow-copy/src/processForm.vue +0 -1411
- package/packages/flow-copy/src/processReject.vue +0 -319
- package/packages/flow-copy/src/reset.vue +0 -944
- package/packages/flow-copy/src/selectUser.vue +0 -513
- package/packages/flow-copy/src/startTaskRead.vue +0 -723
- package/packages/flow-copy/src/supervise.vue +0 -182
- package/packages/flow-copy/src/table.vue +0 -65
- /package/packages/{flow-copy → flow}/src/component/FileList.vue +0 -0
- /package/packages/{flow-copy → flow}/src/main.vue +0 -0
- /package/packages/{flow-copy/src → flows/src/components}/form.vue +0 -0
- /package/packages/{flow/src/component → flows/src/components}/message.vue +0 -0
- /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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 202);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
90
|
+
/***/ 202:
|
|
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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 203);
|
|
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__(
|
|
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__(
|
|
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
|
-
/***/
|
|
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
|
-
/***/
|
|
4201
|
+
/***/ 18:
|
|
4202
4202
|
/***/ (function(module, exports) {
|
|
4203
4203
|
|
|
4204
4204
|
module.exports = require("eoss/lib/loading");
|
|
4205
4205
|
|
|
4206
4206
|
/***/ }),
|
|
4207
4207
|
|
|
4208
|
-
/***/
|
|
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
|
+
/***/ 203:
|
|
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
|
|