@deanwu/vue-component-library 1.0.39 → 1.0.40

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.
@@ -87203,6 +87203,15 @@ var es_array_splice = __webpack_require__("a434");
87203
87203
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
87204
87204
  var es_function_name = __webpack_require__("b0c0");
87205
87205
 
87206
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
87207
+ var es_regexp_exec = __webpack_require__("ac1f");
87208
+
87209
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
87210
+ var es_string_replace = __webpack_require__("5319");
87211
+
87212
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
87213
+ var es_string_split = __webpack_require__("1276");
87214
+
87206
87215
  // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
87207
87216
  var web_dom_collections_for_each = __webpack_require__("159b");
87208
87217
 
@@ -87841,18 +87850,9 @@ var es_object_to_string = __webpack_require__("d3b7");
87841
87850
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
87842
87851
  var es_regexp_constructor = __webpack_require__("4d63");
87843
87852
 
87844
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
87845
- var es_regexp_exec = __webpack_require__("ac1f");
87846
-
87847
87853
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
87848
87854
  var es_regexp_to_string = __webpack_require__("25f0");
87849
87855
 
87850
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
87851
- var es_string_replace = __webpack_require__("5319");
87852
-
87853
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
87854
- var es_string_split = __webpack_require__("1276");
87855
-
87856
87856
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
87857
87857
  var es_symbol = __webpack_require__("a4d3");
87858
87858
 
@@ -92398,127 +92398,6 @@ var crypto_js_default = /*#__PURE__*/__webpack_require__.n(crypto_js);
92398
92398
  var axios = __webpack_require__("bc3a");
92399
92399
  var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
92400
92400
 
92401
- // CONCATENATED MODULE: ./src/assets/script/shortcuts.js
92402
-
92403
-
92404
-
92405
- var SHORTCUTS_CONFIG = {};
92406
- var SHORTCUTS_EVENT = {
92407
- 'ctrl+u': function ctrlU() {
92408
- window.$app.navigateTo('/cashier');
92409
- },
92410
- 'ctrl+i': function ctrlI() {
92411
- window.$app.navigateTo('/orderList');
92412
- },
92413
- 'ctrl+o': function ctrlO() {
92414
- window.$app.navigateTo('/afterSale');
92415
- },
92416
- 'ctrl+p': function ctrlP() {
92417
- window.$app.navigateTo('/handOver');
92418
- },
92419
- 'ctrl+g': function ctrlG() {
92420
- window.$app.navigateTo('/service');
92421
- },
92422
- 'ctrl+e': function ctrlE() {
92423
- window.$app.navigateTo('/orderList/filter/1');
92424
- }
92425
- };
92426
- var dictionary = {
92427
- '~': '`',
92428
- '!': '1',
92429
- '@': '2',
92430
- '#': '3',
92431
- '$': '4',
92432
- '%': '5',
92433
- '^': '6',
92434
- '&': '7',
92435
- '*': '8',
92436
- '(': '9',
92437
- ')': '0',
92438
- '_': '-',
92439
- '+': '=',
92440
- '{': '[',
92441
- '}': ']',
92442
- ':': ';',
92443
- '"': "'",
92444
- '<': ',',
92445
- '>': '.',
92446
- '?': '/',
92447
- ' ': 'space',
92448
- 'arrowup': 'up',
92449
- 'arrowdown': 'down',
92450
- 'arrowleft': 'left',
92451
- 'arrowright': 'right'
92452
- };
92453
- document.addEventListener('keydown', function (e) {
92454
- if (!e.key) return;
92455
-
92456
- switch (e.key) {
92457
- case 'Shift':
92458
- SHORTCUTS.shift = true;
92459
- break;
92460
-
92461
- case 'Control':
92462
- SHORTCUTS.ctrl = true;
92463
- break;
92464
-
92465
- case 'Alt':
92466
- SHORTCUTS.alt = true;
92467
- break;
92468
-
92469
- default:
92470
- SHORTCUTS.keymap(e.key.toLowerCase(), e);
92471
- }
92472
- });
92473
- document.addEventListener('keyup', function (e) {
92474
- switch (e.key) {
92475
- case 'Shift':
92476
- SHORTCUTS.shift = false;
92477
- break;
92478
-
92479
- case 'Control':
92480
- SHORTCUTS.ctrl = false;
92481
- break;
92482
-
92483
- case 'Alt':
92484
- SHORTCUTS.alt = false;
92485
- break;
92486
- }
92487
- });
92488
- var SHORTCUTS = {
92489
- config: function config(_config) {
92490
- for (var i in _config) {
92491
- SHORTCUTS_CONFIG[i] = _config[i];
92492
- }
92493
-
92494
- return SHORTCUTS;
92495
- },
92496
- listener: function listener(key, fun) {
92497
- (_typeof(key) != 'object' ? [key] : key).forEach(function (item) {
92498
- SHORTCUTS_EVENT[item] = fun;
92499
- });
92500
- return SHORTCUTS;
92501
- },
92502
- stop: function stop(key) {
92503
- (_typeof(key) != 'object' ? [key] : key).forEach(function (item) {
92504
- delete SHORTCUTS_EVENT[item];
92505
- });
92506
- return SHORTCUTS;
92507
- },
92508
- keymap: function keymap(key, e) {
92509
- key = (this.ctrl ? 'ctrl+' : '') + (this.shift ? 'shift+' : '') + (this.alt ? 'alt+' : '') + (dictionary[key] || key);
92510
-
92511
- if (SHORTCUTS_EVENT[key]) {
92512
- e && e.preventDefault();
92513
- SHORTCUTS_EVENT[key]({
92514
- key: key
92515
- });
92516
- }
92517
-
92518
- return SHORTCUTS;
92519
- }
92520
- };
92521
- /* harmony default export */ var shortcuts = (SHORTCUTS);
92522
92401
  // CONCATENATED MODULE: ./src/assets/script/global.js
