eoss-ui 0.5.74 → 0.5.75

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 (65) hide show
  1. package/lib/button-group.js +99 -23
  2. package/lib/button.js +99 -23
  3. package/lib/checkbox-group.js +99 -23
  4. package/lib/data-table-form.js +99 -23
  5. package/lib/data-table.js +114 -29
  6. package/lib/date-picker.js +99 -23
  7. package/lib/dialog.js +99 -23
  8. package/lib/eoss-ui.common.js +170 -52
  9. package/lib/flow-group.js +99 -23
  10. package/lib/flow-list.js +99 -23
  11. package/lib/flow.js +99 -23
  12. package/lib/form.js +99 -23
  13. package/lib/handle-user.js +99 -23
  14. package/lib/handler.js +99 -23
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +98 -22
  17. package/lib/input.js +115 -29
  18. package/lib/login.js +123 -26
  19. package/lib/main.js +99 -23
  20. package/lib/nav.js +99 -23
  21. package/lib/page.js +99 -23
  22. package/lib/player.js +99 -23
  23. package/lib/qr-code.js +99 -23
  24. package/lib/radio-group.js +99 -23
  25. package/lib/retrial-auth.js +99 -23
  26. package/lib/select-ganged.js +99 -23
  27. package/lib/select.js +114 -28
  28. package/lib/selector-panel.js +99 -23
  29. package/lib/selector.js +99 -23
  30. package/lib/sizer.js +99 -23
  31. package/lib/steps.js +99 -23
  32. package/lib/switch.js +98 -22
  33. package/lib/table-form.js +99 -23
  34. package/lib/tabs.js +99 -23
  35. package/lib/theme-chalk/base.css +1 -1
  36. package/lib/theme-chalk/index.css +1 -1
  37. package/lib/theme-chalk/login.css +1 -1
  38. package/lib/theme-chalk/main.css +1 -1
  39. package/lib/theme-chalk/menu.css +1 -1
  40. package/lib/theme-chalk/sizer.css +1 -1
  41. package/lib/theme-chalk/upload.css +1 -1
  42. package/lib/tips.js +99 -23
  43. package/lib/tree-group.js +99 -23
  44. package/lib/tree.js +99 -23
  45. package/lib/upload.js +99 -23
  46. package/lib/utils/util.js +98 -22
  47. package/lib/wujie.js +99 -23
  48. package/lib/wxlogin.js +98 -22
  49. package/package.json +2 -2
  50. package/packages/data-table/src/main.vue +10 -1
  51. package/packages/input/src/main.vue +7 -6
  52. package/packages/login/src/main.vue +13 -0
  53. package/packages/select/src/main.vue +6 -5
  54. package/packages/theme-chalk/lib/base.css +1 -1
  55. package/packages/theme-chalk/lib/index.css +1 -1
  56. package/packages/theme-chalk/lib/login.css +1 -1
  57. package/packages/theme-chalk/lib/main.css +1 -1
  58. package/packages/theme-chalk/lib/menu.css +1 -1
  59. package/packages/theme-chalk/lib/sizer.css +1 -1
  60. package/packages/theme-chalk/lib/upload.css +1 -1
  61. package/packages/theme-chalk/src/base.scss +3 -0
  62. package/packages/theme-chalk/src/login.scss +175 -171
  63. package/packages/theme-chalk/src/main.scss +5 -2
  64. package/src/index.js +1 -1
  65. package/src/utils/util.js +112 -23
@@ -620,6 +620,35 @@ var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
620
620
  return workdays;
621
621
  };
622
622
 
