eoss-ui 0.6.33 → 0.6.35

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 (85) hide show
  1. package/lib/button-group.js +36 -19
  2. package/lib/button.js +36 -19
  3. package/lib/checkbox-group.js +36 -19
  4. package/lib/data-table-form.js +36 -19
  5. package/lib/data-table.js +36 -19
  6. package/lib/date-picker.js +36 -19
  7. package/lib/dialog.js +36 -19
  8. package/lib/eoss-ui.common.js +97 -55
  9. package/lib/flow-group.js +36 -19
  10. package/lib/flow-list.js +36 -19
  11. package/lib/flow.js +36 -19
  12. package/lib/form.js +36 -19
  13. package/lib/handle-user.js +36 -19
  14. package/lib/handler.js +36 -19
  15. package/lib/icon.js +36 -19
  16. package/lib/icons.js +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +36 -19
  19. package/lib/input.js +36 -19
  20. package/lib/login.js +39 -22
  21. package/lib/main.js +82 -40
  22. package/lib/nav.js +36 -19
  23. package/lib/page.js +36 -19
  24. package/lib/pagination.js +36 -19
  25. package/lib/player.js +36 -19
  26. package/lib/qr-code.js +36 -19
  27. package/lib/radio-group.js +36 -19
  28. package/lib/retrial-auth.js +36 -19
  29. package/lib/select-ganged.js +36 -19
  30. package/lib/select.js +36 -19
  31. package/lib/selector-panel.js +36 -19
  32. package/lib/selector.js +36 -19
  33. package/lib/sizer.js +36 -19
  34. package/lib/steps.js +36 -19
  35. package/lib/switch.js +36 -19
  36. package/lib/table-form.js +36 -19
  37. package/lib/tabs.js +36 -19
  38. package/lib/theme-chalk/base.css +1 -1
  39. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  40. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  41. package/lib/theme-chalk/icon.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/theme-chalk/main.css +1 -1
  44. package/lib/theme-chalk/menu.css +1 -1
  45. package/lib/theme-chalk/simplicity.css +1 -1
  46. package/lib/theme-chalk/sizer.css +1 -1
  47. package/lib/theme-chalk/upload.css +1 -1
  48. package/lib/tips.js +36 -19
  49. package/lib/tree-group.js +36 -19
  50. package/lib/tree.js +36 -19
  51. package/lib/upload.js +36 -19
  52. package/lib/utils/util.js +36 -19
  53. package/lib/wujie.js +36 -19
  54. package/lib/wxlogin.js +36 -19
  55. package/package.json +2 -2
  56. package/packages/.DS_Store +0 -0
  57. package/packages/data-table/.DS_Store +0 -0
  58. package/packages/icons/.DS_Store +0 -0
  59. package/packages/icons/src/icon.json +1 -1
  60. package/packages/login/src/main.vue +1 -1
  61. package/packages/main/.DS_Store +0 -0
  62. package/packages/main/src/default/index.vue +1 -1
  63. package/packages/main/src/main.vue +2 -2
  64. package/packages/main/src/simplicity/index.vue +32 -5
  65. package/packages/theme-chalk/lib/base.css +1 -1
  66. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  67. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  68. package/packages/theme-chalk/lib/icon.css +1 -1
  69. package/packages/theme-chalk/lib/index.css +1 -1
  70. package/packages/theme-chalk/lib/main.css +1 -1
  71. package/packages/theme-chalk/lib/menu.css +1 -1
  72. package/packages/theme-chalk/lib/simplicity.css +1 -1
  73. package/packages/theme-chalk/lib/sizer.css +1 -1
  74. package/packages/theme-chalk/lib/upload.css +1 -1
  75. package/packages/theme-chalk/src/.DS_Store +0 -0
  76. package/packages/theme-chalk/src/common/var.scss +2 -2
  77. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  78. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  79. package/packages/theme-chalk/src/handler.scss +1 -1
  80. package/packages/theme-chalk/src/icon.scss +7 -0
  81. package/packages/theme-chalk/src/login.scss +1 -1
  82. package/packages/theme-chalk/src/retrial-auth.scss +1 -1
  83. package/src/.DS_Store +0 -0
  84. package/src/index.js +1 -1
  85. package/src/utils/util.js +34 -22