92523
92402
 
92524
92403
 
@@ -92530,7 +92409,6 @@ var SHORTCUTS = {
92530
92409
 
92531
92410
 
92532
92411
 
92533
-
92534
92412
  Date.prototype.format = function () {
92535
92413
  var fmt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'yyyy-MM-dd hh:mm:ss';
92536
92414
  var o = {
@@ -92707,135 +92585,144 @@ function global_install(Vue, config) {
92707
92585
  axios_default.a.requestQueue[index] = request;
92708
92586
  return request;
92709
92587
  };
92710
- /**
92711
- * 函数防抖
92712
- * @param {Function} fun [要执行的方法]
92713
- * @param {Number} timer [间隔时间]
92714
- * @param {Booleans} immediate [是否立即执行]
92715
- * @return {Function} [设置防抖后方法]
92716
- **/
92717
-
92718
92588
 
92719
- Vue.prototype.debounce = function (fun) {
92720
- var timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
92721
- var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
92722
- var timeout, args, context, timestamp, result;
92589
+ Vue.prototype.parsePixel = function (n) {
92590
+ if (!n) return 0;
92723
92591
 
92724
- var later = function later() {
92725
- var last = new Date().getTime() - timestamp;
92592
+ if (parseInt(n) == n) {
92593
+ return n + 'px';
92594
+ } else {
92595
+ return n;
92596
+ }
92597
+ };
92598
+ }
92599
+ // CONCATENATED MODULE: ./src/assets/script/shortcuts.js
92726
92600
 
92727
- if (last < timer && last >= 0) {
92728
- timeout = setTimeout(later, timer - last);
92729
- } else {
92730
- timeout = null;
92731
92601
 
92732
- if (!immediate) {
92733
- result = fun.apply(context, args);
92734
- if (!timeout) context = args = null;
92735
- }
92736
- }
92737
- };
92738
92602
 
92739
- return function () {
92740
- context = this;
92741
- args = arguments;
92742
- timestamp = new Date().getTime();
92743
- var callNow = immediate !== false && !timeout;
92744
- if (!timeout) timeout = setTimeout(later, timer);
92745
-
92746
- if (callNow) {
92747
- result = fun.apply(context, args);
92748
- context = args = null;
92749
- }
92603
+ var SHORTCUTS_CONFIG = {};
92604
+ var SHORTCUTS_EVENT = {
92605
+ 'ctrl+u': function ctrlU() {
92606
+ window.$app.navigateTo('/cashier');
92607
+ },
92608
+ 'ctrl+i': function ctrlI() {
92609
+ window.$app.navigateTo('/orderList');
92610
+ },
92611
+ 'ctrl+o': function ctrlO() {
92612
+ window.$app.navigateTo('/afterSale');
92613
+ },
92614
+ 'ctrl+p': function ctrlP() {
92615
+ window.$app.navigateTo('/handOver');
92616
+ },
92617
+ 'ctrl+g': function ctrlG() {
92618
+ window.$app.navigateTo('/service');
92619
+ },
92620
+ 'ctrl+e': function ctrlE() {
92621
+ window.$app.navigateTo('/orderList/filter/1');
92622
+ }
92623
+ };
92624
+ var dictionary = {
92625
+ '~': '`',
92626
+ '!': '1',
92627
+ '@': '2',
92628
+ '#': '3',
92629
+ '$': '4',
92630
+ '%': '5',
92631
+ '^': '6',
92632
+ '&': '7',
92633
+ '*': '8',
92634
+ '(': '9',
92635
+ ')': '0',
92636
+ '_': '-',
92637
+ '+': '=',
92638
+ '{': '[',
92639
+ '}': ']',
92640
+ ':': ';',
92641
+ '"': "'",
92642
+ '<': ',',
92643
+ '>': '.',
92644
+ '?': '/',
92645
+ ' ': 'space',
92646
+ 'arrowup': 'up',
92647
+ 'arrowdown': 'down',
92648
+ 'arrowleft': 'left',
92649
+ 'arrowright': 'right'
92650
+ };
92651
+ document.addEventListener('keydown', function (e) {
92652
+ if (!e.key) return;
92750
92653
 
92751
- return result;
92752
- };
92753
- };
92754
- /**
92755
- * 函数节流
92756
- * @param {Function} fun [执行的方法]
92757
- * @param {Number} timer [间隔事件]
92758
- * @param {Booleans} leading [是否立即执行一次]
92759
- * @param {Booleabs} trailing [是否执行最后一次延时调用]
92760
- * @return {Function} [设置节流后的方法]
92761
- **/
92654
+ switch (e.key) {
92655
+ case 'Shift':
92656
+ SHORTCUTS.shift = true;
92657
+ break;
92762
92658
 
92659
+ case 'Control':
92660
+ SHORTCUTS.ctrl = true;
92661
+ break;
92763
92662
 
92764
- Vue.prototype.throttle = function (fun) {
92765
- var timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
92766
- var leading = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
92767
- var trailing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
92768
- var context, args, result;
92769
- var timeout = null;
92770
- var previous = 0;
92663
+ case 'Alt':
92664
+ SHORTCUTS.alt = true;
92665
+ break;
92771
92666
 
92772
- var later = function later() {
92773
- previous = !leading ? 0 : new Date().getTime();
92774
- timeout = null;
92775
- result = fun.apply(context, args);
92776
- if (!timeout) context = args = null;
92777
- };
92667
+ default:
92668
+ SHORTCUTS.keymap(e.key.toLowerCase(), e);
92669
+ }
92670
+ });
92671
+ document.addEventListener('keyup', function (e) {
92672
+ switch (e.key) {
92673
+ case 'Shift':
92674
+ SHORTCUTS.shift = false;
92675
+ break;
92778
92676
 
92779
- return function () {
92780
- var now = new Date().getTime();
92781
- if (!previous && !leading) previous = now;
92782
- var remaining = timer - (now - previous);
92783
- context = this;
92784
- args = arguments;
92677
+ case 'Control':
92678
+ SHORTCUTS.ctrl = false;
92679
+ break;
92785
92680
 
92786
- if (remaining <= 0 || remaining > timer) {
92787
- if (timeout) {
92788
- clearTimeout(timeout);
92789
- timeout = null;
92790
- }
92681
+ case 'Alt':
92682
+ SHORTCUTS.alt = false;
92683
+ break;
92684
+ }
92685
+ });
92686
+ var SHORTCUTS = {
92687
+ config: function config(_config) {
92688
+ for (var i in _config) {
92689
+ SHORTCUTS_CONFIG[i] = _config[i];
92690
+ }
92791
92691
 
92792
- previous = now;
92793
- result = fun.apply(context, args);
92794
- if (!timeout) context = args = null;
92795
- } else if (!timeout && !trailing) {
92796
- timeout = setTimeout(later, remaining);
92797
- }
92692
+ return SHORTCUTS;
92693
+ },
92694
+ listener: function listener(key, fun) {
92695
+ (_typeof(key) != 'object' ? [key] : key).forEach(function (item) {
92696
+ SHORTCUTS_EVENT[item] = fun;
92697
+ });
92698
+ return SHORTCUTS;
92699
+ },
92700
+ stop: function stop(key) {
92701
+ (_typeof(key) != 'object' ? [key] : key).forEach(function (item) {
92702
+ delete SHORTCUTS_EVENT[item];
92703
+ });
92704
+ return SHORTCUTS;
92705
+ },
92706
+ keymap: function keymap(key, e) {
92707
+ key = (this.ctrl ? 'ctrl+' : '') + (this.shift ? 'shift+' : '') + (this.alt ? 'alt+' : '') + (dictionary[key] || key);
92798
92708
 
92799
- return result;
92800
- };
92801
- };
92709
+ if (SHORTCUTS_EVENT[key]) {
92710
+ e && e.preventDefault();
92711
+ SHORTCUTS_EVENT[key]({
92712
+ key: key
92713
+ });
92714
+ }
92802
92715
 
92803
- Vue.prototype.cookie = {
92804
- set: function set(name, value, sec) {
92805
- var t = new Date();
92806
- t.setTime(t.getTime() + sec * 1000);
92807
- document.cookie = name + '=' + value + ';expires=' + t + ';path=/';
92808
- },
92809
- get: function get(name) {
92810
- var arr = document.cookie.replace(/\s/g, '').split(";");
92716
+ return SHORTCUTS;
92717
+ }
92718
+ };
92719
+ /* harmony default export */ var shortcuts = (SHORTCUTS);
92720
+ // CONCATENATED MODULE: ./src/components/index.js
92811
92721
 
92812
- for (var i = 0; i < arr.length; i++) {
92813
- var tempArr = arr[i].split("=");
92814
92722
 
92815
- if (tempArr[0] == name) {
92816
- return decodeURIComponent(tempArr[1]);
92817
- }
92818
- }
92819
92723
 
92820
- return '';
92821
- },
92822
- remove: function remove(name) {
92823
- Vue.prototype.cookie.set(name, '', -1);
92824
- }
92825
- };
92826
- Vue.prototype.shortcutKey = shortcuts;
92827
92724
 
92828
- Vue.prototype.parsePixel = function (n) {
92829
- if (!n) return 0;
92830
92725
 
92831
- if (parseInt(n) == n) {
92832
- return n + 'px';
92833
- } else {
92834
- return n;
92835
- }
92836
- };
92837
- }
92838
- // CONCATENATED MODULE: ./src/components/index.js
92839
92726
 
92840
92727
 
92841
92728
 
@@ -92950,7 +92837,124 @@ var components_install = function install(Vue, config) {
92950
92837
  });
