hy-app 0.4.3 → 0.4.5

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 (147) hide show
  1. package/components/hy-action-sheet/hy-action-sheet.vue +1 -1
  2. package/components/hy-address-picker/hy-address-picker.vue +1 -1
  3. package/components/hy-avatar/hy-avatar.vue +1 -1
  4. package/components/hy-back-top/hy-back-top.vue +1 -2
  5. package/components/hy-badge/hy-badge.vue +1 -1
  6. package/components/hy-button/hy-button.vue +1 -2
  7. package/components/hy-calendar/hy-calendar.vue +3 -11
  8. package/components/hy-calendar/month.vue +1 -1
  9. package/components/hy-card/hy-card.vue +1 -1
  10. package/components/hy-cell/hy-cell.vue +1 -2
  11. package/components/hy-cell/props.ts +1 -1
  12. package/components/hy-check-button/hy-check-button.vue +2 -2
  13. package/components/hy-checkbox/hy-checkbox.vue +2 -3
  14. package/components/hy-checkbox-group/hy-checkbox-group.vue +1 -1
  15. package/components/hy-checkbox-item/hy-checkbox-item.vue +1 -2
  16. package/components/hy-code-input/hy-code-input.vue +1 -1
  17. package/components/hy-config-provider/hy-config-provider.vue +2 -3
  18. package/components/hy-config-provider/props.ts +1 -1
  19. package/components/hy-count-down/index.ts +1 -1
  20. package/components/hy-count-to/hy-count-to.vue +1 -1
  21. package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -3
  22. package/components/hy-datetime-picker/props.ts +1 -1
  23. package/components/hy-divider/hy-divider.vue +1 -2
  24. package/components/hy-divider/props.ts +1 -1
  25. package/components/hy-dropdown/hy-dropdown.vue +2 -3
  26. package/components/hy-dropdown/props.ts +1 -1
  27. package/components/hy-dropdown-item/hy-dropdown-item.vue +1 -2
  28. package/components/hy-empty/hy-empty.vue +1 -1
  29. package/components/hy-flex/hy-flex.vue +1 -1
  30. package/components/hy-float-button/hy-float-button.vue +1 -2
  31. package/components/hy-float-button/props.ts +14 -14
  32. package/components/hy-folding-panel/hy-folding-panel.vue +2 -3
  33. package/components/hy-folding-panel/props.ts +1 -1
  34. package/components/hy-form/hy-form.vue +1 -1
  35. package/components/hy-form-group/hy-form-group.vue +183 -111
  36. package/components/hy-form-group/typing.d.ts +1 -1
  37. package/components/hy-form-item/hy-form-item.vue +1 -1
  38. package/components/hy-grid/hy-grid.vue +1 -1
  39. package/components/hy-icon/hy-icon.vue +1 -1
  40. package/components/hy-icon/index.scss +1 -1
  41. package/components/hy-image/hy-image.vue +1 -2
  42. package/components/hy-image/props.ts +10 -10
  43. package/components/hy-input/hy-input.vue +1 -2
  44. package/components/hy-line/hy-line.vue +1 -1
  45. package/components/hy-line-progress/hy-line-progress.vue +1 -2
  46. package/components/hy-list/hy-list.vue +1 -1
  47. package/components/hy-loading/hy-loading.vue +1 -1
  48. package/components/hy-menu/hy-menu.vue +1 -1
  49. package/components/hy-modal/hy-modal.vue +2 -2
  50. package/components/hy-modal/props.ts +13 -13
  51. package/components/hy-navbar/hy-navbar.vue +1 -2
  52. package/components/hy-navbar/props.ts +1 -1
  53. package/components/hy-notice-bar/hy-column-notice.vue +1 -2
  54. package/components/hy-notice-bar/hy-notice-bar.vue +1 -1
  55. package/components/hy-notice-bar/hy-row-notice.vue +1 -2
  56. package/components/hy-notice-bar/props.ts +1 -1
  57. package/components/hy-notify/hy-notify.vue +1 -2
  58. package/components/hy-number-step/hy-number-step.vue +1 -2
  59. package/components/hy-overlay/hy-overlay.vue +1 -1
  60. package/components/hy-pagination/hy-pagination.vue +1 -1
  61. package/components/hy-picker/hy-picker.vue +1 -2
  62. package/components/hy-popover/hy-popover.vue +9 -3
  63. package/components/hy-popup/hy-popup.vue +2 -3
  64. package/components/hy-price/hy-price.vue +3 -2
  65. package/components/hy-qrcode/hy-qrcode.vue +1 -1
  66. package/components/hy-radio/hy-radio.vue +1 -2
  67. package/components/hy-rate/hy-rate.vue +6 -4
  68. package/components/hy-rate/props.ts +6 -6
  69. package/components/hy-read-more/hy-read-more.vue +1 -2
  70. package/components/hy-scroll-list/hy-scroll-list.vue +1 -1
  71. package/components/hy-scroll-list/props.ts +0 -1
  72. package/components/hy-search/hy-search.vue +3 -3
  73. package/components/hy-signature/hy-signature.vue +1 -1
  74. package/components/hy-slider/hy-slider.vue +3 -13
  75. package/components/hy-slider/props.ts +1 -1
  76. package/components/hy-status-bar/hy-status-bar.vue +1 -1
  77. package/components/hy-status-bar/props.ts +1 -1
  78. package/components/hy-steps/hy-steps.vue +1 -2
  79. package/components/hy-subsection/hy-subsection.vue +1 -1
  80. package/components/hy-subsection/props.ts +0 -1
  81. package/components/hy-subsection/typing.d.ts +0 -1
  82. package/components/hy-swipe-action/hy-swipe-action.vue +1 -2
  83. package/components/hy-swiper/hy-swiper-indicator.vue +1 -1
  84. package/components/hy-swiper/hy-swiper.vue +2 -3
  85. package/components/hy-swiper/typing.d.ts +35 -36
  86. package/components/hy-switch/hy-switch.vue +2 -2
  87. package/components/hy-switch/typing.d.ts +0 -1
  88. package/components/hy-tabs/hy-tabs.vue +2 -3
  89. package/components/hy-tag/hy-tag.vue +1 -2
  90. package/components/hy-text/hy-text.vue +2 -2
  91. package/components/hy-text/typing.d.ts +26 -26
  92. package/components/hy-textarea/hy-textarea.vue +2 -2
  93. package/components/hy-toast/hy-toast.vue +33 -19
  94. package/components/hy-toast/index.scss +3 -2
  95. package/components/hy-toast/typing.d.ts +1 -1
  96. package/components/hy-tooltip/hy-tooltip.vue +8 -2
  97. package/components/hy-transition/hy-transition.vue +1 -1
  98. package/components/hy-upload/hy-upload.vue +7 -2
  99. package/components/hy-upload/props.ts +1 -1
  100. package/components/hy-warn/hy-warn.vue +1 -2
  101. package/components/hy-warn/typing.d.ts +12 -13
  102. package/components/hy-waterfall/hy-waterfall.vue +1 -1
  103. package/components/hy-watermark/hy-watermark.vue +1 -1
  104. package/components/index.ts +117 -118
  105. package/index.ts +1 -7
  106. package/{api → libs/api}/http.ts +2 -2
  107. package/libs/common/index.ts +2 -0
  108. package/libs/common/queue.ts +28 -0
  109. package/{composables → libs/composables}/index.ts +1 -0
  110. package/{composables → libs/composables}/usePopover.ts +7 -2
  111. package/{common/shakeService.ts → libs/composables/useShakeService.ts} +4 -2
  112. package/{composables → libs/composables}/useShare.ts +3 -0
  113. package/libs/composables/useToast.ts +45 -0
  114. package/{composables → libs/composables}/useTouch.ts +3 -0
  115. package/{global → libs/global}/register-properties.ts +1 -1
  116. package/libs/index.ts +7 -0
  117. package/{typing → libs/typing}/index.ts +0 -1
  118. package/{typing → libs/typing}/modules/form.ts +7 -7
  119. package/{utils → libs/utils}/utils.ts +1 -0
  120. package/package.json +2 -2
  121. package/common/index.ts +0 -3
  122. package/common/queue.ts +0 -34
  123. package/components/hy-form/README.md +0 -301
  124. package/components/hy-text/index.ts +0 -0
  125. package/components/yk-dialog/yk-dialog.vue +0 -129
  126. package/composables/useToast.ts +0 -51
  127. package/typing/modules/dialog.ts +0 -17
  128. /package/{api → libs/api}/index.ts +0 -0
  129. /package/{common → libs/common}/versionControl.ts +0 -0
  130. /package/{composables → libs/composables}/useQueue.ts +0 -0
  131. /package/{config → libs/config}/color.ts +0 -0
  132. /package/{config → libs/config}/icon.ts +0 -0
  133. /package/{config → libs/config}/index.ts +0 -0
  134. /package/{static/font → libs/css}/iconfont.css +0 -0
  135. /package/{global → libs/global}/index.ts +0 -0
  136. /package/{typing → libs/typing}/modules/common.d.ts +0 -0
  137. /package/{typing → libs/typing}/modules/enum.ts +0 -0
  138. /package/{typing → libs/typing}/modules/http.ts +0 -0
  139. /package/{typing → libs/typing}/modules/icon.d.ts +0 -0
  140. /package/{typing → libs/typing}/modules/rect.ts +0 -0
  141. /package/{utils → libs/utils}/address.json +0 -0
  142. /package/{utils → libs/utils}/base64.ts +0 -0
  143. /package/{utils → libs/utils}/calendar.js +0 -0
  144. /package/{utils → libs/utils}/colorGradient.ts +0 -0
  145. /package/{utils → libs/utils}/index.ts +0 -0
  146. /package/{utils → libs/utils}/inside.ts +0 -0
  147. /package/{utils → libs/utils}/inspect.ts +0 -0