@@ -103,6 +103,10 @@ module.exports =
103
103
  /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
104
104
  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; };
105
105
 
106
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
107
+
108
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
109
+
106
110
  /**
107
111
  * 新封装公告方法规范:
108
112
  * 1.方法顺序按字母顺序排列
@@ -187,7 +191,8 @@ var ajax = function ajax(_ref) {
187
191
  publicKey = _ref.publicKey,
188
192
  secret = _ref.secret,
189
193
  encodes = _ref.encodes,
190
- oldmode = _ref.oldmode;
194
+ oldmode = _ref.oldmode,
195
+ configs = _objectWithoutProperties(_ref, ['headers', 'method', 'url', 'host', 'data', 'params', 'format', 'mix', 'defaults', 'loading', 'publicKey', 'secret', 'encodes', 'oldmode']);
191
196
 
192
197
  var header = headers || {};
193
198
  if (!method) {
@@ -491,13 +496,13 @@ var ajax = function ajax(_ref) {
491
496
  if (oldmode && !header['api-response-mode']) {
492
497
  header['api-response-mode'] = true;
493
498
  }
494
- return http({
499
+ return http(_extends({
495
500
  method: method,
496
501
  url: url,
497
502
  data: data,
498
503
  params: params,
499
504
  headers: header
500
- });
505
+ }, configs));
501
506
  };
502
507
 
503
508
  /**
@@ -1205,31 +1210,43 @@ var extend = function extend() {
1205
1210
  * @param {String} [fmt] - 格式
1206
1211
  **/
1207
1212
  var formatDate = function formatDate(date, fmt) {
1208
- var obj = void 0;
1209
- if (date) {
1210
- obj = new Date(date);
1211
- } else {
1212
- obj = new Date();
1213
- }
1213
+ // 1. 处理日期输入
1214
+ var obj = date ? new Date(date) : new Date();
1215
+ if (isNaN(obj.getTime())) throw new Error('Invalid date input');
1216
+
1217
+ // 2. 工具函数
1218
+ var pad = function pad(n) {
1219
+ return String(n).padStart(2, '0');
1220
+ };
1221
+ var monthNum = obj.getMonth(); // 数值月份 (0-11)
1222
+
1223
+ // 3. 定义格式化规则
1214
1224
  var quarter = ['一', '二', '三', '四'];
1225
+ var halfyear = ['上', '下'];
1215
1226
  var o = {
1216
- 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
1217
- 'M+': obj.getMonth() + 1, // 月份
1218
- 'd+': obj.getDate(), // 日
1219
- 'H+': obj.getHours(), // 小时
1220
- 'm+': obj.getMinutes(), //
1221
- 's+': obj.getSeconds(), // 秒
1222
- 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
1223
- S: obj.getMilliseconds() // 毫秒
1227
+ 'b+': halfyear[Math.floor(monthNum / 6)], // 1=上半年, 2=下半年
1228
+ 'M+': monthNum + 1, // 月份 (1-12)
1229
+ 'd+': obj.getDate(), // 日 (1-31)
1230
+ 'H+': obj.getHours(), // 小时 (0-23)
1231
+ 'm+': obj.getMinutes(), // 分钟 (0-59)
1232
+ 's+': obj.getSeconds(), // 秒 (0-59)
1233
+ 'q+': quarter[Math.floor(monthNum / 3)], // 季度 (一~四)
1234
+ 'S': obj.getMilliseconds() // 毫秒 (0-999)
1224
1235
  };
1236
+
1237
+ // 4. 处理年份
1225
1238
  if (/(y+)/.test(fmt)) {
1226
- fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
1239
+ fmt = fmt.replace(RegExp.$1, String(obj.getFullYear()).slice(-RegExp.$1.length));
1227
1240
  }
1241
+
1242
+ // 5. 处理其他字段
1228
1243
  for (var k in o) {
1229
1244
  if (new RegExp('(' + k + ')').test(fmt)) {
1230
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
1245
+ var val = k === 'q+' ? o[k] : pad(o[k]); // 季度不补零
1246
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : val);
1231
1247
  }
1232
1248
  }
1249
+
1233
1250
  return fmt;
1234
1251
  };