92951
92838
  };
92952
92839
 
92953
- /* harmony default export */ var src_components = (components_install);
92840
+ /* harmony default export */ var src_components = ({
92841
+ install: components_install,
92842
+ cryptoJs: crypto_js_default.a,
92843
+ shortcutKey: shortcuts,
92844
+
92845
+ /**
92846
+ * 函数防抖
92847
+ * @param {Function} fun [要执行的方法]
92848
+ * @param {Number} timer [间隔时间]
92849
+ * @param {Booleans} immediate [是否立即执行]
92850
+ * @return {Function} [设置防抖后方法]
92851
+ **/
92852
+ debounce: function debounce(fun) {
92853
+ var timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
92854
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
92855
+ var timeout, args, context, timestamp, result;
92856
+
92857
+ var later = function later() {
92858
+ var last = new Date().getTime() - timestamp;
92859
+
92860
+ if (last < timer && last >= 0) {
92861
+ timeout = setTimeout(later, timer - last);
92862
+ } else {
92863
+ timeout = null;
92864
+
92865
+ if (!immediate) {
92866
+ result = fun.apply(context, args);
92867
+ if (!timeout) context = args = null;
92868
+ }
92869
+ }
92870
+ };
92871
+
92872
+ return function () {
92873
+ context = this;
92874
+ args = arguments;
92875
+ timestamp = new Date().getTime();
92876
+ var callNow = immediate !== false && !timeout;
92877
+ if (!timeout) timeout = setTimeout(later, timer);
92878
+
92879
+ if (callNow) {
92880
+ result = fun.apply(context, args);
92881
+ context = args = null;
92882
+ }
92883
+
92884
+ return result;
92885
+ };
92886
+ },
92887
+
92888
+ /**
92889
+ * 函数节流
92890
+ * @param {Function} fun [执行的方法]
92891
+ * @param {Number} timer [间隔事件]
92892
+ * @param {Booleans} leading [是否立即执行一次]
92893
+ * @param {Booleabs} trailing [是否执行最后一次延时调用]
92894
+ * @return {Function} [设置节流后的方法]
92895
+ **/
92896
+ throttle: function throttle(fun) {
92897
+ var timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
92898
+ var leading = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
92899
+ var trailing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
92900
+ var context, args, result;
92901
+ var timeout = null;
92902
+ var previous = 0;
92903
+
92904
+ var later = function later() {
92905
+ previous = !leading ? 0 : new Date().getTime();
92906
+ timeout = null;
92907
+ result = fun.apply(context, args);
92908
+ if (!timeout) context = args = null;
92909
+ };
92910
+
92911
+ return function () {
92912
+ var now = new Date().getTime();
92913
+ if (!previous && !leading) previous = now;
92914
+ var remaining = timer - (now - previous);
92915
+ context = this;
92916
+ args = arguments;
92917
+
92918
+ if (remaining <= 0 || remaining > timer) {
92919
+ if (timeout) {
92920
+ clearTimeout(timeout);
92921
+ timeout = null;
92922
+ }
92923
+
92924
+ previous = now;
92925
+ result = fun.apply(context, args);
92926
+ if (!timeout) context = args = null;
92927
+ } else if (!timeout && !trailing) {
92928
+ timeout = setTimeout(later, remaining);
92929
+ }
92930
+
92931
+ return result;
92932
+ };
92933
+ },
92934
+ cookie: {
92935
+ set: function set(name, value, sec) {
92936
+ var t = new Date();
92937
+ t.setTime(t.getTime() + sec * 1000);
92938
+ document.cookie = name + '=' + value + ';expires=' + t + ';path=/';
92939
+ },
92940
+ get: function get(name) {
92941
+ var arr = document.cookie.replace(/\s/g, '').split(";");
92942
+
92943
+ for (var i = 0; i < arr.length; i++) {
92944
+ var tempArr = arr[i].split("=");
92945
+
92946
+ if (tempArr[0] == name) {
92947
+ return decodeURIComponent(tempArr[1]);
92948
+ }
92949
+ }
92950
+
92951
+ return '';
92952
+ },
92953
+ remove: function remove(name) {
92954
+ Vue.prototype.cookie.set(name, '', -1);
92955
+ }
92956
+ }
92957
+ });
92954
92958
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
92955
92959
 
92956
92960