eoss-ui 0.5.60 → 0.5.62

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 (89) hide show
  1. package/lib/button-group.js +177 -87
  2. package/lib/button.js +14 -8
  3. package/lib/calendar.js +3 -3
  4. package/lib/card.js +6 -6
  5. package/lib/checkbox-group.js +14 -8
  6. package/lib/data-table-form.js +14 -8
  7. package/lib/data-table.js +129 -104
  8. package/lib/date-picker.js +14 -8
  9. package/lib/dialog.js +17 -11
  10. package/lib/eoss-ui.common.js +463 -311
  11. package/lib/flow-group.js +14 -8
  12. package/lib/flow-list.js +14 -8
  13. package/lib/flow.js +14 -8
  14. package/lib/form.js +14 -8
  15. package/lib/handle-user.js +14 -8
  16. package/lib/handler.js +14 -8
  17. package/lib/icon.js +31 -15
  18. package/lib/icons.js +2 -2
  19. package/lib/index.js +1 -1
  20. package/lib/input-number.js +14 -8
  21. package/lib/input.js +14 -8
  22. package/lib/login.js +26 -13
  23. package/lib/main.js +23 -14
  24. package/lib/nav.js +14 -8
  25. package/lib/page.js +14 -8
  26. package/lib/player.js +18 -12
  27. package/lib/qr-code.js +16 -10
  28. package/lib/radio-group.js +14 -8
  29. package/lib/retrial-auth.js +14 -8
  30. package/lib/select-ganged.js +14 -8
  31. package/lib/select.js +14 -8
  32. package/lib/selector-panel.js +17 -11
  33. package/lib/selector.js +18 -23
  34. package/lib/sizer.js +14 -8
  35. package/lib/steps.js +14 -8
  36. package/lib/switch.js +14 -8
  37. package/lib/table-form.js +14 -8
  38. package/lib/tabs.js +14 -8
  39. package/lib/theme-chalk/base.css +1 -1
  40. package/lib/theme-chalk/button.css +1 -1
  41. package/lib/theme-chalk/calendar.css +1 -0
  42. package/lib/theme-chalk/card.css +1 -1
  43. package/lib/theme-chalk/cascader.css +0 -1
  44. package/lib/theme-chalk/icon.css +1 -1
  45. package/lib/theme-chalk/index.css +1 -1
  46. package/lib/theme-chalk/main.css +1 -1
  47. package/lib/theme-chalk/menu.css +1 -1
  48. package/lib/theme-chalk/sizer.css +1 -1
  49. package/lib/theme-chalk/toolbar.css +1 -1
  50. package/lib/theme-chalk/upload.css +1 -1
  51. package/lib/tips.js +14 -8
  52. package/lib/toolbar.js +47 -26
  53. package/lib/tree-group.js +28 -11
  54. package/lib/tree.js +14 -8
  55. package/lib/upload.js +17 -11
  56. package/lib/utils/util.js +14 -8
  57. package/lib/wujie.js +14 -8
  58. package/lib/wxlogin.js +14 -8
  59. package/package.json +3 -2
  60. package/packages/button-group/src/main.vue +75 -37
  61. package/packages/calendar/src/main.vue +1 -1
  62. package/packages/card/src/main.vue +6 -6
  63. package/packages/data-table/src/main.vue +11 -2
  64. package/packages/icon/src/main.vue +10 -4
  65. package/packages/login/src/main.vue +14 -3
  66. package/packages/main/src/main.vue +4 -1
  67. package/packages/selector/src/main.vue +0 -1
  68. package/packages/theme-chalk/lib/base.css +1 -1
  69. package/packages/theme-chalk/lib/button.css +1 -1
  70. package/packages/theme-chalk/lib/calendar.css +1 -0
  71. package/packages/theme-chalk/lib/card.css +1 -1
  72. package/packages/theme-chalk/lib/cascader.css +0 -1
  73. package/packages/theme-chalk/lib/icon.css +1 -1
  74. package/packages/theme-chalk/lib/index.css +1 -1
  75. package/packages/theme-chalk/lib/main.css +1 -1
  76. package/packages/theme-chalk/lib/menu.css +1 -1
  77. package/packages/theme-chalk/lib/sizer.css +1 -1
  78. package/packages/theme-chalk/lib/toolbar.css +1 -1
  79. package/packages/theme-chalk/lib/upload.css +1 -1
  80. package/packages/theme-chalk/src/button.scss +3 -0
  81. package/packages/theme-chalk/src/calendar.scss +110 -0
  82. package/packages/theme-chalk/src/card.scss +5 -2
  83. package/packages/theme-chalk/src/cascader.scss +0 -109
  84. package/packages/theme-chalk/src/icon.scss +4 -3
  85. package/packages/theme-chalk/src/toolbar.scss +8 -0
  86. package/packages/toolbar/src/main.vue +60 -33
  87. package/packages/tree-group/src/main.vue +12 -1
  88. package/src/index.js +1 -1
  89. package/src/utils/util.js +14 -9