1235
1252
 
package/lib/input.js CHANGED
@@ -103,6 +103,10 @@ module.exports =
103
103
  /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
104
104
  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; };
105
105
 
106
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
107
+
108
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
109
+
106
110
  /**
107
111
  * 新封装公告方法规范:
108
112
  * 1.方法顺序按字母顺序排列
@@ -187,7 +191,8 @@ var ajax = function ajax(_ref) {
187
191
  publicKey = _ref.publicKey,
188
192
  secret = _ref.secret,
189
193
  encodes = _ref.encodes,
190
- oldmode = _ref.oldmode;
194
+ oldmode = _ref.oldmode,
195
+ configs = _objectWithoutProperties(_ref, ['headers', 'method', 'url', 'host', 'data', 'params', 'format', 'mix', 'defaults', 'loading', 'publicKey', 'secret', 'encodes', 'oldmode']);
191
196
 
192
197
  var header = headers || {};
193
198
  if (!method) {
@@ -491,13 +496,13 @@ var ajax = function ajax(_ref) {
491
496
  if (oldmode && !header['api-response-mode']) {
492
497
  header['api-response-mode'] = true;
493
498
  }
494
- return http({
499
+ return http(_extends({
495
500
  method: method,
496
501
  url: url,
497
502
  data: data,
498
503
  params: params,
499
504
  headers: header
500
- });
505
+ }, configs));
501
506
  };
502
507
 
503
508
  /**
@@ -1205,31 +1210,43 @@ var extend = function extend() {
1205
1210
  * @param {String} [fmt] - 格式
1206
1211
  **/
1207
1212
  var formatDate = function formatDate(date, fmt) {
1208
- var obj = void 0;
1209
- if (date) {
1210
- obj = new Date(date);
1211
- } else {
1212
- obj = new Date();
1213
- }
1213
+ // 1. 处理日期输入
1214
+ var obj = date ? new Date(date) : new Date();
1215
+ if (isNaN(obj.getTime())) throw new Error('Invalid date input');
1216
+
1217
+ // 2. 工具函数
1218
+ var pad = function pad(n) {
1219
+ return String(n).padStart(2, '0');
1220
+ };
1221
+ var monthNum = obj.getMonth(); // 数值月份 (0-11)
1222
+
1223
+ // 3. 定义格式化规则
1214
1224
  var quarter = ['一', '二', '三', '四'];
1225
+ var halfyear = ['上', '下'];
1215
1226
  var o = {
1216
- 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
1217
- 'M+': obj.getMonth() + 1, // 月份
1218
- 'd+': obj.getDate(), // 日
1219
- 'H+': obj.getHours(), // 小时
1220
- 'm+': obj.getMinutes(), //
1221
- 's+': obj.getSeconds(), // 秒
1222
- 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
1223
- S: obj.getMilliseconds() // 毫秒
1227
+ 'b+': halfyear[Math.floor(monthNum / 6)], // 1=上半年, 2=下半年
1228
+ 'M+': monthNum + 1, // 月份 (1-12)
1229
+ 'd+': obj.getDate(), // 日 (1-31)
1230
+ 'H+': obj.getHours(), // 小时 (0-23)
1231
+ 'm+': obj.getMinutes(), // 分钟 (0-59)
1232
+ 's+': obj.getSeconds(), // 秒 (0-59)
1233
+ 'q+': quarter[Math.floor(monthNum / 3)], // 季度 (一~四)
1234
+ 'S': obj.getMilliseconds() // 毫秒 (0-999)
1224
1235
  };
1236
+
1237
+ // 4. 处理年份
1225
1238
  if (/(y+)/.test(fmt)) {
1226
- fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
1239
+ fmt = fmt.replace(RegExp.$1, String(obj.getFullYear()).slice(-RegExp.$1.length));
1227
1240
  }
1241
+
1242
+ // 5. 处理其他字段
1228
1243
  for (var k in o) {
1229
1244
  if (new RegExp('(' + k + ')').test(fmt)) {
1230
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
1245
+ var val = k === 'q+' ? o[k] : pad(o[k]); // 季度不补零
1246
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : val);
1231
1247
  }
1232
1248
  }
1249
+
1233
1250
  return fmt;
1234
1251
  };