@@ -1,127 +1,126 @@
1
- import HyTabBr from './hy-tabBar/hy-tabBar.vue'
2
- import Dialog from './dialog'
1
+ import HyTabBr from "./hy-tabBar/hy-tabBar.vue";
3
2
  // 组件库
4
- import HyAddressPicker from './hy-address-picker/hy-address-picker.vue'
5
- import HyAvatar from './hy-avatar/hy-avatar.vue'
6
- import HyBackTop from './hy-back-top/hy-back-top.vue'
7
- import HyBadge from './hy-badge/hy-badge.vue'
8
- import HyButton from './hy-button/hy-button.vue'
9
- import HyCard from './hy-card/hy-card.vue'
10
- import HyCell from './hy-cell/hy-cell.vue'
11
- import HyCheckButton from './hy-check-button/hy-check-button.vue'
12
- import HyCheckbox from './hy-checkbox/hy-checkbox.vue'
13
- import HyCountDown from './hy-count-down/hy-count-down.vue'
14
- import HyCountTo from './hy-count-to/hy-count-to.vue'
15
- import HyDatetimePicker from './hy-datetime-picker/hy-datetime-picker.vue'
16
- import HyDivider from './hy-divider/hy-divider.vue'
17
- import HyDropdown from './hy-dropdown/hy-dropdown.vue'
18
- import HyDropdownItem from './hy-dropdown-item/hy-dropdown-item.vue'
19
- import YkEmpty from './hy-empty/hy-empty.vue'
20
- import YkFloatButton from './hy-float-button/hy-float-button.vue'
21
- import HyFoldingPanel from '@/package/components/hy-folding-panel/hy-folding-panel.vue'
22
- import HyForm from '@/package/components/hy-form-group/hy-form.vue'
23
- import HyFormSimple from '@/package/components/hy-form/hy-form-simple.vue'
24
- import HyFormItem from './hy-form-item/hy-form-item.vue'
25
- import HyGrid from './hy-grid/hy-grid.vue'
26
- import HyIcon from './hy-icon/hy-icon.vue'
27
- import HyImage from './hy-image/hy-image.vue'
28
- import HyInput from './hy-input/hy-input.vue'
29
- import HyLine from './hy-line/hy-line.vue'
30
- import HyLineProgress from './hy-line-progress/hy-line-progress.vue'
31
- import HyList from './hy-list/hy-list.vue'
32
- import HyLoading from './hy-loading/hy-loading.vue'
33
- import YkLogin from './hy-login/hy-login.vue'
34
- import HyModal from './hy-modal/hy-modal.vue'
35
- import HyNavbar from './hy-navbar/hy-navbar.vue'
36
- import HyNoticeBar from './hy-notice-bar/hy-notice-bar.vue'
37
- import HyNumberStep from './hy-number-step/hy-number-step.vue'
38
- import HyOverlay from './hy-overlay/hy-overlay.vue'
39
- import YkPrice from './hy-price/hy-price.vue'
40
- import HyPicker from './hy-picker/hy-picker.vue'
41
- import HyPopup from './hy-popup/hy-popup.vue'
42
- import HyQrcode from './hy-qrcode/hy-qrcode.vue'
43
- import HyRadio from './hy-radio/hy-radio.vue'
44
- import HyRate from './hy-rate/hy-rate.vue'
45
- import HyReadMore from './hy-read-more/hy-read-more.vue'
3
+ import HyAddressPicker from "./hy-address-picker/hy-address-picker.vue";
4
+ import HyAvatar from "./hy-avatar/hy-avatar.vue";
5
+ import HyBackTop from "./hy-back-top/hy-back-top.vue";
6
+ import HyBadge from "./hy-badge/hy-badge.vue";
7
+ import HyButton from "./hy-button/hy-button.vue";
8
+ import HyCard from "./hy-card/hy-card.vue";
9
+ import HyCell from "./hy-cell/hy-cell.vue";
10
+ import HyCheckButton from "./hy-check-button/hy-check-button.vue";
11
+ import HyCheckbox from "./hy-checkbox/hy-checkbox.vue";
12
+ import HyCountDown from "./hy-count-down/hy-count-down.vue";
13
+ import HyCountTo from "./hy-count-to/hy-count-to.vue";
14
+ import HyDatetimePicker from "./hy-datetime-picker/hy-datetime-picker.vue";
15
+ import HyDivider from "./hy-divider/hy-divider.vue";
16
+ import HyDropdown from "./hy-dropdown/hy-dropdown.vue";
17
+ import HyDropdownItem from "./hy-dropdown-item/hy-dropdown-item.vue";
18
+ import YkEmpty from "./hy-empty/hy-empty.vue";
19
+ import YkFloatButton from "./hy-float-button/hy-float-button.vue";
20
+ import HyFoldingPanel from "@/package/components/hy-folding-panel/hy-folding-panel.vue";
21
+ import HyForm from "@/package/components/hy-form-group/hy-form.vue";
22
+ import HyFormSimple from "@/package/components/hy-form/hy-form-simple.vue";
23
+ import HyFormItem from "./hy-form-item/hy-form-item.vue";
24
+ import HyGrid from "./hy-grid/hy-grid.vue";
25
+ import HyIcon from "./hy-icon/hy-icon.vue";
26
+ import HyImage from "./hy-image/hy-image.vue";
27
+ import HyInput from "./hy-input/hy-input.vue";
28
+ import HyLine from "./hy-line/hy-line.vue";
29
+ import HyLineProgress from "./hy-line-progress/hy-line-progress.vue";
30
+ import HyList from "./hy-list/hy-list.vue";
31
+ import HyLoading from "./hy-loading/hy-loading.vue";
32
+ import YkLogin from "./hy-login/hy-login.vue";
33
+ import HyModal from "./hy-modal/hy-modal.vue";
34
+ import HyNavbar from "./hy-navbar/hy-navbar.vue";
35
+ import HyNoticeBar from "./hy-notice-bar/hy-notice-bar.vue";
36
+ import HyNumberStep from "./hy-number-step/hy-number-step.vue";
37
+ import HyOverlay from "./hy-overlay/hy-overlay.vue";
38
+ import YkPrice from "./hy-price/hy-price.vue";
39
+ import HyPicker from "./hy-picker/hy-picker.vue";
40
+ import HyPopup from "./hy-popup/hy-popup.vue";
41
+ import HyQrcode from "./hy-qrcode/hy-qrcode.vue";
42
+ import HyRadio from "./hy-radio/hy-radio.vue";
43
+ import HyRate from "./hy-rate/hy-rate.vue";
44
+ import HyReadMore from "./hy-read-more/hy-read-more.vue";
46
45
  // import HySafeBottom from "./hy-safe-bottom/hy-safe-bottom.vue";