@@ -370,7 +370,7 @@ var ajax = function ajax(_ref) {
370
370
  error.message = '未授权,请重新登录';
371
371
  break;
372
372
  case 403:
373
- error.message = '登录过期,请重新登录';
373
+ error.message = '服务器错误';
374
374
  break;
375
375
  case 404:
376
376
  error.message = '网络请求不存在';
@@ -382,7 +382,7 @@ var ajax = function ajax(_ref) {
382
382
  error.message = '请求超时';
383
383
  break;
384
384
  case 500:
385
- error.message = '服务器端出错';
385
+ error.message = '服务器错误';
386
386
  break;
387
387
  case 501:
388
388
  error.message = '网络未实现';
@@ -738,18 +738,23 @@ var dayOfMonth = function dayOfMonth(date) {
738
738
  * @desc:添加js内容
739
739
  * @author huangbo
740
740
  * @date 2022年5月7日
741
- * @param {Function} [fn] - 函数
741
+ * @param {Function} [callback] - 函数
742
742
  * @param {Number} [wait] - 延迟毫秒数
743
743
  * @param {Boolean} [immediate] - 是否首次触发执行
744
744
  **/
745
745
 
746
- var debounce = function debounce(callback, delay) {
747
- var timeout = null;
746
+ var debounce = function debounce(callback, wait) {
747
+ var timeout = void 0;
748
748
  return function () {
749
- clearTimeout(timeout);
750
- timeout = setTimeout(callback, delay ? delay : 500);
749
+ var context = this;
750
+ var args = arguments;
751
+ if (timeout) clearTimeout(timeout);
752
+ timeout = setTimeout(function () {
753
+ callback.apply(context, args);
754
+ }, wait || 500);
751
755
  };
752
756
  };
757
+
753
758
  /**
754
759
  * delUrlParam
755
760
  * @desc:删除url指定参数
@@ -2886,7 +2891,8 @@ var toFunction = function toFunction(str) {
2886
2891
  * @param {string} [$color] - 颜色值
2887
2892
  **/
2888
2893
  var updateTheme = function updateTheme(color, send) {
2889
- color = color ? color : '#409eff';
2894
+ color = color && startWith(color, '#') ? color : '#409eff';
2895
+
2890
2896
  if (send === undefined) {
2891
2897
  send = true;
2892
2898
  }
@@ -3608,7 +3614,7 @@ function normalizeComponent(
3608
3614
  // ESM COMPAT FLAG
3609
3615
  __webpack_require__.r(__webpack_exports__);
3610
3616
 
3611
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button-group/src/main.vue?vue&type=template&id=72ff1457&
3617
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button-group/src/main.vue?vue&type=template&id=24005b83&
3612
3618
  var render = function () {
3613
3619
  var _vm = this
3614
3620
  var _h = _vm.$createElement
@@ -3617,84 +3623,131 @@ var render = function () {
3617
3623
  "el-button-group",
3618
3624
  { staticClass: "es-button-group" },
3619
3625
  [
3620
- _vm._l(_vm.btns, function (item, index) {
3621
- return [
3622
- item && !item.hide
3623
- ? _c(
3624
- "es-button",
3625
- _vm._b(
3626
- {
3627
- key: index,
3628
- attrs: { stop: _vm.stop, size: _vm.size, type: item.type },
3629
- on: {
3630
- click: function ($event) {
3631
- _vm.handleClick(
3632
- Object.assign({}, _vm.data, { handle: item })
3633
- )
3634
- },
3635
- },
3636
- },
3637
- "es-button",
3638
- item,
3639
- false
3640
- ),
3641
- [
3642
- _vm._v(
3643
- "\n " +
3644
- _vm._s(
3645
- item.template
3646
- ? item.template(
3647
- Object.assign({}, _vm.data, { config: item })
3648
- )
3649
- : item.text
3650
- ) +
3651
- "\n "
3652
- ),
3653
- ]
3654
- )
3655
- : _vm._e(),
3656
- _vm.other.length > 0 && index == _vm.btns.length - 1
3657
- ? _c(
3658
- "el-dropdown",
3659
- {
3660
- attrs: { trigger: _vm.trigger },
3661
- on: { command: _vm.handleCommand },
3662
- },
3663
- [
3664
- _c("el-button", { attrs: { size: _vm.size } }, [
3665
- _c("i", { staticClass: "es-icon-omit" }),
3666
- ]),
3667
- _c(
3668
- "el-dropdown-menu",
3669
- { attrs: { slot: "dropdown" }, slot: "dropdown" },
3670
- _vm._l(_vm.other, function (item, index) {
3671
- return _c(
3672
- "el-dropdown-item",
3673
- { key: index, attrs: { command: item } },
3674
- [
3675
- item.icon ? _c("i", { class: item.icon }) : _vm._e(),
3676
- _vm._v(
3677
- _vm._s(
3678
- item.template
3679
- ? item.template(
3680
- Object.assign({}, _vm.data, {
3681
- config: item,
3682
- })
3683
- )
3684
- : item.text
3626
+ _vm.length > 1
3627
+ ? [
3628
+ _vm._l(_vm.showBtns, function (item, index) {
3629
+ return [
3630
+ item && !item.hide
3631
+ ? [
3632
+ item.upload || (item.code && item.ownId)
3633
+ ? _c(
3634
+ "es-upload",
3635
+ _vm._b(
3636
+ { staticClass: "el-button" },
3637
+ "es-upload",
3638
+ Object.assign({}, item, {
3639
+ method: "post",
3640
+ btnSize: _vm.size,
3641
+ showFileList: false,
3642
+ selectType: item.type ? item.type : "",
3643
+ }),
3644
+ false
3685
3645
  )
3646
+ )
3647
+ : _c(
3648
+ "es-button",
3649
+ _vm._b(
3650
+ {
3651
+ key: index,
3652
+ attrs: {
3653
+ stop: _vm.stop,
3654
+ size: _vm.size,
3655
+ type: item.type,
3656
+ },
3657
+ on: {
3658
+ click: function ($event) {
3659
+ _vm.handleClick(
3660
+ Object.assign({}, _vm.data, {
3661
+ handle: item,
3662
+ })
3663
+ )
3664
+ },
3665
+ },
3666
+ },
3667
+ "es-button",
3668
+ item,
3669
+ false
3670
+ ),
3671
+ [
3672
+ _vm._v(
3673
+ "\n " +
3674
+ _vm._s(
3675
+ item.template
3676
+ ? item.template(
3677
+ Object.assign({}, _vm.data, {
3678
+ config: item,
3679
+ })
3680
+ )
3681
+ : item.text
3682
+ ) +
3683
+ "\n "
3684
+ ),
3685
+ ]
3686
3686
  ),
3687
- ]
3688
- )
3689
- }),
3690
- 1
3691
- ),
3687
+ ]
3688
+ : _vm._e(),
3689
+ ]
3690
+ }),
3691
+ ]
3692
+ : _vm._e(),
3693
+ _vm.other.length > 0
3694
+ ? _c(
3695
+ "el-dropdown",
3696
+ {
3697
+ attrs: { trigger: _vm.trigger },
3698
+ on: {
3699
+ command: _vm.handleCommand,
3700
+ "visible-change": _vm.handleChange,
3701
+ },
3702
+ },
3703
+ [
3704
+ _c(
3705
+ "el-button",
3706
+ { attrs: { size: _vm.size } },
3707
+ [
3708
+ _vm.moreText
3709
+ ? [
3710
+ _vm._v(
3711
+ "\n " + _vm._s(_vm.moreText) + "\n "
3712
+ ),
3713
+ _c("i", {
3714
+ class: {
3715
+ "el-icon-arrow-down": !_vm.show,
3716
+ "el-icon-arrow-up": _vm.show,
3717
+ },
3718
+ }),
3719
+ ]
3720
+ : _c("i", { staticClass: "es-icon-omit" }),
3692
3721
  ],
3722
+ 2
3723
+ ),
3724
+ _c(
3725
+ "el-dropdown-menu",
3726
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
3727
+ _vm._l(_vm.other, function (item, index) {
3728
+ return _c(
3729
+ "el-dropdown-item",
3730
+ { key: index, attrs: { command: item } },
3731
+ [
3732
+ item.icon ? _c("i", { class: item.icon }) : _vm._e(),
3733
+ _vm._v(
3734
+ _vm._s(
3735
+ item.template
3736
+ ? item.template(
3737
+ Object.assign({}, _vm.data, { config: item })
3738
+ )
3739
+ : item.text
3740
+ )
3741
+ ),
3742
+ ]
3743
+ )
3744
+ }),
3693
3745
  1
3694
- )
3695
- : _vm._e(),
3696
- ]
3697
- }),
3746
+ ),
3747
+ ],
3748
+ 1
3749
+ )
3750
+ : _vm._e(),
3698
3751
  ],
3699
3752
  2
3700
3753
  )
@@ -3703,7 +3756,7 @@ var staticRenderFns = []
3703
3756
  render._withStripped = true
3704
3757
 
3705
3758
 
3706
- // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=72ff1457&
3759
+ // CONCATENATED MODULE: ./packages/button-group/src/main.vue?vue&type=template&id=24005b83&
3707
3760
 
3708
3761
  // EXTERNAL MODULE: ./src/utils/util.js
3709
3762
  var util = __webpack_require__(0);
@@ -3753,6 +3806,31 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3753
3806
  //
3754
3807
  //
3755
3808
  //
3809
+ //
3810
+ //
3811
+ //
3812
+ //
3813
+ //
3814
+ //
3815
+ //
3816
+ //
3817
+ //
3818
+ //
3819
+ //
3820
+ //
3821
+ //
3822
+ //
3823
+ //
3824
+ //
3825
+ //
3826
+ //
3827
+ //
3828
+ //
3829
+ //
3830
+ //
3831
+ //
3832
+ //
3833
+ //
3756
3834
 
3757
3835
 
3758
3836
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
@@ -3777,20 +3855,29 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3777
3855
  type: String,
3778
3856
  default: 'click'
3779
3857
  },
3780
- useCaseCodeKey: String
3858
+ useCaseCodeKey: String,
3859
+ moreText: String,
3860
+ size: {
3861
+ type: String,
3862
+ default: 'mini'
3863
+ }
3781
3864
  },
3782
3865
  computed: {
3783
3866
  btns: function btns() {
3784
3867
  return this.getBtns();
3785
3868
  },
3869
+ showBtns: function showBtns() {
3870
+ return this.btns.slice(0, this.length - 1);
3871
+ },
3786
3872
  other: function other() {
3787
- return this.length > 0 && this.btns.length > this.length ? this.btns.splice(this.length - 1, this.btns.length) : [];
3873
+ var btns = this.length > 0 && (this.btns.length > this.length || this.length == 1) ? this.btns.slice(this.length - 1, this.btns.length) : [];
3874
+ return btns;
3788
3875
  }
3789
3876
  },
3790
3877
  watch: {},
3791
3878
  data: function data() {
3792
3879
  return {
3793
- size: 'mini'
3880
+ show: false
3794
3881
  };
3795
3882
  },
3796
3883
  mounted: function mounted() {
@@ -3823,6 +3910,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
3823
3910
  });
3824
3911
  return arry;
3825
3912
  },
3913
+ handleChange: function handleChange(res) {
3914
+ this.show = res;
3915
+ },
3826
3916
  handleClick: function handleClick(obj) {
3827
3917
  this.$emit('handleClick', obj);
3828
3918
  this.$emit('handle-click', obj);
package/lib/button.js CHANGED
@@ -370,7 +370,7 @@ var ajax = function ajax(_ref) {
370
370
  error.message = '未授权,请重新登录';
371
371
  break;
372
372
  case 403:
373
- error.message = '登录过期,请重新登录';
373
+ error.message = '服务器错误';
374
374
  break;
375
375
  case 404:
376
376
  error.message = '网络请求不存在';
@@ -382,7 +382,7 @@ var ajax = function ajax(_ref) {
382
382
  error.message = '请求超时';
383
383
  break;
384
384
  case 500:
385
- error.message = '服务器端出错';
385
+ error.message = '服务器错误';
386
386
  break;
387
387
  case 501:
388
388
  error.message = '网络未实现';
@@ -738,18 +738,23 @@ var dayOfMonth = function dayOfMonth(date) {
738
738
  * @desc:添加js内容
739
739
  * @author huangbo
740
740
  * @date 2022年5月7日
741
- * @param {Function} [fn] - 函数
741
+ * @param {Function} [callback] - 函数
742
742
  * @param {Number} [wait] - 延迟毫秒数
743
743
  * @param {Boolean} [immediate] - 是否首次触发执行
744
744
  **/
745
745
 
746
- var debounce = function debounce(callback, delay) {
747
- var timeout = null;
746
+ var debounce = function debounce(callback, wait) {
747
+ var timeout = void 0;
748
748
  return function () {
749
- clearTimeout(timeout);
750
- timeout = setTimeout(callback, delay ? delay : 500);
749
+ var context = this;
750
+ var args = arguments;
751
+ if (timeout) clearTimeout(timeout);
752
+ timeout = setTimeout(function () {
753
+ callback.apply(context, args);
754
+ }, wait || 500);
751
755
  };
752
756
  };
757
+
753
758
  /**
754
759
  * delUrlParam
755
760
  * @desc:删除url指定参数
@@ -2886,7 +2891,8 @@ var toFunction = function toFunction(str) {
2886
2891
  * @param {string} [$color] - 颜色值
2887
2892
  **/
2888
2893
  var updateTheme = function updateTheme(color, send) {
2889
- color = color ? color : '#409eff';
2894
+ color = color && startWith(color, '#') ? color : '#409eff';
2895
+
2890
2896
  if (send === undefined) {
2891
2897
  send = true;
2892
2898
  }
package/lib/calendar.js CHANGED
@@ -199,7 +199,7 @@ function normalizeComponent(
199
199
  // ESM COMPAT FLAG
200
200
  __webpack_require__.r(__webpack_exports__);
201
201
 
202
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=16d22569&
202
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=template&id=31c0856e&
203
203
  var render = function () {
204
204
  var _vm = this
205
205
  var _h = _vm.$createElement
@@ -352,7 +352,7 @@ var staticRenderFns = []
352
352
  render._withStripped = true
353
353
 
354
354
 
355
- // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=16d22569&
355
+ // CONCATENATED MODULE: ./packages/calendar/src/main.vue?vue&type=template&id=31c0856e&
356
356
 
357
357
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/calendar/src/main.vue?vue&type=script&lang=js&
358
358
  //
@@ -417,7 +417,7 @@ render._withStripped = true
417
417
  //
418
418
 
419
419
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
420
- name: 'esCalendar',
420
+ name: 'EsCalendar',
421
421
  props: {
422
422
  //显示title
423
423
  showTitle: {
package/lib/card.js CHANGED
@@ -199,7 +199,7 @@ function normalizeComponent(
199
199
  // ESM COMPAT FLAG
200
200
  __webpack_require__.r(__webpack_exports__);
201
201
 
202
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=template&id=4bbf6102&
202
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=template&id=1ead069c&
203
203
  var render = function () {
204
204
  var _vm = this
205
205
  var _h = _vm.$createElement
@@ -224,9 +224,9 @@ var render = function () {
224
224
  _vm.isObject
225
225
  ? [
226
226
  _vm.header.icon
227
- ? _c("i", {
227
+ ? _c("es-icon", {
228
228
  staticClass: "es-header-icon",
229
- class: _vm.header.icon,
229
+ attrs: { contents: _vm.header.icon },
230
230
  })
231
231
  : _vm._e(),
232
232
  _vm.header.text
@@ -235,9 +235,9 @@ var render = function () {
235
235
  ])
236
236
  : _vm._e(),
237
237
  _vm.header.icons
238
- ? _c("i", {
238
+ ? _c("es-icon", {
239
239
  staticClass: "es-header-icons",
240
- class: _vm.header.icons,
240
+ attrs: { contents: _vm.header.icons },
241
241
  })
242
242
  : _vm._e(),
243
243
  _vm.header.tabs
@@ -404,7 +404,7 @@ var staticRenderFns = []
404
404
  render._withStripped = true
405
405
 
406
406
 
407
- // CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=template&id=4bbf6102&
407
+ // CONCATENATED MODULE: ./packages/card/src/main.vue?vue&type=template&id=1ead069c&
408
408
 
409
409
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/card/src/main.vue?vue&type=script&lang=js&
410
410
  //
@@ -369,7 +369,7 @@ var ajax = function ajax(_ref) {
369
369
  error.message = '未授权,请重新登录';
370
370
  break;
371
371
  case 403:
372
- error.message = '登录过期,请重新登录';
372
+ error.message = '服务器错误';
373
373
  break;
374
374
  case 404:
375
375
  error.message = '网络请求不存在';
@@ -381,7 +381,7 @@ var ajax = function ajax(_ref) {
381
381
  error.message = '请求超时';
382
382
  break;
383
383
  case 500:
384
- error.message = '服务器端出错';
384
+ error.message = '服务器错误';
385
385
  break;
386
386
  case 501:
387
387
  error.message = '网络未实现';
@@ -737,18 +737,23 @@ var dayOfMonth = function dayOfMonth(date) {
737
737
  * @desc:添加js内容
738
738
  * @author huangbo
739
739
  * @date 2022年5月7日
740
- * @param {Function} [fn] - 函数
740
+ * @param {Function} [callback] - 函数
741
741
  * @param {Number} [wait] - 延迟毫秒数
742
742
  * @param {Boolean} [immediate] - 是否首次触发执行
743
743
  **/
744
744
 
745
- var debounce = function debounce(callback, delay) {
746
- var timeout = null;
745
+ var debounce = function debounce(callback, wait) {
746
+ var timeout = void 0;
747
747
  return function () {
748
- clearTimeout(timeout);
749
- timeout = setTimeout(callback, delay ? delay : 500);
748
+ var context = this;
749
+ var args = arguments;
750
+ if (timeout) clearTimeout(timeout);
751
+ timeout = setTimeout(function () {
752
+ callback.apply(context, args);
753
+ }, wait || 500);
750
754
  };
751
755
  };
756
+
752
757
  /**
753
758
  * delUrlParam
754
759
  * @desc:删除url指定参数
@@ -2885,7 +2890,8 @@ var toFunction = function toFunction(str) {
2885
2890
  * @param {string} [$color] - 颜色值
2886
2891
  **/
2887
2892
  var updateTheme = function updateTheme(color, send) {
2888
- color = color ? color : '#409eff';
2893
+ color = color && startWith(color, '#') ? color : '#409eff';
2894
+
2889
2895
  if (send === undefined) {
2890
2896
  send = true;
2891
2897
  }
@@ -369,7 +369,7 @@ var ajax = function ajax(_ref) {
369
369
  error.message = '未授权,请重新登录';
370
370
  break;
371
371
  case 403:
372
- error.message = '登录过期,请重新登录';
372
+ error.message = '服务器错误';
373
373
  break;
374
374
  case 404:
375
375
  error.message = '网络请求不存在';
@@ -381,7 +381,7 @@ var ajax = function ajax(_ref) {
381
381
  error.message = '请求超时';
382
382
  break;
383
383
  case 500:
384
- error.message = '服务器端出错';
384
+ error.message = '服务器错误';
385
385
  break;
386
386
  case 501:
387
387
  error.message = '网络未实现';
@@ -737,18 +737,23 @@ var dayOfMonth = function dayOfMonth(date) {
737
737
  * @desc:添加js内容
738
738
  * @author huangbo
739
739
  * @date 2022年5月7日
740
- * @param {Function} [fn] - 函数
740
+ * @param {Function} [callback] - 函数
741
741
  * @param {Number} [wait] - 延迟毫秒数
742
742
  * @param {Boolean} [immediate] - 是否首次触发执行
743
743
  **/
744
744
 
745
- var debounce = function debounce(callback, delay) {
746
- var timeout = null;
745
+ var debounce = function debounce(callback, wait) {
746
+ var timeout = void 0;
747
747
  return function () {
748
- clearTimeout(timeout);
749
- timeout = setTimeout(callback, delay ? delay : 500);
748
+ var context = this;
749
+ var args = arguments;
750
+ if (timeout) clearTimeout(timeout);
751
+ timeout = setTimeout(function () {
752
+ callback.apply(context, args);
753
+ }, wait || 500);
750
754
  };
751
755
  };
756
+
752
757
  /**
753
758
  * delUrlParam
754
759
  * @desc:删除url指定参数
@@ -2885,7 +2890,8 @@ var toFunction = function toFunction(str) {
2885
2890
  * @param {string} [$color] - 颜色值
2886
2891
  **/
2887
2892
  var updateTheme = function updateTheme(color, send) {
2888
- color = color ? color : '#409eff';
2893
+ color = color && startWith(color, '#') ? color : '#409eff';
2894
+
2889
2895
  if (send === undefined) {
2890
2896
  send = true;
2891
2897
  }