1235
1252
 
package/lib/login.js CHANGED
@@ -102,6 +102,10 @@ module.exports =
102
102
  /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
103
103
  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; };
104
104
 
105
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
106
+
107
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
108
+
105
109
  /**
106
110
  * 新封装公告方法规范:
107
111
  * 1.方法顺序按字母顺序排列
@@ -186,7 +190,8 @@ var ajax = function ajax(_ref) {
186
190
  publicKey = _ref.publicKey,
187
191
  secret = _ref.secret,
188
192
  encodes = _ref.encodes,
189
- oldmode = _ref.oldmode;
193
+ oldmode = _ref.oldmode,
194
+ configs = _objectWithoutProperties(_ref, ['headers', 'method', 'url', 'host', 'data', 'params', 'format', 'mix', 'defaults', 'loading', 'publicKey', 'secret', 'encodes', 'oldmode']);
190
195
 
191
196
  var header = headers || {};
192
197
  if (!method) {
@@ -490,13 +495,13 @@ var ajax = function ajax(_ref) {
490
495
  if (oldmode && !header['api-response-mode']) {
491
496
  header['api-response-mode'] = true;
492
497
  }
493
- return http({
498
+ return http(_extends({
494
499
  method: method,
495
500
  url: url,
496
501
  data: data,
497
502
  params: params,
498
503
  headers: header
499
- });
504
+ }, configs));
500
505
  };
501
506
 
502
507
  /**
@@ -1204,31 +1209,43 @@ var extend = function extend() {
1204
1209
  * @param {String} [fmt] - 格式
1205
1210
  **/
1206
1211
  var formatDate = function formatDate(date, fmt) {
1207
- var obj = void 0;
1208
- if (date) {
1209
- obj = new Date(date);
1210
- } else {
1211
- obj = new Date();
1212
- }
1212
+ // 1. 处理日期输入
1213
+ var obj = date ? new Date(date) : new Date();
1214
+ if (isNaN(obj.getTime())) throw new Error('Invalid date input');
1215
+
1216
+ // 2. 工具函数
1217
+ var pad = function pad(n) {
1218
+ return String(n).padStart(2, '0');
1219
+ };
1220
+ var monthNum = obj.getMonth(); // 数值月份 (0-11)
1221
+
1222
+ // 3. 定义格式化规则
1213
1223
  var quarter = ['一', '二', '三', '四'];
1224
+ var halfyear = ['上', '下'];
1214
1225
  var o = {
1215
- 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
1216
- 'M+': obj.getMonth() + 1, // 月份
1217
- 'd+': obj.getDate(), // 日
1218
- 'H+': obj.getHours(), // 小时
1219
- 'm+': obj.getMinutes(), //
1220
- 's+': obj.getSeconds(), // 秒
1221
- 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
1222
- S: obj.getMilliseconds() // 毫秒
1226
+ 'b+': halfyear[Math.floor(monthNum / 6)], // 1=上半年, 2=下半年
1227
+ 'M+': monthNum + 1, // 月份 (1-12)
1228
+ 'd+': obj.getDate(), // 日 (1-31)
1229
+ 'H+': obj.getHours(), // 小时 (0-23)
1230
+ 'm+': obj.getMinutes(), // 分钟 (0-59)
1231
+ 's+': obj.getSeconds(), // 秒 (0-59)
1232
+ 'q+': quarter[Math.floor(monthNum / 3)], // 季度 (一~四)
1233
+ 'S': obj.getMilliseconds() // 毫秒 (0-999)
1223
1234
  };
1235
+
1236
+ // 4. 处理年份
1224
1237
  if (/(y+)/.test(fmt)) {
1225
- fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
1238
+ fmt = fmt.replace(RegExp.$1, String(obj.getFullYear()).slice(-RegExp.$1.length));
1226
1239
  }
1240
+
1241
+ // 5. 处理其他字段
1227
1242
  for (var k in o) {
1228
1243
  if (new RegExp('(' + k + ')').test(fmt)) {
1229
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
1244
+ var val = k === 'q+' ? o[k] : pad(o[k]); // 季度不补零
1245
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : val);
1230
1246
  }
1231
1247
  }
1248
+
1232
1249
  return fmt;
1233
1250
  };