623
+ /**
624
+ * chunkToChinese
625
+ * @desc 将四位数的整数转换为中文大写
626
+ * @param {number} chunk - 数字
627
+ **/
628
+ function chunkToChinese(chunk) {
629
+ var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
630
+ var capitalDigits = ['', '拾', '佰', '仟'];
631
+
632
+ var result = '';
633
+ var digitIndex = 0;
634
+
635
+ while (chunk > 0) {
636
+ var digit = chunk % 10;
637
+ if (digit > 0) {
638
+ result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
639
+ } else {
640
+ // 当前数字是零,需要判断是否需要添加零
641
+ if (result.charAt(0) !== '零') {
642
+ result = '零' + result;
643
+ }
644
+ }
645
+ chunk = Math.floor(chunk / 10);
646
+ digitIndex++;
647
+ }
648
+
649
+ return result;
650
+ }
651
+
623
652
  /**
624
653
  * concatenate
625
654
  * @desc 指定连接符合并文本
@@ -1815,6 +1844,31 @@ var getWeekday = function getWeekday(date) {
1815
1844
  return adjustedDay === 0 ? 7 : adjustedDay;
1816
1845
  };
1817
1846
 
1847
+ /**
1848
+ * getZoom
1849
+ * @desc 获取缩放比
1850
+ * @param {number} n - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
1851
+ **/
1852
+ var getZoom = function getZoom() {
1853
+ var ratio = 0;
1854
+ var screen = window.screen;
1855
+ var ua = navigator.userAgent.toLowerCase();
1856
+ if (window.devicePixelRatio !== undefined) {
1857
+ ratio = window.devicePixelRatio;
1858
+ } else if (~ua.indexOf('msie')) {
1859
+ if (screen.deviceXDPI && screen.logicalXDPI) {
1860
+ ratio = screen.deviceXDPI / screen.logicalXDPI;
1861
+ }
1862
+ } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
1863
+ ratio = window.outerWidth / window.innerWidth;
1864
+ }
1865
+
1866
+ if (ratio) {
1867
+ ratio = Math.round(ratio * 100);
1868
+ }
1869
+
1870
+ return ratio / 100;
1871
+ };
1818
1872
  /**
1819
1873
  * handlerUrl
1820
1874
  * @desc:更新url参数中的时间戳
@@ -2557,32 +2611,53 @@ var rmbToCapital = function rmbToCapital(number) {
2557
2611
 
2558
2612
  return result;
2559
2613
  };
2560
-
2561
- // 辅助函数,将四位数的整数转换为中文大写
2562
- function chunkToChinese(chunk) {
2563
- var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
2564
- var capitalDigits = ['', '拾', '佰', '仟'];
2565
-
2566
- var result = '';
2567
- var digitIndex = 0;
2568
-
2569
- while (chunk > 0) {
2570
- var digit = chunk % 10;
2571
- if (digit > 0) {
2572
- result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
2614
+ /**
2615
+ * setScale
2616
+ * @desc 设置缩放
2617
+ * @param {number} width - 分辨率宽度
2618
+ * @param {number} height - 分辨率高度
2619
+ **/
2620
+ var setScale = function setScale() {
2621
+ var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
2622
+ var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1080;
2623
+
2624
+ var n = 1;
2625
+ var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
2626
+ var zoom = getZoom();
2627
+ if (isMac) {
2628
+ n = 2;
2629
+ } else {
2630
+ n = 1;
2631
+ }
2632
+ if (zoom === 1) {
2633
+ document.body.style.removeProperty('transform');
2634
+ document.body.style.removeProperty('width');
2635
+ document.body.style.removeProperty('height');
2636
+ document.body.style.removeProperty('transform-origin');
2637
+ return;
2638
+ }
2639
+ if (Math.abs(parseInt(width - window.innerWidth * zoom / n, 10)) > 15 && window.innerWidth * zoom / n !== width) {
2640
+ var scale = 'scale(' + window.innerWidth * zoom / width / zoom + ',' + window.innerHeight * zoom / height / zoom + ')';
2641
+ document.body.style.transform = scale;
2642
+ document.body.style.width = width + 'px';
2643
+ document.body.style.height = height + 'px';
2644
+ document.body.style.transformOrigin = '0 0';
2645
+ } else {
2646
+ if (isMac) {
2647
+ var _scale = 'scale(' + 1 * n / zoom + ')';
2648
+ document.body.style.transform = _scale;
2649
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2650
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2651
+ document.body.style.transformOrigin = '0 0';
2573
2652
  } else {
2574
- // 当前数字是零,需要判断是否需要添加零
2575
- if (result.charAt(0) !== '零') {
2576
- result = '零' + result;
2577
- }
2653
+ var _scale2 = 'scale(' + 1 * n / zoom + ')';
2654
+ document.body.style.transform = _scale2;
2655
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2656
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2657
+ document.body.style.transformOrigin = '0 0';
2578
2658
  }
2579
- chunk = Math.floor(chunk / 10);
2580
- digitIndex++;
2581
2659
  }
2582
-
2583
- return result;
2584
- }
2585
-
2660
+ };
2586
2661
  /**
2587
2662
  * sendMessage
2588
2663
  * @desc:向iframe发送信息
@@ -3118,6 +3193,7 @@ var watermark = function watermark(option) {
3118
3193
  rmbToCapital: rmbToCapital,
3119
3194
  sendMessage: sendMessage,
3120
3195
  setFavicon: setFavicon,
3196
+ setScale: setScale,
3121
3197
  setStorage: setStorage,
3122
3198
  socket: socket,
3123
3199
  startWith: startWith,
@@ -6707,8 +6783,8 @@ clients_src_main.install = function (Vue) {
6707
6783
  };
6708
6784
 
6709
6785
  /* harmony default export */ var clients = (clients_src_main);