47
- import HyScrollList from './hy-scroll-list/hy-scroll-list.vue'
48
- import HySearch from './hy-search/hy-search.vue'
49
- import HySlider from './hy-slider/hy-slider.vue'
50
- import HyStatusBar from './hy-status-bar/hy-status-bar.vue'
51
- import HySteps from './hy-steps/hy-steps.vue'
52
- import HySubsection from './hy-subsection/hy-subsection.vue'
53
- import HySwiper from './hy-swiper/hy-swiper.vue'
54
- import HySwitch from './hy-switch/hy-switch.vue'
55
- import HyTabs from './hy-tabs/hy-tabs.vue'
56
- import HyTag from './hy-tag/hy-tag.vue'
57
- import HyTextarea from './hy-textarea/hy-textarea.vue'
58
- import HyTooltip from './hy-tooltip/hy-tooltip.vue'
59
- import HyTransition from './hy-transition/hy-transition.vue'
60
- import HyUpload from './hy-upload/hy-upload.vue'
61
- import HyWarn from './hy-warn/hy-warn.vue'
46
+ import HyScrollList from "./hy-scroll-list/hy-scroll-list.vue";
47
+ import HySearch from "./hy-search/hy-search.vue";
48
+ import HySlider from "./hy-slider/hy-slider.vue";
49
+ import HyStatusBar from "./hy-status-bar/hy-status-bar.vue";
50
+ import HySteps from "./hy-steps/hy-steps.vue";
51
+ import HySubsection from "./hy-subsection/hy-subsection.vue";
52
+ import HySwiper from "./hy-swiper/hy-swiper.vue";
53
+ import HySwitch from "./hy-switch/hy-switch.vue";
54
+ import HyTabs from "./hy-tabs/hy-tabs.vue";
55
+ import HyTag from "./hy-tag/hy-tag.vue";
56
+ import HyTextarea from "./hy-textarea/hy-textarea.vue";
57
+ import HyTooltip from "./hy-tooltip/hy-tooltip.vue";
58
+ import HyTransition from "./hy-transition/hy-transition.vue";
59
+ import HyUpload from "./hy-upload/hy-upload.vue";
60
+ import HyWarn from "./hy-warn/hy-warn.vue";
62
61
 
