@vtj/materials 0.10.1-alpha.6 → 0.10.1

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 (98) hide show
  1. package/dist/assets/antdv/index.umd.js +2 -2
  2. package/dist/assets/charts/index.umd.js +2 -2
  3. package/dist/assets/element/index.umd.js +2 -2
  4. package/dist/assets/ui/index.umd.js +2 -2
  5. package/dist/assets/uni-h5/index.umd.js +2 -2
  6. package/dist/assets/uni-ui/index.umd.js +3 -3
  7. package/dist/assets/vant/index.umd.js +5 -5
  8. package/dist/deps/@vtj/charts/index.umd.js +2 -2
  9. package/dist/deps/@vtj/icons/index.umd.js +2 -2
  10. package/dist/deps/@vtj/ui/index.umd.js +2 -2
  11. package/dist/deps/@vtj/utils/index.umd.js +2 -2
  12. package/dist/deps/uni-ui/index.umd.js +1 -1
  13. package/dist/deps/uni-ui/style.css +1 -1
  14. package/package.json +6 -6
  15. package/src/uni-ui/components/badge.ts +5 -1
  16. package/src/uni-ui/components/breadcrumb.ts +76 -0
  17. package/src/uni-ui/components/calendar.ts +63 -0
  18. package/src/uni-ui/components/card.ts +113 -0
  19. package/src/uni-ui/components/collapse.ts +118 -0
  20. package/src/uni-ui/components/combox.ts +51 -0
  21. package/src/uni-ui/components/countdown.ts +92 -0
  22. package/src/uni-ui/components/dataCheckbox.ts +104 -0
  23. package/src/uni-ui/components/dataPicker.ts +146 -0
  24. package/src/uni-ui/components/dataSelect.ts +68 -0
  25. package/src/uni-ui/components/dateformat.ts +42 -0
  26. package/src/uni-ui/components/datetimePicker.ts +103 -0
  27. package/src/uni-ui/components/drawer.ts +38 -0
  28. package/src/uni-ui/components/easyinput.ts +159 -0
  29. package/src/uni-ui/components/fab.ts +89 -0
  30. package/src/uni-ui/components/fav.ts +65 -0
  31. package/src/uni-ui/components/filePicker.ts +127 -0
  32. package/src/uni-ui/components/forms.ts +209 -0
  33. package/src/uni-ui/components/goodsNav.ts +31 -0
  34. package/src/uni-ui/components/grid.ts +104 -0
  35. package/src/uni-ui/components/group.ts +50 -0
  36. package/src/uni-ui/components/icons.ts +47 -0
  37. package/src/uni-ui/components/index.ts +89 -1
  38. package/src/uni-ui/components/indexedList.ts +51 -0
  39. package/src/uni-ui/components/link.ts +60 -0
  40. package/src/uni-ui/components/list.ts +259 -0
  41. package/src/uni-ui/components/loadMore.ts +61 -0
  42. package/src/uni-ui/components/navbar.ts +121 -0
  43. package/src/uni-ui/components/noticeBar.ts +83 -0
  44. package/src/uni-ui/components/numberbox.ts +49 -0
  45. package/src/uni-ui/components/pagination.ts +59 -0
  46. package/src/uni-ui/components/popup.ts +206 -0
  47. package/src/uni-ui/components/rate.ts +89 -0
  48. package/src/uni-ui/components/row.ts +126 -0
  49. package/src/uni-ui/components/searchBar.ts +84 -0
  50. package/src/uni-ui/components/section.ts +68 -0
  51. package/src/uni-ui/components/segmentedControl.ts +48 -0
  52. package/src/uni-ui/components/steps.ts +55 -0
  53. package/src/uni-ui/components/swipeAction.ts +133 -0
  54. package/src/uni-ui/components/swiperDot.ts +114 -0
  55. package/src/uni-ui/components/table.ts +132 -0
  56. package/src/uni-ui/components/tag.ts +56 -0
  57. package/src/uni-ui/components/title.ts +49 -0
  58. package/src/uni-ui/components/tooltip.ts +32 -0
  59. package/src/uni-ui/components/transition.ts +49 -0
  60. package/src/uni-ui/index.ts +30 -13
  61. package/src/uni-ui/lib/uni-col/uni-col.vue +324 -0
  62. package/src/uni-ui/lib/uni-data-select/uni-data-select.vue +590 -0
  63. package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +177 -177
  64. package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +947 -947
  65. package/src/uni-ui/lib/uni-datetime-picker/i18n/en.json +22 -22
  66. package/src/uni-ui/lib/uni-datetime-picker/i18n/index.js +7 -7
  67. package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +939 -939
  68. package/src/uni-ui/lib/uni-datetime-picker/util.js +419 -419
  69. package/src/uni-ui/lib/uni-easyinput/common.js +54 -0
  70. package/src/uni-ui/lib/uni-easyinput/uni-easyinput.vue +790 -0
  71. package/src/uni-ui/lib/uni-forms/uni-forms.vue +416 -416
  72. package/src/uni-ui/lib/uni-forms/utils.js +281 -281
  73. package/src/uni-ui/lib/uni-forms/validate.js +485 -485
  74. package/src/uni-ui/lib/uni-forms-item/uni-forms-item.vue +630 -0
  75. package/src/uni-ui/lib/uni-goods-nav/i18n/en.json +6 -0
  76. package/src/uni-ui/lib/uni-goods-nav/i18n/index.js +8 -0
  77. package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hans.json +6 -0
  78. package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hant.json +6 -0
  79. package/src/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +231 -0
  80. package/src/uni-ui/lib/uni-icons/uni-icons.uvue +91 -0
  81. package/src/uni-ui/lib/uni-icons/uni-icons.vue +114 -0
  82. package/src/uni-ui/lib/uni-icons/uniicons.css +664 -0
  83. package/src/uni-ui/lib/uni-icons/uniicons.ttf +0 -0
  84. package/src/uni-ui/lib/uni-icons/uniicons_file.ts +664 -0
  85. package/src/uni-ui/lib/uni-icons/uniicons_file_vue.js +649 -0
  86. package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +144 -0
  87. package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +404 -0
  88. package/src/uni-ui/lib/uni-list/uni-list.vue +123 -0
  89. package/src/uni-ui/lib/uni-list/uni-refresh.vue +65 -0
  90. package/src/uni-ui/lib/uni-list/uni-refresh.wxs +87 -0
  91. package/src/uni-ui/lib/uni-popup-dialog/keypress.js +45 -0
  92. package/src/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +324 -0
  93. package/src/uni-ui/lib/uni-rate/uni-rate.vue +361 -0
  94. package/src/uni-ui/lib/uni-table/uni-table.vue +496 -0
  95. package/src/uni-ui/lib/uni-td/uni-td.vue +99 -0
  96. package/src/uni-ui/lib/uni-th/uni-th.vue +310 -283
  97. package/src/uni-ui/lib/uni-tr/uni-tr.vue +194 -170
  98. package/src/version.ts +2 -2
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @desc 函数防抖
3
+ * @param func 目标函数
4
+ * @param wait 延迟执行毫秒数
5
+ * @param immediate true - 立即执行, false - 延迟执行
6
+ */
7
+ export const debounce = function(func, wait = 1000, immediate = true) {
8
+ let timer;
9
+ return function() {
10
+ let context = this,
11
+ args = arguments;
12
+ if (timer) clearTimeout(timer);
13
+ if (immediate) {
14
+ let callNow = !timer;
15
+ timer = setTimeout(() => {
16
+ timer = null;
17
+ }, wait);
18
+ if (callNow) func.apply(context, args);
19
+ } else {
20
+ timer = setTimeout(() => {
21
+ func.apply(context, args);
22
+ }, wait)
23
+ }
24
+ }
25
+ }
26
+ /**
27
+ * @desc 函数节流
28
+ * @param func 函数
29
+ * @param wait 延迟执行毫秒数
30
+ * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
31
+ */
32
+ export const throttle = (func, wait = 1000, type = 1) => {
33
+ let previous = 0;
34
+ let timeout;
35
+ return function() {
36
+ let context = this;
37
+ let args = arguments;
38
+ if (type === 1) {
39
+ let now = Date.now();
40
+
41
+ if (now - previous > wait) {
42
+ func.apply(context, args);
43
+ previous = now;
44
+ }
45
+ } else if (type === 2) {
46
+ if (!timeout) {
47
+ timeout = setTimeout(() => {
48
+ timeout = null;
49
+ func.apply(context, args)
50
+ }, wait)
51
+ }
52
+ }
53
+ }
54
+ }