6710
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=7b641b60&
6711
- var mainvue_type_template_id_7b641b60_render = function () {
6786
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=202d0a16&
6787
+ var mainvue_type_template_id_202d0a16_render = function () {
6712
6788
  var _vm = this
6713
6789
  var _h = _vm.$createElement
6714
6790
  var _c = _vm._self._c || _h
@@ -7018,11 +7094,11 @@ var mainvue_type_template_id_7b641b60_render = function () {
7018
7094
  1
7019
7095
  )
7020
7096
  }
7021
- var mainvue_type_template_id_7b641b60_staticRenderFns = []
7022
- mainvue_type_template_id_7b641b60_render._withStripped = true
7097
+ var mainvue_type_template_id_202d0a16_staticRenderFns = []
7098
+ mainvue_type_template_id_202d0a16_render._withStripped = true
7023
7099
 
7024
7100
 
7025
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=7b641b60&
7101
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=202d0a16&
7026
7102
 
7027
7103
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/children.vue?vue&type=template&id=44b7ff61&
7028
7104
  var childrenvue_type_template_id_44b7ff61_render = function () {
@@ -9451,12 +9527,14 @@ var mainvue_type_script_lang_js_components, _watch;
9451
9527
  theads: {
9452
9528
  get: function get() {
9453
9529
  var thead = [];
9530
+ var addfilter = false;
9454
9531
  var types = this.theadData.filter(function (item) {
9455
9532
  return item.type == 'selection' || item.type == 'index' || item.type == 'sort';
9456
9533
  }).map(function (item) {
9457
9534
  return item.type;
9458
9535
  });
9459
9536
  if (this.dragSort && !types.includes('sort')) {
9537
+ addfilter = true;
9460
9538
  thead.push({
9461
9539
  type: 'sort',
9462
9540
  key: 'es-sort'
@@ -9470,8 +9548,12 @@ var mainvue_type_script_lang_js_components, _watch;
9470
9548
  fixed: 'left',
9471
9549
  selectable: this.selectable,
9472
9550
  reserveSelection: this.reserveSelection,
9551
+ filterIcon: this.filter && !addfilter ? 'es-icon-biao' : undefined,
9473
9552
  key: 'es-checkbox'
9474
9553
  });
9554
+ if (!addfilter) {
9555
+ addfilter = true;
9556
+ }
9475
9557
  }
9476
9558
  if (this.numbers && !types.includes('index')) {
9477
9559
  var index = 1;
@@ -9487,9 +9569,12 @@ var mainvue_type_script_lang_js_components, _watch;
9487
9569
  align: 'center',
9488
9570
  fixed: 'left',
9489
9571
  index: index,
9490
- filterIcon: this.filter ? 'es-icon-biao' : undefined,
9572
+ filterIcon: this.filter && !addfilter ? 'es-icon-biao' : undefined,
9491
9573
  key: 'es-index'
9492
9574
  });
9575
+ if (!addfilter) {
9576
+ addfilter = true;
9577
+ }
9493
9578
  }
9494
9579
  if (this.theadData.length) {
9495
9580
  thead = [].concat(thead, this.theadData);
@@ -10455,8 +10540,8 @@ var mainvue_type_script_lang_js_components, _watch;
10455
10540
 
10456
10541
  var data_table_src_main_component = normalizeComponent(
10457
10542
  packages_data_table_src_mainvue_type_script_lang_js_,
10458
- mainvue_type_template_id_7b641b60_render,
10459
- mainvue_type_template_id_7b641b60_staticRenderFns,
10543
+ mainvue_type_template_id_202d0a16_render,
10544
+ mainvue_type_template_id_202d0a16_staticRenderFns,
10460
10545
  false,
10461
10546
  null,
10462
10547
  null,
@@ -46340,6 +46425,8 @@ var input_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
46340
46425
 
46341
46426
  var input_src_mainvue_type_script_lang_js_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; };
46342
46427
 
46428
+ function mainvue_type_script_lang_js_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; }
46429
+
46343
46430
 
46344
46431
 
46345
46432
 
@@ -46572,26 +46659,34 @@ var input_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function"
46572
46659
  }, [content]);