63
62
  const install = (Vue: any) => {
64
- Vue.component('hy-tabBar', HyTabBr)
63
+ Vue.component("hy-tabBar", HyTabBr);
65
64
 
66
- Vue.component('HyAddressPicker', HyAddressPicker)
67
- Vue.component('HyAvatar', HyAvatar)
68
- Vue.component('HyBackTop', HyBackTop)
69
- Vue.component('HyBadge', HyBadge)
70
- Vue.component('HyButton', HyButton)
71
- Vue.component('HyCard', HyCard)
72
- Vue.component('HyCell', HyCell)
73
- Vue.component('HyCheckButton', HyCheckButton)
74
- Vue.component('HyCheckbox', HyCheckbox)
75
- Vue.component('HyCountDown', HyCountDown)
76
- Vue.component('HyCountTo', HyCountTo)
77
- Vue.component('HyDatetimePicker', HyDatetimePicker)
78
- Vue.component('HyDivider', HyDivider)
79
- Vue.component('HyDropdown', HyDropdown)
80
- Vue.component('HyDropdownItem', HyDropdownItem)
81
- Vue.component('YkEmpty', YkEmpty)
82
- Vue.component('YkFloatButton', YkFloatButton)
83
- Vue.component('HyFoldingPanel', HyFoldingPanel)
84
- Vue.component('HyForm', HyForm)
85
- Vue.component('HyFormSimple', HyFormSimple)
86
- Vue.component('HyFormItem', HyFormItem)
87
- Vue.component('HyGrid', HyGrid)
88
- Vue.component('HyIcon', HyIcon)
89
- Vue.component('HyImage', HyImage)
90
- Vue.component('HyInput', HyInput)
91
- Vue.component('HyLine', HyLine)
92
- Vue.component('HyLineProgress', HyLineProgress)
93
- Vue.component('HyList', HyList)
94
- Vue.component('HyLoading', HyLoading)
65
+ Vue.component("HyAddressPicker", HyAddressPicker);
66
+ Vue.component("HyAvatar", HyAvatar);
67
+ Vue.component("HyBackTop", HyBackTop);
68
+ Vue.component("HyBadge", HyBadge);
69
+ Vue.component("HyButton", HyButton);
70
+ Vue.component("HyCard", HyCard);
71
+ Vue.component("HyCell", HyCell);
72
+ Vue.component("HyCheckButton", HyCheckButton);
73
+ Vue.component("HyCheckbox", HyCheckbox);
74
+ Vue.component("HyCountDown", HyCountDown);
75
+ Vue.component("HyCountTo", HyCountTo);
76
+ Vue.component("HyDatetimePicker", HyDatetimePicker);
77
+ Vue.component("HyDivider", HyDivider);
78
+ Vue.component("HyDropdown", HyDropdown);
79
+ Vue.component("HyDropdownItem", HyDropdownItem);
80
+ Vue.component("YkEmpty", YkEmpty);
81
+ Vue.component("YkFloatButton", YkFloatButton);
82
+ Vue.component("HyFoldingPanel", HyFoldingPanel);
83
+ Vue.component("HyForm", HyForm);
84
+ Vue.component("HyFormSimple", HyFormSimple);
85
+ Vue.component("HyFormItem", HyFormItem);
86
+ Vue.component("HyGrid", HyGrid);
87
+ Vue.component("HyIcon", HyIcon);
88
+ Vue.component("HyImage", HyImage);
89
+ Vue.component("HyInput", HyInput);
90
+ Vue.component("HyLine", HyLine);
91
+ Vue.component("HyLineProgress", HyLineProgress);
92
+ Vue.component("HyList", HyList);
93
+ Vue.component("HyLoading", HyLoading);
95
94
  // Vue.component("YkLogin", YkLogin);
96
- Vue.component('HyModal', HyModal)
97
- Vue.component('HyNavbar', HyNavbar)
98
- Vue.component('HyNoticeBar', HyNoticeBar)
99
- Vue.component('HyNumberStep', HyNumberStep)
100
- Vue.component('HyOverlay', HyOverlay)
101
- Vue.component('YkPrice', YkPrice)
102
- Vue.component('HyPicker', HyPicker)
103
- Vue.component('HyPopup', HyPopup)
104
- Vue.component('HyQrcode', HyQrcode)
105
- Vue.component('HyRadio', HyRadio)
106
- Vue.component('HyRate', HyRate)
107
- Vue.component('HyReadMore', HyReadMore)
108
- Vue.component('HyScrollList', HyScrollList)
109
- Vue.component('HySearch', HySearch)
110
- Vue.component('HySlider', HySlider)
111
- Vue.component('HyStatusBar', HyStatusBar)
112
- Vue.component('HySteps', HySteps)
113
- Vue.component('HySubsection', HySubsection)
114
- Vue.component('HySwiper', HySwiper)
115
- Vue.component('HySwitch', HySwitch)
116
- Vue.component('HyTabs', HyTabs)
117
- Vue.component('HyTag', HyTag)
118
- Vue.component('HyTextarea', HyTextarea)
119
- Vue.component('HyTooltip', HyTooltip)
120
- Vue.component('HyTransition', HyTransition)
121
- Vue.component('HyUpload', HyUpload)
122
- Vue.component('HyWarn', HyWarn)
95
+ Vue.component("HyModal", HyModal);
96
+ Vue.component("HyNavbar", HyNavbar);
97
+ Vue.component("HyNoticeBar", HyNoticeBar);
98
+ Vue.component("HyNumberStep", HyNumberStep);
99
+ Vue.component("HyOverlay", HyOverlay);
100
+ Vue.component("YkPrice", YkPrice);
101
+ Vue.component("HyPicker", HyPicker);
102
+ Vue.component("HyPopup", HyPopup);
103
+ Vue.component("HyQrcode", HyQrcode);
104
+ Vue.component("HyRadio", HyRadio);
105
+ Vue.component("HyRate", HyRate);
106
+ Vue.component("HyReadMore", HyReadMore);
107
+ Vue.component("HyScrollList", HyScrollList);
108
+ Vue.component("HySearch", HySearch);
109
+ Vue.component("HySlider", HySlider);
110
+ Vue.component("HyStatusBar", HyStatusBar);
111
+ Vue.component("HySteps", HySteps);
112
+ Vue.component("HySubsection", HySubsection);
113
+ Vue.component("HySwiper", HySwiper);
114
+ Vue.component("HySwitch", HySwitch);
115
+ Vue.component("HyTabs", HyTabs);
116
+ Vue.component("HyTag", HyTag);
117
+ Vue.component("HyTextarea", HyTextarea);
118
+ Vue.component("HyTooltip", HyTooltip);
119
+ Vue.component("HyTransition", HyTransition);
120
+ Vue.component("HyUpload", HyUpload);
121
+ Vue.component("HyWarn", HyWarn);
123
122
  // Vue.config.globalProperties.$dialog = myDialog;
124
- }
123
+ };
125
124
  export {
126
125
  install,
127
126
  HyAddressPicker,
@@ -181,4 +180,4 @@ export {
181
180
  HyTransition,
182
181
  HyUpload,
183
182
  HyWarn,
184
- }
183
+ };
package/index.ts CHANGED
@@ -1,7 +1 @@
1
- export * from "./common";
2
- export * from "./utils";
3
- export * from "./global";
4
- export * from "./typing";
5
- export * from "./api";
6
- export * from "./config";
7
- export * from "./composables";
1
+ export * from "./libs";
@@ -1,5 +1,5 @@
1
- import type { HttpRequestConfig } from "../typing";
2
- import { objectToUrlParams } from "../utils";
1
+ import type { HttpRequestConfig } from "../../libs/typing";
2
+ import { objectToUrlParams } from "../../libs";
3
3
 