1234
1251
 
@@ -4020,7 +4037,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
4020
4037
  // ESM COMPAT FLAG
4021
4038
  __webpack_require__.r(__webpack_exports__);
4022
4039
 
4023
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=1bcb85a7&
4040
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=6fe37714&
4024
4041
  var render = function () {
4025
4042
  var _vm = this
4026
4043
  var _h = _vm.$createElement
@@ -5172,7 +5189,7 @@ var staticRenderFns = [
5172
5189
  render._withStripped = true
5173
5190
 
5174
5191
 
5175
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=1bcb85a7&
5192
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=6fe37714&
5176
5193
 
5177
5194
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
5178
5195
  var regenerator_ = __webpack_require__(14);
@@ -6254,7 +6271,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
6254
6271
  type: '3',
6255
6272
  name: '手机扫码登录',
6256
6273
  icon: 'es-icon-qrcode',
6257
- tips: '扫码登陆在这里',
6274
+ tips: '扫码登录在这里',
6258
6275
  background: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoCAYAAAA2cfJIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDA2IDc5LmRhYmFjYmIsIDIwMjEvMDQvMTQtMDA6Mzk6NDQgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCAyMi40IChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjZFRTVERTUxQzRDMzExRUY4NkFGQ0U2RDY3NEFERkI0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjZFRTVERTUyQzRDMzExRUY4NkFGQ0U2RDY3NEFERkI0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NkVFNURFNEZDNEMzMTFFRjg2QUZDRTZENjc0QURGQjQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NkVFNURFNTBDNEMzMTFFRjg2QUZDRTZENjc0QURGQjQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz64XoEfAAAB/UlEQVR42uycOUsDQRiG99vdHJ4JHhFN1EhEQkBsRVACghBbKytBf4OiNrZipQHtRLASsbJIQDQGBVHBysIDAxIvPBCCGpO4ZvwWrCT+gZ33gWV2mam+95mZPWDpcGZYCYQjY4oQs0Y+lxDF4qcCLAFpWrVud/QqRJOpZHy55Jjn3dUODv/oJXU+krm9vkPZrIXL29JU2x5aIaIeluDyb7/KxyDP/C2Eb00yd+l7znfHzLlUvymAk5f9LEplXYRhPHHT8J8AQGIgAAQAEABAAAABAAQAEABAAAABAAQAEABYAiGKBW66A+FIGQSQkIfTk3UjnzM/+G2zBDUQQDK+C3kjfZic+cp+XPHlPkvQCgGk2waESB/vRfNvmdivBJ0QQEJuTw7Wsq/PS7/bQRgCSEjh4/2GlwTNXAAggGS4m9uaXT7/vEI0mkrGExBAIqoafZ6ato5FIprg8DdxDyAR5bUed317KEqqusDhr+ApQCLsFZXOhlDXPGnaBoc/h/cAkuEJdg2pmp7i0+m/fRBAAnjPt3FzxrNfQAAAAQAEABAAQAAAASAAgAAAAgAIAGQVIEeqWo5SWBfSdQ83j/8JENMdzgGXz+9FqayH+ZMozrefT+Ol+nXzz1GBcGS8LhBcdvv8iaJhPKJsFlnebTavbnf0KURTnPNFqTE/AgwAPZCY5D/YjJ4AAAAASUVORK5CYII='
6259
6276
  }];
6260
6277
  }
package/lib/main.js CHANGED
@@ -102,6 +102,10 @@ module.exports =
102
102
  /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
103
103
  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; };
104
104
 