46573
46660
  }
46574
46661
  }
46662
+
46663
+ var _$attrs = this.$attrs,
46664
+ prefix = _$attrs.prefix,
46665
+ suffix = _$attrs.suffix,
46666
+ prepend = _$attrs.prepend,
46667
+ append = _$attrs.append,
46668
+ attrs = mainvue_type_script_lang_js_objectWithoutProperties(_$attrs, ['prefix', 'suffix', 'prepend', 'append']);
46669
+
46575
46670
  if (this.$slots.prefix) {
46576
46671
  doms.push(h('template', { slot: 'prefix' }, this.$slots.prefix));
46577
- } else if (this.$attrs.prefix) {
46672
+ } else if (prefix) {
46578
46673
  this.renderd(doms, h, 'prefix');
46579
46674
  cls.push('es-input-button-prefix');
46580
46675
  }
46581
46676
  if (this.$slots.suffix) {
46582
46677
  doms.push(h('template', { slot: 'suffix' }, this.$slots.suffix));
46583
- } else if (this.$attrs.suffix) {
46678
+ } else if (suffix) {
46584
46679
  this.renderd(doms, h, 'suffix');
46585
46680
  cls.push('es-input-button-suffix');
46586
46681
  }
46587
46682
  if (this.$slots.prepend) {
46588
46683
  doms.push(h('template', { slot: 'prepend' }, this.$slots.prepend));
46589
- } else if (this.$attrs.prepend) {
46684
+ } else if (prepend) {
46590
46685
  this.renderd(doms, h, 'prepend');
46591
46686
  }
46592
46687
  if (this.$slots.append) {
46593
46688
  doms.push(h('template', { slot: 'append' }, this.$slots.append));
46594
- } else if (this.$attrs.append) {
46689
+ } else if (append) {
46595
46690
  this.renderd(doms, h, 'append');
46596
46691
  }