4
4
  export default class Http {
5
5
  /**
@@ -0,0 +1,2 @@
1
+ export * from "./versionControl";
2
+ export * from "./queue";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 互相关闭
3
+ * */
4
+ let queue: any[] = [];
5
+
6
+ export function pushToQueue(comp: any) {
7
+ queue.push(comp);
8
+ }
9
+
10
+ export function removeFromQueue(comp: any) {
11
+ queue = queue.filter((item) => {
12
+ return item.$.uid !== comp.$.uid;
13
+ });
14
+ }
15
+
16
+ export function closeOther(comp: any) {
17
+ queue.forEach((item) => {
18
+ if (item.$.uid !== comp.$.uid) {
19
+ item.$.exposed.close();
20
+ }
21
+ });
22
+ }
23
+
24
+ export function closeOutside() {
25
+ queue.forEach((item) => {
26
+ item.$.exposed.close();
27
+ });
28
+ }
@@ -3,3 +3,4 @@ export * from "./useTouch";
3
3
  export * from "./usePopover";
4
4
  export * from "./useQueue";
5
5
  export * from "./useToast";
6
+ export * from "./useShakeService";
@@ -1,7 +1,11 @@
1
+ /**
2
+ * 气泡组件hooks
3
+ * */
4
+
1
5
  import { getCurrentInstance, ref } from "vue";
2
6
  import type { CSSProperties } from "vue";
3
- import { getRect, isObject } from "../utils";
4
- import type { IOffset, IPlacementVo } from "../components/hy-popover/typing";
7
+ import { getRect, isObject } from "../../libs";
8
+ import type { IOffset, IPlacementVo } from "../../components/hy-popover/typing";
5
9
 
6
10
  export function usePopover(visibleArrow = true) {
7
11
  const instance = getCurrentInstance();
@@ -89,6 +93,7 @@ export function usePopover(visibleArrow = true) {
89
93
  (horizontalY - 17 > 0 ? 0 : horizontalY - 25) +
90
94
  (offset[1] ? offset[1] : offset[0]);
91
95
  } else if (isObject(offset)) {
96
+ offset = offset as Record<"x" | "y", number>;
92
97
  offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset.x;
93
98
  offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset.y;
94
99
  } else {
@@ -1,7 +1,9 @@
1
- // src/composables/useShakeService.ts
1
+ /**
2
+ * 摇一摇传感器hooks
3
+ * */
2
4
  import { ref } from "vue";
3
5
  import type { Ref } from "vue";
4
- import { debounce } from "../utils";
6
+ import { debounce } from "../../libs";
5
7
 
6
8
  interface Acceleration {
7
9
  x: number;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 全局分享hooks
3
+ * */
1
4
  interface ShareConfig {
2
5
  title?: string;
3
6
  path?: string;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * 消息提示hooks
3
+ * */
4
+
5
+ import type ToastOptions from "../../components/hy-toast/typing";
6
+ import { error } from "../../libs";
7
+
8
+ // 用于缓存全局唯一实例
9
+ let toastInstance: any = null;
10
+
11
+ /**
12
+ * useToast 适用于任意页面直接调用 toast
13
+ * 兼容 H5 + 微信小程序 + App
14
+ */
15
+ export const useToast = () => {
16
+ const show = (msg: string, opt?: ToastOptions) =>
17
+ openToast({ message: msg, icon: false, ...opt });
18
+ const info = (msg: string, opt?: ToastOptions) =>
19
+ openToast({ message: msg, type: "info", ...opt });
20
+ const success = (msg: string, opt?: ToastOptions) =>
21
+ openToast({ message: msg, type: "success", ...opt });
22
+ const error = (msg: string, opt?: ToastOptions) =>
23
+ openToast({ message: msg, type: "error", ...opt });
24
+ const warning = (msg: string, opt?: ToastOptions) =>
25
+ openToast({ message: msg, type: "warning", ...opt });
26
+ const primary = (msg: string, opt?: ToastOptions) =>
27
+ openToast({ message: msg, type: "primary", ...opt });
28
+ const loading = (msg: string = "加载中...", opt?: ToastOptions) =>
29
+ openToast({ message: msg, loading: true, ...opt });
30
+ const close = (all?: boolean) => closeToast();
31
+
32
+ return { show, info, success, error, warning, primary, loading, close };
33
+ };
34
+
35
+ /**
36
+ * ✅ 实现
37
+ * 页面创建总事件,调用方法实现
38
+ */
39
+ const openToast = (opt: ToastOptions) => {
40
+ uni.$emit("__hy_toast_open__", opt);
41
+ };
42
+
43
+ const closeToast = () => {
44
+ uni.$emit("__hy_toast_close__");
45
+ };
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 滑动hooks
3
+ * */
1
4
  import { ref } from "vue";
2
5
 
3
6
  export function useTouch() {
@@ -1,5 +1,5 @@
1
1
  import type { App } from "vue";
2
- import { addUnit, bytesToSize, formatTime, random } from "../utils";
2
+ import { addUnit, bytesToSize, formatTime, random } from "../../libs";
3
3
  export default function registerProperties(app: App) {
4
4
  app.config.globalProperties.$hy = {
5
5
  /**
package/libs/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from "./common";
2
+ export * from "./utils";
3
+ export * from "./global";
4
+ export * from "./typing";
5
+ export * from "./api";
6
+ export * from "./config";
7
+ export * from "./composables";
@@ -1,5 +1,4 @@
1
1
  export * from "./modules/form";
2
- export * from "./modules/dialog";
3
2
  export * from "./modules/http";
4
3
  export * from "./modules/enum";
5
4
  export * from "./modules/rect";
@@ -1,11 +1,11 @@
1
1
  import type { DateModeEnum } from "./enum";
2
- import type { CheckboxColumnsVo } from "../../components/hy-check-button/typing";
3
- import type HyInputProps from "../../components/hy-input/typing";
4
- import type HyTextareaProps from "../../components/hy-textarea/typing";
5
- import type HySwitchProps from "../../components/hy-switch/typing";
6
- import type HyPickerProps from "../../components/hy-picker/typing";
7
- import type HyRadioProps from "../../components/hy-radio/typing";
8
- import type HyCheckButtonProps from "../../components/hy-check-button/typing";
2
+ import type { CheckboxColumnsVo } from "../../../components/hy-check-button/typing";
3
+ import type HyInputProps from "../../../components/hy-input/typing";
4
+ import type HyTextareaProps from "../../../components/hy-textarea/typing";
5
+ import type HySwitchProps from "../../../components/hy-switch/typing";
6
+ import type HyPickerProps from "../../../components/hy-picker/typing";
7
+ import type HyRadioProps from "../../../components/hy-radio/typing";
8
+ import type HyCheckButtonProps from "../../../components/hy-check-button/typing";
9
9
 
10
10
  /**
11
11
  * 类型
@@ -74,6 +74,7 @@ const padZero = (value: string | number): string => {
74
74
  * @returns {String}
75
75
  */
76
76
  const addZero = (value: string | number, length: number): string => {
77
+ if (value === undefined || value === null) return "";
77
78
  let val = value.toString();
78
79
  if (length > val.length) {
79
80
  val += "0".repeat(length - val.length);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.4.3",
4
- "description": "fix: 使用hooks触发toast显示提示消息",
3
+ "version": "0.4.5",
4
+ "description": "fix: 修复toast在支付小程序获取不到ref问题",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},
package/common/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './versionControl'
2
- export * from './shakeService'
3
- export * from './queue'
package/common/queue.ts DELETED
@@ -1,34 +0,0 @@
1
- /*
2
- * @Author: weisheng
3
- * @Date: 2023-07-02 22:51:06
4
- * @LastEditTime: 2024-03-16 19:59:07
5
- * @LastEditors: weisheng
6
- * @Description:
7
- * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/common/clickoutside.ts
8
- * 记得注释
9
- */
10
- let queue: any[] = []
11
-
12
- export function pushToQueue(comp: any) {
13
- queue.push(comp)
14
- }
15
-
16
- export function removeFromQueue(comp: any) {
17
- queue = queue.filter((item) => {
18
- return item.$.uid !== comp.$.uid
19
- })
20
- }
21
-
22
- export function closeOther(comp: any) {
23
- queue.forEach((item) => {
24
- if (item.$.uid !== comp.$.uid) {
25
- item.$.exposed.close()
26
- }
27
- })
28
- }
29
-
30
- export function closeOutside() {
31
- queue.forEach((item) => {
32
- item.$.exposed.close()
33
- })
34
- }