105
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
106
+
107
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
108
+
105
109
  /**
106
110
  * 新封装公告方法规范:
107
111
  * 1.方法顺序按字母顺序排列
@@ -186,7 +190,8 @@ var ajax = function ajax(_ref) {
186
190
  publicKey = _ref.publicKey,
187
191
  secret = _ref.secret,
188
192
  encodes = _ref.encodes,
189
- oldmode = _ref.oldmode;
193
+ oldmode = _ref.oldmode,
194
+ configs = _objectWithoutProperties(_ref, ['headers', 'method', 'url', 'host', 'data', 'params', 'format', 'mix', 'defaults', 'loading', 'publicKey', 'secret', 'encodes', 'oldmode']);
190
195
 
191
196
  var header = headers || {};
192
197
  if (!method) {
@@ -490,13 +495,13 @@ var ajax = function ajax(_ref) {
490
495
  if (oldmode && !header['api-response-mode']) {
491
496
  header['api-response-mode'] = true;
492
497
  }
493
- return http({
498
+ return http(_extends({
494
499
  method: method,
495
500
  url: url,
496
501
  data: data,
497
502
  params: params,
498
503
  headers: header
499
- });
504
+ }, configs));
500
505
  };
501
506
 
502
507
  /**
@@ -1204,31 +1209,43 @@ var extend = function extend() {
1204
1209
  * @param {String} [fmt] - 格式
1205
1210
  **/
1206
1211
  var formatDate = function formatDate(date, fmt) {
1207
- var obj = void 0;
1208
- if (date) {
1209
- obj = new Date(date);
1210
- } else {
1211
- obj = new Date();
1212
- }
1212
+ // 1. 处理日期输入
1213
+ var obj = date ? new Date(date) : new Date();
1214
+ if (isNaN(obj.getTime())) throw new Error('Invalid date input');
1215
+
1216
+ // 2. 工具函数
1217
+ var pad = function pad(n) {
1218
+ return String(n).padStart(2, '0');
1219
+ };
1220
+ var monthNum = obj.getMonth(); // 数值月份 (0-11)
1221
+
1222
+ // 3. 定义格式化规则
1213
1223
  var quarter = ['一', '二', '三', '四'];
1224
+ var halfyear = ['上', '下'];
1214
1225
  var o = {
1215
- 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
1216
- 'M+': obj.getMonth() + 1, // 月份
1217
- 'd+': obj.getDate(), // 日
1218
- 'H+': obj.getHours(), // 小时
1219
- 'm+': obj.getMinutes(), //
1220
- 's+': obj.getSeconds(), // 秒
1221
- 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
1222
- S: obj.getMilliseconds() // 毫秒
1226
+ 'b+': halfyear[Math.floor(monthNum / 6)], // 1=上半年, 2=下半年
1227
+ 'M+': monthNum + 1, // 月份 (1-12)
1228
+ 'd+': obj.getDate(), // 日 (1-31)
1229
+ 'H+': obj.getHours(), // 小时 (0-23)
1230
+ 'm+': obj.getMinutes(), // 分钟 (0-59)
1231
+ 's+': obj.getSeconds(), // 秒 (0-59)
1232
+ 'q+': quarter[Math.floor(monthNum / 3)], // 季度 (一~四)
1233
+ 'S': obj.getMilliseconds() // 毫秒 (0-999)
1223
1234
  };
1235
+
1236
+ // 4. 处理年份
1224
1237
  if (/(y+)/.test(fmt)) {
1225
- fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
1238
+ fmt = fmt.replace(RegExp.$1, String(obj.getFullYear()).slice(-RegExp.$1.length));
1226
1239
  }
1240
+
1241
+ // 5. 处理其他字段
1227
1242
  for (var k in o) {
1228
1243
  if (new RegExp('(' + k + ')').test(fmt)) {
1229
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
1244
+ var val = k === 'q+' ? o[k] : pad(o[k]); // 季度不补零
1245
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : val);
1230
1246
  }
1231
1247
  }
1248
+
1232
1249
  return fmt;
1233
1250
  };
1234
1251
 
@@ -3991,7 +4008,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
3991
4008
  // ESM COMPAT FLAG
3992
4009
  __webpack_require__.r(__webpack_exports__);
3993
4010
 
3994
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=43324a71&
4011
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=774e8f3b&
3995
4012
  var render = function () {
3996
4013
  var _vm = this
3997
4014
  var _h = _vm.$createElement
@@ -4089,13 +4106,13 @@ var staticRenderFns = []
4089
4106
  render._withStripped = true
4090
4107
 
4091
4108
 
4092
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=43324a71&
4109
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=774e8f3b&
4093
4110
 
4094
4111
  // EXTERNAL MODULE: ./src/config/image.js
4095
4112
  var config_image = __webpack_require__(18);
4096
4113
 
4097
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=9473ec14&scoped=true&
4098
- var simplicityvue_type_template_id_9473ec14_scoped_true_render = function () {
4114
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=template&id=22cde548&scoped=true&
4115
+ var simplicityvue_type_template_id_22cde548_scoped_true_render = function () {
4099
4116
  var _vm = this
4100
4117
  var _h = _vm.$createElement
4101
4118
  var _c = _vm._self._c || _h
@@ -4731,11 +4748,11 @@ var simplicityvue_type_template_id_9473ec14_scoped_true_render = function () {
4731
4748
  ),
4732
4749
  ])
4733
4750
  }