46597
46692
  if (this.fetchSuggestions || this.url || this.data.length > 0) {
@@ -46600,7 +46695,7 @@ var input_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function"
46600
46695
  props: {
46601
46696
  rules: this.rule
46602
46697
  },
46603
- attrs: input_src_mainvue_type_script_lang_js_extends({}, this.$attrs, {
46698
+ attrs: input_src_mainvue_type_script_lang_js_extends({}, attrs, {
46604
46699
  fetchSuggestions: this.fetchSuggestions ? this.fetchSuggestions : this.getData,
46605
46700
  triggerOnFocus: this.focusShow,
46606
46701
  value: this.model
@@ -46618,7 +46713,7 @@ var input_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function"
46618
46713
  domProps: {
46619
46714
  value: this.model
46620
46715
  },
46621
- attrs: input_src_mainvue_type_script_lang_js_extends({}, this.$attrs),
46716
+ attrs: input_src_mainvue_type_script_lang_js_extends({}, attrs),
46622
46717
  on: input_src_mainvue_type_script_lang_js_extends({}, this.$listeners),
46623
46718
  directives: [{
46624
46719
  name: 'show',
@@ -47479,8 +47574,8 @@ layout_src_main.install = function (Vue) {
47479
47574
  };
47480
47575
 
47481
47576
  /* harmony default export */ var layout = (layout_src_main);
47482
- // 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=249fae96&
47483
- var mainvue_type_template_id_249fae96_render = function () {
47577
+ // 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=5f60346a&
47578
+ var mainvue_type_template_id_5f60346a_render = function () {
47484
47579
  var _vm = this
47485
47580
  var _h = _vm.$createElement
47486
47581
  var _c = _vm._self._c || _h
@@ -48410,11 +48505,11 @@ var mainvue_type_template_id_249fae96_render = function () {
48410
48505
  )
48411
48506
  : _vm._e()
48412
48507
  }
48413
- var mainvue_type_template_id_249fae96_staticRenderFns = []
48414
- mainvue_type_template_id_249fae96_render._withStripped = true
48508
+ var mainvue_type_template_id_5f60346a_staticRenderFns = []
48509
+ mainvue_type_template_id_5f60346a_render._withStripped = true
48415
48510
 
48416
48511
 
48417
- // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=249fae96&
48512
+ // CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=5f60346a&
48418
48513
 
48419
48514
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=579bc87d&
48420
48515
  var resetPasswordvue_type_template_id_579bc87d_render = function () {
@@ -49333,6 +49428,7 @@ var login_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
49333
49428
 
49334
49429
 
49335
49430
 
49431
+
49336
49432
  /* harmony default export */ var login_src_mainvue_type_script_lang_js_ = ({
49337
49433
  name: 'EsLogin',
49338
49434
  inheritAttrs: false,
@@ -49521,6 +49617,10 @@ var login_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
49521
49617
  scanIntervalTime: {
49522
49618
  type: Number,
49523
49619
  default: 1500
49620
+ },
49621
+ isScale: {
49622
+ type: Boolean,
49623
+ default: true
49524
49624
  }
49525
49625
  },
49526
49626
  computed: {
@@ -49714,9 +49814,16 @@ var login_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
49714
49814
  };
49715
49815
  },
49716
49816
  beforeCreate: function beforeCreate() {
49817
+ this.setScale = Object(external_throttle_debounce_["debounce"])(300, function () {
49818
+ utils_util["a" /* default */].setScale();
49819
+ });
49717
49820
  utils_util["a" /* default */].removeStorage(['remind', 'ssId', 'token', 'Authorization', 'deviceUnique', 'userId', 'userName', 'useCaseCodes']);
49718
49821
  },
49719
49822
  created: function created() {
49823
+ if (this.isScale) {
49824
+ utils_util["a" /* default */].setScale();
49825
+ window.addEventListener('resize', this.setScale);
49826
+ }
49720
49827
  this.code = utils_util["a" /* default */].getParams('code');
49721
49828
  if (this.code) {
49722
49829
  this.doWechatLogin(this.code);
@@ -50435,6 +50542,7 @@ var login_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
50435
50542
  }
50436
50543
  },
50437
50544
  beforeDestroy: function beforeDestroy() {
50545
+ window.removeEventListener('resize', this.setScale);
50438
50546
  document.removeEventListener('keyup', this.doLogin);
50439
50547
  document.removeEventListener('keydown', this.forbiddenTab);
50440
50548
  }
@@ -50451,8 +50559,8 @@ var login_src_mainvue_type_script_lang_js_extends = Object.assign || function (t
50451
50559
 
50452
50560
  var login_src_main_component = normalizeComponent(
50453
50561
  packages_login_src_mainvue_type_script_lang_js_,
50454
- mainvue_type_template_id_249fae96_render,
50455
- mainvue_type_template_id_249fae96_staticRenderFns,
50562
+ mainvue_type_template_id_5f60346a_render,
50563
+ mainvue_type_template_id_5f60346a_staticRenderFns,
50456
50564
  false,
50457
50565
  null,
50458
50566
  null,
@@ -58567,6 +58675,8 @@ var select_src_mainvue_type_script_lang_js_extends = Object.assign || function (
58567
58675
 
58568
58676
  var select_src_mainvue_type_script_lang_js_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; };
58569
58677
 
58678
+ function src_mainvue_type_script_lang_js_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; }
58679
+
58570
58680
 
58571
58681
 
58572
58682
 
@@ -59158,26 +59268,34 @@ var select_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function"
59158
59268
  });
59159
59269
  }
59160
59270
  }
59271
+
59272
+ var _$attrs = this.$attrs,
59273
+ prefix = _$attrs.prefix,
59274
+ suffix = _$attrs.suffix,
59275
+ prepend = _$attrs.prepend,
59276
+ append = _$attrs.append,
59277
+ attrs = src_mainvue_type_script_lang_js_objectWithoutProperties(_$attrs, ['prefix', 'suffix', 'prepend', 'append']);
59278
+
59161
59279
  if (this.$slots.prefix) {
59162
59280
  doms.push(h('template', { slot: 'prefix' }, this.$slots.prefix));
59163
- } else if (this.$attrs.prefix) {
59281
+ } else if (prefix) {
59164
59282
  this.renderd(doms, h, 'prefix');
59165
59283
  cls.push('es-select-button-prefix');
59166
59284
  }
59167
59285
  if (this.$slots.suffix) {
59168
59286
  doms.push(h('template', { slot: 'suffix' }, this.$slots.suffix));
59169
- } else if (this.$attrs.suffix) {
59287
+ } else if (suffix) {
59170
59288
  this.renderd(doms, h, 'suffix');
59171
59289
  cls.push('es-select-button-suffix');
59172
59290
  }
59173
59291
  if (this.$slots.prepend) {
59174
59292
  doms.push(h('template', { slot: 'prepend' }, this.$slots.prepend));
59175
- } else if (this.$attrs.prepend) {
59293
+ } else if (prepend) {
59176
59294
  this.renderd(doms, h, 'prepend');
59177
59295
  }
59178
59296
  if (this.$slots.append) {
59179
59297
  doms.push(h('template', { slot: 'append' }, this.$slots.append));
59180
- } else if (this.$attrs.append) {
59298
+ } else if (append) {
59181
59299
  this.renderd(doms, h, 'append');
59182
59300
  }
59183
59301
  if (!this.models && this.results.length && this.defaultValue) {
@@ -59197,7 +59315,7 @@ var select_src_mainvue_type_script_lang_js_typeof = typeof Symbol === "function"
59197
59315
  name: 'show',
59198
59316
  value: this.display
59199
59317
  }],
59200
- props: select_src_mainvue_type_script_lang_js_extends({}, this.$attrs, {
59318
+ props: select_src_mainvue_type_script_lang_js_extends({}, attrs, {
59201
59319
  multiple: this.multiple,
59202
59320
  valueType: this.valueType,
59203
59321
  valueKey: this.valKey,
@@ -68522,7 +68640,7 @@ tree_group_src_main.install = function (Vue) {
68522
68640
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/toolbar/src/main.vue?vue&type=script&lang=js&
68523
68641
  var toolbar_src_mainvue_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; };
68524
68642
 
68525
- function mainvue_type_script_lang_js_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; }
68643
+ function toolbar_src_mainvue_type_script_lang_js_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; }
68526
68644
 
68527
68645
  /* harmony default export */ var toolbar_src_mainvue_type_script_lang_js_ = ({
68528
68646
  name: 'EsToolbar',
@@ -68673,7 +68791,7 @@ function mainvue_type_script_lang_js_objectWithoutProperties(obj, keys) { var ta
68673
68791
  multiCondition = items.multiCondition,
68674
68792
  contents = items.contents,
68675
68793
  group = items.group,
68676
- other = mainvue_type_script_lang_js_objectWithoutProperties(items, ['config', 'type', 'reset', 'multiCondition', 'contents', 'group']);
68794
+ other = toolbar_src_mainvue_type_script_lang_js_objectWithoutProperties(items, ['config', 'type', 'reset', 'multiCondition', 'contents', 'group']);
68677
68795
 
68678
68796
  if (type === 'text') {
68679
68797
  text = [h('div', { class: 'es-toolbar-text' }, Array.isArray(contents) ? contents.map(function (item) {
@@ -75073,7 +75191,7 @@ if (typeof window !== 'undefined' && window.Vue) {
75073
75191
  }
75074
75192
 
75075
75193
  /* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
75076
- version: '0.5.74',
75194
+ version: '0.5.75',
75077
75195
  install: install,
75078
75196
  Button: packages_button,
75079
75197
  ButtonGroup: button_group,
package/lib/flow-group.js CHANGED
@@ -621,6 +621,35 @@ var calculateNetworkDays = function calculateNetworkDays(start_date, end_date) {
621
621
  return workdays;
622
622
  };
623
623
 
624
+ /**
625
+ * chunkToChinese
626
+ * @desc 将四位数的整数转换为中文大写
627
+ * @param {number} chunk - 数字
628
+ **/
629
+ function chunkToChinese(chunk) {
630
+ var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
631
+ var capitalDigits = ['', '拾', '佰', '仟'];
632
+
633
+ var result = '';
634
+ var digitIndex = 0;
635
+
636
+ while (chunk > 0) {
637
+ var digit = chunk % 10;
638
+ if (digit > 0) {
639
+ result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
640
+ } else {
641
+ // 当前数字是零,需要判断是否需要添加零
642
+ if (result.charAt(0) !== '零') {
643
+ result = '零' + result;
644
+ }
645
+ }
646
+ chunk = Math.floor(chunk / 10);
647
+ digitIndex++;
648
+ }
649
+
650
+ return result;
651
+ }
652
+
624
653
  /**
625
654
  * concatenate
626
655
  * @desc 指定连接符合并文本
@@ -1816,6 +1845,31 @@ var getWeekday = function getWeekday(date) {
1816
1845
  return adjustedDay === 0 ? 7 : adjustedDay;
1817
1846
  };
1818
1847
 
1848
+ /**
1849
+ * getZoom
1850
+ * @desc 获取缩放比
1851
+ * @param {number} n - 可选参数,表示星期的起始日,0 表示星期天,1 表示星期一,以此类推,默认为 0
1852
+ **/
1853
+ var getZoom = function getZoom() {
1854
+ var ratio = 0;
1855
+ var screen = window.screen;
1856
+ var ua = navigator.userAgent.toLowerCase();
1857
+ if (window.devicePixelRatio !== undefined) {
1858
+ ratio = window.devicePixelRatio;
1859
+ } else if (~ua.indexOf('msie')) {
1860
+ if (screen.deviceXDPI && screen.logicalXDPI) {
1861
+ ratio = screen.deviceXDPI / screen.logicalXDPI;
1862
+ }
1863
+ } else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
1864
+ ratio = window.outerWidth / window.innerWidth;
1865
+ }
1866
+
1867
+ if (ratio) {
1868
+ ratio = Math.round(ratio * 100);
1869
+ }
1870
+
1871
+ return ratio / 100;
1872
+ };
1819
1873
  /**
1820
1874
  * handlerUrl
1821
1875
  * @desc:更新url参数中的时间戳
@@ -2558,32 +2612,53 @@ var rmbToCapital = function rmbToCapital(number) {
2558
2612
 
2559
2613
  return result;
2560
2614
  };
2561
-
2562
- // 辅助函数,将四位数的整数转换为中文大写
2563
- function chunkToChinese(chunk) {
2564
- var numberToChinese = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
2565
- var capitalDigits = ['', '拾', '佰', '仟'];
2566
-
2567
- var result = '';
2568
- var digitIndex = 0;
2569
-
2570
- while (chunk > 0) {
2571
- var digit = chunk % 10;
2572
- if (digit > 0) {
2573
- result = numberToChinese[digit] + capitalDigits[digitIndex] + result;
2615
+ /**
2616
+ * setScale
2617
+ * @desc 设置缩放
2618
+ * @param {number} width - 分辨率宽度
2619
+ * @param {number} height - 分辨率高度
2620
+ **/
2621
+ var setScale = function setScale() {
2622
+ var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1920;
2623
+ var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1080;
2624
+
2625
+ var n = 1;
2626
+ var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
2627
+ var zoom = getZoom();
2628
+ if (isMac) {
2629
+ n = 2;
2630
+ } else {
2631
+ n = 1;
2632
+ }
2633
+ if (zoom === 1) {
2634
+ document.body.style.removeProperty('transform');
2635
+ document.body.style.removeProperty('width');
2636
+ document.body.style.removeProperty('height');
2637
+ document.body.style.removeProperty('transform-origin');
2638
+ return;
2639
+ }
2640
+ if (Math.abs(parseInt(width - window.innerWidth * zoom / n, 10)) > 15 && window.innerWidth * zoom / n !== width) {
2641
+ var scale = 'scale(' + window.innerWidth * zoom / width / zoom + ',' + window.innerHeight * zoom / height / zoom + ')';
2642
+ document.body.style.transform = scale;
2643
+ document.body.style.width = width + 'px';
2644
+ document.body.style.height = height + 'px';
2645
+ document.body.style.transformOrigin = '0 0';
2646
+ } else {
2647
+ if (isMac) {
2648
+ var _scale = 'scale(' + 1 * n / zoom + ')';
2649
+ document.body.style.transform = _scale;
2650
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2651
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2652
+ document.body.style.transformOrigin = '0 0';
2574
2653
  } else {
2575
- // 当前数字是零,需要判断是否需要添加零
2576
- if (result.charAt(0) !== '零') {
2577
- result = '零' + result;
2578
- }
2654
+ var _scale2 = 'scale(' + 1 * n / zoom + ')';
2655
+ document.body.style.transform = _scale2;
2656
+ document.body.style.width = parseInt(window.innerWidth * zoom / n, 10) + 'px';
2657
+ document.body.style.height = parseInt(window.innerHeight * zoom / n, 10) + 'px';
2658
+ document.body.style.transformOrigin = '0 0';
2579
2659
  }
2580
- chunk = Math.floor(chunk / 10);
2581
- digitIndex++;
2582
2660
  }
2583
-
2584
- return result;
2585
- }
2586
-
2661
+ };
2587
2662
  /**
2588
2663
  * sendMessage
2589
2664
  * @desc:向iframe发送信息
@@ -3119,6 +3194,7 @@ var watermark = function watermark(option) {
3119
3194
  rmbToCapital: rmbToCapital,
3120
3195
  sendMessage: sendMessage,
3121
3196
  setFavicon: setFavicon,
3197
+ setScale: setScale,
3122
3198
  setStorage: setStorage,
3123
3199
  socket: socket,
3124
3200
  startWith: startWith,