4734
- var simplicityvue_type_template_id_9473ec14_scoped_true_staticRenderFns = []
4735
- simplicityvue_type_template_id_9473ec14_scoped_true_render._withStripped = true
4751
+ var simplicityvue_type_template_id_22cde548_scoped_true_staticRenderFns = []
4752
+ simplicityvue_type_template_id_22cde548_scoped_true_render._withStripped = true
4736
4753
 
4737
4754
 
4738
- // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=9473ec14&scoped=true&
4755
+ // CONCATENATED MODULE: ./packages/main/src/simplicity/index.vue?vue&type=template&id=22cde548&scoped=true&
4739
4756
 
4740
4757
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/avatar.vue?vue&type=template&id=e722b45c&scoped=true&
4741
4758
  var avatarvue_type_template_id_e722b45c_scoped_true_render = function () {
@@ -10001,6 +10018,8 @@ var search_component = Object(componentNormalizer["a" /* default */])(
10001
10018
  var store = __webpack_require__(13);
10002
10019
 
10003
10020
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/simplicity/index.vue?vue&type=script&lang=js&
10021
+ 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; };
10022
+
10004
10023
  var simplicityvue_type_script_lang_js_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
10005
10024
 
10006
10025
  //
@@ -11132,7 +11151,7 @@ var events = [function (tabs, index, that) {
11132
11151
  if (item[key] === res) {
11133
11152
  return item;
11134
11153
  }
11135
- } else if (item.url === res || item.id === res) {
11154
+ } else if (item.url === res || item.id === res || item.appCode && item.appCode === res) {
11136
11155
  return item;
11137
11156
  }
11138
11157
  if (Object.prototype.hasOwnProperty.call(item, 'children') && item.children.length) {
@@ -11831,8 +11850,14 @@ var events = [function (tabs, index, that) {
11831
11850
  },
11832
11851
  jumpMenu: function jumpMenu(res, close) {
11833
11852
  var apps = res;
11853
+ var param = null;
11854
+ var reload = true;
11834
11855
  if (typeof res === 'string') {
11835
11856
  apps = res.split(',');
11857
+ } else if ((typeof res === 'undefined' ? 'undefined' : _typeof(res)) === 'object') {
11858
+ apps = res.appCode.split(',');
11859
+ param = res.param;
11860
+ reload = Object.prototype.hasOwnProperty.call(res, 'reload') ? res.reload : true;
11836
11861
  }
11837
11862
  var obj = this.getMenu(this.menus, apps[apps.length - 1]);
11838
11863
  if (obj) {
@@ -11842,16 +11867,33 @@ var events = [function (tabs, index, that) {
11842
11867
  this.activeName = obj.id;
11843
11868
  if (i == -1) {
11844
11869
  var tab = this.setIframeType(obj);
11870
+ this.$set(tab, 'url', util["a" /* default */].handlerUrl(tab.url, param));
11845
11871
  this.tabs.splice(n + 1, 0, tab);
11846
11872
  } else {
11847
11873
  var _tab7 = this.tabs[i];
11848
11874
  if (_tab7.method === 'iframe') {
11849
- this.$set(this.tabs[i], 'url', util["a" /* default */].handlerUrl(_tab7.url));
11875
+ this.$set(this.tabs[i], 'url', util["a" /* default */].handlerUrl(_tab7.url, param));
11850
11876
  }
11851
11877
  if (_tab7.method === 'wujie' && _tab7.appCode) {
11852
- window.document.querySelector('iframe[name=' + _tab7.appCode + ']').contentWindow.location.reload(true);
11878
+ var url = param ? util["a" /* default */].handlerUrl(_tab7.url, param) : _tab7.url;
11879
+ if (reload || param) {
11880
+ _tab7.url = '';
11881
+ this.$nextTick(function () {
11882
+ _tab7.url = url;
11883
+ });
11884
+ }
11885
+ // if (param) {
11886
+ // window.document.querySelector(
11887
+ // `iframe[name=${tab.appCode}]`
11888
+ // ).contentWindow.location.href = util.handlerUrl(tab.url, param);
11889
+ // } else {
11890
+ // window.document
11891
+ // .querySelector(`iframe[name=${tab.appCode}]`)
11892
+ // .contentWindow.location.reload(true);
11893
+ // }
11853
11894
  }
11854
11895
  if (_tab7.method === 'router') {
11896
+ this.$set(this.tabs[i], 'url', util["a" /* default */].handlerUrl(_tab7.url, param));
11855
11897
  this.$set(this.tabs[i], 'keys', util["a" /* default */].uuid());
11856
11898
  }
11857
11899
  }
@@ -11912,18 +11954,18 @@ var events = [function (tabs, index, that) {
11912
11954
 
11913
11955
  var simplicity_component = Object(componentNormalizer["a" /* default */])(
11914
11956
  src_simplicityvue_type_script_lang_js_,
11915
- simplicityvue_type_template_id_9473ec14_scoped_true_render,
11916
- simplicityvue_type_template_id_9473ec14_scoped_true_staticRenderFns,
11957
+ simplicityvue_type_template_id_22cde548_scoped_true_render,
11958
+ simplicityvue_type_template_id_22cde548_scoped_true_staticRenderFns,
11917
11959
  false,
11918
11960
  null,
11919
- "9473ec14",
11961
+ "22cde548",
11920
11962
  null
11921
11963
 
11922
11964
  )
11923
11965
 
11924
11966
  /* harmony default export */ var simplicity = (simplicity_component.exports);
11925
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=0e385525&
11926
- var defaultvue_type_template_id_0e385525_render = function () {
11967
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/index.vue?vue&type=template&id=3e631434&
11968
+ var defaultvue_type_template_id_3e631434_render = function () {
11927
11969
  var _vm = this
11928
11970
  var _h = _vm.$createElement
11929
11971
  var _c = _vm._self._c || _h
@@ -12320,11 +12362,11 @@ var defaultvue_type_template_id_0e385525_render = function () {
12320
12362
  1
12321
12363
  )
12322
12364
  }
12323
- var defaultvue_type_template_id_0e385525_staticRenderFns = []
12324
- defaultvue_type_template_id_0e385525_render._withStripped = true
12365
+ var defaultvue_type_template_id_3e631434_staticRenderFns = []
12366
+ defaultvue_type_template_id_3e631434_render._withStripped = true
12325
12367
 
12326
12368
 
12327
- // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=0e385525&
12369
+ // CONCATENATED MODULE: ./packages/main/src/default/index.vue?vue&type=template&id=3e631434&
12328
12370
 
12329
12371
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/default/userinfo.vue?vue&type=template&id=b6520920&
12330
12372
  var userinfovue_type_template_id_b6520920_render = function () {
@@ -14564,7 +14606,7 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
14564
14606
  }
14565
14607
  for (var i = 0; i < menus.length; i++) {
14566
14608
  var item = menus[i];
14567
- if (item.id === url) {
14609
+ if (item.id === url || item.appCode && item.appCode === url) {
14568
14610
  if (item.url) {
14569
14611
  if (Object.prototype.hasOwnProperty.call(item, 'children') && item.children.length) {
14570
14612
  var id = this.getId(item.children, item.url);
@@ -15553,8 +15595,8 @@ var appCode = util["a" /* default */].getParams('appCode') || util["a" /* defaul
15553
15595
 
15554
15596
  var default_component = Object(componentNormalizer["a" /* default */])(
15555
15597
  src_defaultvue_type_script_lang_js_,
15556
- defaultvue_type_template_id_0e385525_render,
15557
- defaultvue_type_template_id_0e385525_staticRenderFns,
15598
+ defaultvue_type_template_id_3e631434_render,
15599
+ defaultvue_type_template_id_3e631434_staticRenderFns,
15558
15600
  false,
15559
15601
  null,
15560
15602
  null,