hy-app 0.1.2 → 0.1.4

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 (247) hide show
  1. package/README.md +1 -1
  2. package/api/http.ts +8 -8
  3. package/components/dialog/index.ts +2 -2
  4. package/components/hy-address-picker/hy-address-picker.vue +3 -29
  5. package/components/hy-address-picker/index.scss +27 -0
  6. package/components/hy-avatar/hy-avatar.vue +1 -45
  7. package/components/hy-avatar/index.scss +45 -0
  8. package/components/hy-avatar/typing.d.ts +1 -1
  9. package/components/hy-back-top/hy-back-top.vue +7 -22
  10. package/components/hy-back-top/index.scss +16 -0
  11. package/components/hy-back-top/props.ts +4 -4
  12. package/components/hy-back-top/typing.d.ts +2 -3
  13. package/components/hy-badge/hy-badge.vue +1 -72
  14. package/components/hy-badge/index.scss +72 -0
  15. package/components/hy-button/hy-button.vue +17 -128
  16. package/components/hy-button/index.scss +116 -0
  17. package/components/hy-button/typing.d.ts +1 -1
  18. package/components/hy-calendar/header.vue +76 -0
  19. package/components/hy-calendar/hy-calendar.vue +366 -0
  20. package/components/hy-calendar/index.scss +171 -0
  21. package/components/hy-calendar/month.vue +524 -0
  22. package/components/hy-calendar/props.ts +37 -0
  23. package/components/hy-calendar/typing.d.ts +126 -0
  24. package/components/hy-card/hy-card.vue +21 -84
  25. package/components/hy-card/index.scss +57 -0
  26. package/components/hy-card/props.ts +2 -2
  27. package/components/hy-card/typing.d.ts +1 -1
  28. package/components/hy-cell/hy-cell.vue +1 -137
  29. package/components/hy-cell/index.scss +137 -0
  30. package/components/hy-check-button/hy-check-button.vue +1 -0
  31. package/components/hy-check-button/index.scss +5 -0
  32. package/components/hy-checkbox/hy-checkbox.vue +2 -95
  33. package/components/hy-checkbox/index.scss +94 -0
  34. package/components/hy-checkbox/typing.d.ts +1 -2
  35. package/components/hy-count-down/hy-count-down.vue +150 -0
  36. package/components/hy-count-down/index.scss +6 -0
  37. package/components/hy-count-down/index.ts +52 -0
  38. package/components/hy-count-down/props.ts +10 -0
  39. package/components/hy-count-down/typing.d.ts +20 -0
  40. package/components/hy-count-to/hy-count-to.vue +213 -0
  41. package/components/hy-count-to/index.scss +6 -0
  42. package/components/hy-count-to/props.ts +17 -0
  43. package/components/hy-count-to/typing.d.ts +48 -0
  44. package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -28
  45. package/components/hy-datetime-picker/index.scss +28 -0
  46. package/components/hy-divider/hy-divider.vue +24 -49
  47. package/components/hy-divider/index.scss +26 -0
  48. package/components/hy-divider/props.ts +2 -2
  49. package/components/hy-divider/typing.d.ts +1 -1
  50. package/components/hy-dropdown/hy-dropdown.vue +43 -0
  51. package/components/hy-dropdown/index.scss +17 -0
  52. package/components/hy-dropdown/props.ts +17 -0
  53. package/components/hy-dropdown/typing.d.ts +48 -0
  54. package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
  55. package/components/hy-dropdown-item/index.scss +96 -0
  56. package/components/hy-dropdown-item/props.ts +10 -0
  57. package/components/hy-dropdown-item/typing.d.ts +31 -0
  58. package/components/hy-empty/hy-empty.vue +8 -26
  59. package/components/hy-empty/index.scss +19 -0
  60. package/components/hy-empty/props.ts +2 -2
  61. package/components/hy-empty/typing.d.ts +1 -1
  62. package/components/hy-float-button/hy-float-button.vue +217 -0
  63. package/components/hy-float-button/index.scss +67 -0
  64. package/components/hy-float-button/props.ts +25 -0
  65. package/components/hy-float-button/typing.d.ts +93 -0
  66. package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
  67. package/components/hy-folding-panel/index.scss +6 -0
  68. package/components/hy-folding-panel/props.ts +2 -2
  69. package/components/hy-folding-panel/typing.d.ts +2 -2
  70. package/components/hy-form/hy-form.vue +17 -34
  71. package/components/hy-form/index.scss +30 -0
  72. package/components/hy-form/props.ts +2 -0
  73. package/components/hy-form/typing.d.ts +9 -1
  74. package/components/hy-grid/hy-grid.vue +1 -43
  75. package/components/hy-grid/index.scss +40 -0
  76. package/components/hy-icon/hy-icon.vue +1 -93
  77. package/components/hy-icon/index.scss +84 -0
  78. package/components/hy-image/hy-image.vue +216 -0
  79. package/components/hy-image/index.scss +26 -0
  80. package/components/hy-image/props.ts +24 -0
  81. package/components/hy-image/typing.d.ts +76 -0
  82. package/components/hy-input/hy-input.vue +2 -72
  83. package/components/hy-input/index.scss +65 -0
  84. package/components/hy-line/hy-line.vue +4 -8
  85. package/components/hy-line/index.scss +5 -0
  86. package/components/hy-line/props.ts +3 -3
  87. package/components/hy-line/typing.d.ts +2 -2
  88. package/components/hy-line-progress/hy-line-progress.vue +15 -44
  89. package/components/hy-line-progress/index.scss +38 -0
  90. package/components/hy-line-progress/props.ts +2 -2
  91. package/components/hy-line-progress/typing.d.ts +1 -1
  92. package/components/hy-list/hy-list.vue +11 -41
  93. package/components/hy-list/index.scss +32 -0
  94. package/components/hy-list/props.ts +2 -2
  95. package/components/hy-loading/hy-loading.vue +95 -0
  96. package/components/hy-loading/index.scss +103 -0
  97. package/components/hy-loading/props.ts +17 -0
  98. package/components/hy-loading/typing.d.ts +53 -0
  99. package/components/hy-login/TheUserLogin.vue +20 -88
  100. package/components/hy-login/hy-login.vue +9 -9
  101. package/components/hy-login/props.ts +4 -4
  102. package/components/hy-modal/hy-modal.vue +11 -89
  103. package/components/hy-modal/index.scss +77 -0
  104. package/components/hy-modal/props.ts +2 -2
  105. package/components/hy-modal/typing.d.ts +1 -1
  106. package/components/hy-navbar/hy-navbar.vue +20 -92
  107. package/components/hy-navbar/index.scss +67 -0
  108. package/components/hy-navbar/props.ts +2 -2
  109. package/components/hy-navbar/typing.d.ts +1 -1
  110. package/components/hy-notice-bar/hy-column-notice.vue +11 -39
  111. package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
  112. package/components/hy-notice-bar/hy-row-notice.vue +16 -58
  113. package/components/hy-notice-bar/index.scss +93 -0
  114. package/components/hy-notice-bar/props.ts +4 -2
  115. package/components/hy-notice-bar/typing.d.ts +13 -3
  116. package/components/hy-number-step/hy-number-step.vue +1 -70
  117. package/components/hy-number-step/index.scss +71 -0
  118. package/components/hy-overlay/hy-overlay.vue +2 -14
  119. package/components/hy-overlay/index.scss +9 -0
  120. package/components/hy-parse/hy-parse.vue +499 -0
  121. package/components/hy-parse/index.scss +9 -0
  122. package/components/hy-parse/node/node.vue +584 -0
  123. package/components/hy-parse/parser.js +1337 -0
  124. package/components/hy-parse/props.ts +19 -0
  125. package/components/hy-parse/typing.d.ts +68 -0
  126. package/components/hy-picker/hy-picker.vue +1 -68
  127. package/components/hy-picker/index.scss +68 -0
  128. package/components/hy-popup/hy-popup.vue +1 -74
  129. package/components/hy-popup/index.scss +60 -0
  130. package/components/hy-price/hy-price.vue +7 -19
  131. package/components/hy-price/index.scss +11 -0
  132. package/components/hy-price/props.ts +4 -3
  133. package/components/hy-price/typing.d.ts +8 -4
  134. package/components/hy-qrcode/hy-qrcode.vue +15 -37
  135. package/components/hy-qrcode/index.scss +23 -0
  136. package/components/hy-qrcode/props.ts +2 -2
  137. package/components/hy-qrcode/typing.d.ts +2 -2
  138. package/components/hy-radio/hy-radio.vue +2 -101
  139. package/components/hy-radio/index.scss +93 -0
  140. package/components/hy-radio/typing.d.ts +1 -2
  141. package/components/hy-rate/hy-rate.vue +1 -33
  142. package/components/hy-rate/index.scss +33 -0
  143. package/components/hy-read-more/hy-read-more.vue +7 -30
  144. package/components/hy-read-more/index.scss +25 -0
  145. package/components/hy-read-more/props.ts +3 -3
  146. package/components/hy-read-more/typing.d.ts +1 -1
  147. package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
  148. package/components/hy-safe-bottom/index.scss +5 -0
  149. package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
  150. package/components/hy-scroll-list/index.scss +34 -0
  151. package/components/hy-scroll-list/props.ts +2 -2
  152. package/components/hy-scroll-list/typing.d.ts +1 -1
  153. package/components/hy-search/hy-search.vue +1 -83
  154. package/components/hy-search/index.scss +83 -0
  155. package/components/hy-slider/hy-slider.vue +18 -95
  156. package/components/hy-slider/index.scss +77 -0
  157. package/components/hy-status-bar/hy-status-bar.vue +41 -0
  158. package/components/hy-status-bar/index.scss +6 -0
  159. package/components/hy-status-bar/props.ts +8 -0
  160. package/components/hy-status-bar/typing.d.ts +12 -0
  161. package/components/hy-steps/hy-steps.vue +36 -163
  162. package/components/hy-steps/index.scss +131 -0
  163. package/components/hy-steps/props.ts +2 -2
  164. package/components/hy-steps/typing.d.ts +2 -2
  165. package/components/hy-submitBar/Index.vue +17 -0
  166. package/components/hy-submitBar/hy-submitBar.vue +216 -0
  167. package/components/hy-submitBar/index.scss +9 -0
  168. package/components/hy-submitBar/props.ts +22 -0
  169. package/components/hy-submitBar/typing.d.ts +88 -0
  170. package/components/hy-subsection/hy-subsection.vue +40 -132
  171. package/components/hy-subsection/index.scss +82 -0
  172. package/components/hy-subsection/props.ts +1 -0
  173. package/components/hy-subsection/typing.d.ts +13 -4
  174. package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
  175. package/components/hy-swipe-action/index.scss +9 -0
  176. package/components/hy-swipe-action/index.wxs +235 -0
  177. package/components/hy-swipe-action/props.ts +16 -0
  178. package/components/hy-swipe-action/typing.d.ts +55 -0
  179. package/components/hy-swipe-action/wxs.js +15 -0
  180. package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
  181. package/components/hy-swiper/hy-swiper.vue +1 -54
  182. package/components/hy-swiper/index.scss +82 -0
  183. package/components/hy-switch/hy-switch.vue +62 -72
  184. package/components/hy-switch/index.scss +46 -0
  185. package/components/hy-switch/props.ts +4 -1
  186. package/components/hy-switch/typing.d.ts +14 -1
  187. package/components/hy-tabs/hy-tabs.vue +22 -81
  188. package/components/hy-tabs/index.scss +63 -0
  189. package/components/hy-tabs/props.ts +5 -5
  190. package/components/hy-tabs/typing.d.ts +1 -1
  191. package/components/hy-tag/hy-tag.vue +25 -220
  192. package/components/hy-tag/index.scss +205 -0
  193. package/components/hy-text/hy-text.vue +238 -0
  194. package/components/hy-text/index.scss +70 -0
  195. package/components/hy-text/index.ts +0 -0
  196. package/components/hy-text/props.ts +30 -0
  197. package/components/hy-text/typing.d.ts +98 -0
  198. package/components/hy-textarea/hy-textarea.vue +1 -46
  199. package/components/hy-textarea/index.scss +40 -0
  200. package/components/hy-toast/hy-toast.vue +175 -0
  201. package/components/hy-toast/index.scss +77 -0
  202. package/components/hy-toast/props.ts +3 -0
  203. package/components/hy-toast/typing.d.ts +38 -0
  204. package/components/hy-tooltip/hy-tooltip.vue +42 -95
  205. package/components/hy-tooltip/index.scss +64 -0
  206. package/components/hy-tooltip/props.ts +2 -2
  207. package/components/hy-tooltip/typing.d.ts +1 -1
  208. package/components/hy-transition/hy-transition.vue +4 -2
  209. package/components/hy-transition/typing.d.ts +1 -13
  210. package/components/hy-upload/hy-upload.vue +37 -182
  211. package/components/hy-upload/index.scss +147 -0
  212. package/components/hy-upload/props.ts +2 -2
  213. package/components/hy-upload/typing.d.ts +11 -11
  214. package/components/hy-warn/hy-warn.vue +17 -144
  215. package/components/hy-warn/index.scss +109 -0
  216. package/components/hy-warn/props.ts +3 -3
  217. package/components/hy-warn/typing.d.ts +4 -3
  218. package/components/hy-waterfall/hy-waterfall.vue +168 -38
  219. package/components/hy-waterfall/index.scss +16 -0
  220. package/components/hy-waterfall/props.ts +4 -5
  221. package/components/hy-waterfall/typing.d.ts +5 -9
  222. package/components/index.ts +25 -1
  223. package/components/message/index.ts +54 -54
  224. package/composables/index.ts +1 -0
  225. package/composables/useShare.ts +27 -0
  226. package/config/color.ts +3 -2
  227. package/config/icon.ts +21 -1
  228. package/global/index.ts +6 -6
  229. package/global/register-properties.ts +2 -2
  230. package/index.scss +2 -1
  231. package/index.ts +9 -8
  232. package/libs/css/common.scss +14 -2
  233. package/package.json +3 -2
  234. package/{libs/css → public/font}/iconfont.css +4 -4
  235. package/theme.scss +6 -4
  236. package/typing/index.ts +1 -1
  237. package/typing/modules/common.d.ts +36 -1
  238. package/utils/calendar.js +1021 -0
  239. package/utils/colorGradient.ts +112 -0
  240. package/utils/index.ts +2 -0
  241. package/utils/inside.ts +80 -34
  242. package/utils/inspect.ts +115 -0
  243. package/utils/utils.ts +20 -19
  244. package/libs/css/download.zip +0 -0
  245. /package/{libs/css → public/font}/iconfont.ttf +0 -0
  246. /package/{libs/css → public/font}/iconfont.woff +0 -0
  247. /package/{libs/css → public/font}/iconfont.woff2 +0 -0
@@ -14,17 +14,24 @@ import HyCard from "./hy-card/hy-card.vue";
14
14
  import HyCell from "./hy-cell/hy-cell.vue";
15
15
  import HyCheckButton from "./hy-check-button/hy-check-button.vue";
16
16
  import HyCheckbox from "./hy-checkbox/hy-checkbox.vue";
17
+ import HyCountDown from "./hy-count-down/hy-count-down.vue";
18
+ import HyCountTo from "./hy-count-to/hy-count-to.vue";
17
19
  import HyDatetimePicker from "./hy-datetime-picker/hy-datetime-picker.vue";
18
20
  import HyDivider from "./hy-divider/hy-divider.vue";
21
+ import HyDropdown from "./hy-dropdown/hy-dropdown.vue";
22
+ import HyDropdownItem from "./hy-dropdown-item/hy-dropdown-item.vue";
19
23
  import YkEmpty from "./hy-empty/hy-empty.vue";
24
+ import YkFloatButton from "./hy-float-button/hy-float-button.vue";
20
25
  import HyFoldingPanel from "./hy-folding-panel/hy-folding-panel.vue";
21
26
  import HyForm from "./hy-form/hy-form.vue";
22
27
  import HyGrid from "./hy-grid/hy-grid.vue";
23
28
  import HyIcon from "./hy-icon/hy-icon.vue";
29
+ import HyImage from "./hy-image/hy-image.vue";
24
30
  import HyInput from "./hy-input/hy-input.vue";
25
31
  import HyLine from "./hy-line/hy-line.vue";
26
32
  import HyLineProgress from "./hy-line-progress/hy-line-progress.vue";
27
33
  import HyList from "./hy-list/hy-list.vue";
34
+ import HyLoading from "./hy-loading/hy-loading.vue";
28
35
  import YkLogin from "./hy-login/hy-login.vue";
29
36
  import HyModal from "./hy-modal/hy-modal.vue";
30
37
  import HyNavbar from "./hy-navbar/hy-navbar.vue";
@@ -42,6 +49,7 @@ import HyReadMore from "./hy-read-more/hy-read-more.vue";
42
49
  import HyScrollList from "./hy-scroll-list/hy-scroll-list.vue";
43
50
  import HySearch from "./hy-search/hy-search.vue";
44
51
  import HySlider from "./hy-slider/hy-slider.vue";
52
+ import HyStatusBar from "./hy-status-bar/hy-status-bar.vue";
45
53
  import HySteps from "./hy-steps/hy-steps.vue";
46
54
  import HySubsection from "./hy-subsection/hy-subsection.vue";
47
55
  import HySwiper from "./hy-swiper/hy-swiper.vue";
@@ -66,17 +74,24 @@ const install = (Vue: any) => {
66
74
  Vue.component("HyCell", HyCell);
67
75
  Vue.component("HyCheckButton", HyCheckButton);
68
76
  Vue.component("HyCheckbox", HyCheckbox);
77
+ Vue.component("HyCountDown", HyCountDown);
78
+ Vue.component("HyCountTo", HyCountTo);
69
79
  Vue.component("HyDatetimePicker", HyDatetimePicker);
70
80
  Vue.component("HyDivider", HyDivider);
81
+ Vue.component("HyDropdown", HyDropdown);
82
+ Vue.component("HyDropdownItem", HyDropdownItem);
71
83
  Vue.component("YkEmpty", YkEmpty);
84
+ Vue.component("YkFloatButton", YkFloatButton);
72
85
  Vue.component("HyFoldingPanel", HyFoldingPanel);
73
86
  Vue.component("HyForm", HyForm);
74
87
  Vue.component("HyGrid", HyGrid);
75
88
  Vue.component("HyIcon", HyIcon);
89
+ Vue.component("HyImage", HyImage);
76
90
  Vue.component("HyInput", HyInput);
77
91
  Vue.component("HyLine", HyLine);
78
92
  Vue.component("HyLineProgress", HyLineProgress);
79
93
  Vue.component("HyList", HyList);
94
+ Vue.component("HyLoading", HyLoading);
80
95
  Vue.component("YkLogin", YkLogin);
81
96
  Vue.component("HyModal", HyModal);
82
97
  Vue.component("HyNavbar", HyNavbar);
@@ -93,6 +108,7 @@ const install = (Vue: any) => {
93
108
  Vue.component("HyScrollList", HyScrollList);
94
109
  Vue.component("HySearch", HySearch);
95
110
  Vue.component("HySlider", HySlider);
111
+ Vue.component("HyStatusBar", HyStatusBar);
96
112
  Vue.component("HySteps", HySteps);
97
113
  Vue.component("HySubsection", HySubsection);
98
114
  Vue.component("HySwiper", HySwiper);
@@ -121,17 +137,24 @@ export {
121
137
  HyCell,
122
138
  HyCheckButton,
123
139
  HyCheckbox,
140
+ HyCountDown,
141
+ HyCountTo,
124
142
  HyDatetimePicker,
125
143
  HyDivider,
144
+ HyDropdown,
145
+ HyDropdownItem,
126
146
  YkEmpty,
147
+ YkFloatButton,
127
148
  HyFoldingPanel,
128
149
  HyForm,
129
150
  HyGrid,
130
151
  HyIcon,
152
+ HyImage,
131
153
  HyInput,
132
154
  HyLine,
133
155
  HyLineProgress,
134
156
  HyList,
157
+ HyLoading,
135
158
  YkLogin,
136
159
  HyModal,
137
160
  HyNavbar,
@@ -148,6 +171,7 @@ export {
148
171
  HyScrollList,
149
172
  HySearch,
150
173
  HySlider,
174
+ HyStatusBar,
151
175
  HySteps,
152
176
  HySubsection,
153
177
  HySwiper,
@@ -158,5 +182,5 @@ export {
158
182
  HyTooltip,
159
183
  HyTransition,
160
184
  HyUpload,
161
- HyWarn
185
+ HyWarn,
162
186
  };
@@ -1,54 +1,54 @@
1
- import { createVNode, render } from "vue";
2
- import Dialog, { DialogParam } from "./TheMessage.vue";
3
-
4
- let instance: any = null;
5
-
6
- const successIcon = "https://pic1.imgdb.cn/item/67a74cbdd0e0a243d4fd160b.png";
7
- const errorIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9078.png";
8
- const warningIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9079.png";
9
- /**
10
- * @description 创建div添加dialog组件
11
- * */
12
- const mountDialog = () => {
13
- if (!instance) {
14
- const container = document.createElement("div");
15
- document.body.appendChild(container); // 先添加到 body
16
- instance = createVNode(Dialog);
17
- render(instance, container);
18
- }
19
- };
20
- /**
21
- * @description 打开传参
22
- * */
23
- const openParams = (options: DialogParam, icon: string) => {
24
- instance.component.exposed.open(
25
- Object.assign(
26
- {
27
- icon
28
- },
29
- options
30
- )
31
- );
32
- };
33
-
34
- const DialogService = {
35
- success(options: DialogParam) {
36
- mountDialog();
37
- openParams(options, successIcon);
38
- },
39
- error(options: DialogParam) {
40
- mountDialog();
41
- openParams(options, errorIcon);
42
- },
43
- warning(options: DialogParam) {
44
- mountDialog();
45
- openParams(options, warningIcon);
46
- },
47
- close() {
48
- if (instance) {
49
- instance.component.exposed.close();
50
- }
51
- }
52
- };
53
-
54
- export default DialogService;
1
+ import { createVNode, render } from "vue";
2
+ import Dialog, { type DialogParam } from "./TheMessage.vue";
3
+
4
+ let instance: any = null;
5
+
6
+ const successIcon = "https://pic1.imgdb.cn/item/67a74cbdd0e0a243d4fd160b.png";
7
+ const errorIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9078.png";
8
+ const warningIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9079.png";
9
+ /**
10
+ * @description 创建div添加dialog组件
11
+ * */
12
+ const mountDialog = () => {
13
+ if (!instance) {
14
+ const container = document.createElement("div");
15
+ document.body.appendChild(container); // 先添加到 body
16
+ instance = createVNode(Dialog);
17
+ render(instance, container);
18
+ }
19
+ };
20
+ /**
21
+ * @description 打开传参
22
+ * */
23
+ const openParams = (options: DialogParam, icon: string) => {
24
+ instance.component.exposed.open(
25
+ Object.assign(
26
+ {
27
+ icon,
28
+ },
29
+ options,
30
+ ),
31
+ );
32
+ };
33
+
34
+ const DialogService = {
35
+ success(options: DialogParam) {
36
+ mountDialog();
37
+ openParams(options, successIcon);
38
+ },
39
+ error(options: DialogParam) {
40
+ mountDialog();
41
+ openParams(options, errorIcon);
42
+ },
43
+ warning(options: DialogParam) {
44
+ mountDialog();
45
+ openParams(options, warningIcon);
46
+ },
47
+ close() {
48
+ if (instance) {
49
+ instance.component.exposed.close();
50
+ }
51
+ },
52
+ };
53
+
54
+ export default DialogService;
@@ -0,0 +1 @@
1
+ export * from "./useShare";
@@ -0,0 +1,27 @@
1
+ interface ShareConfig {
2
+ title?: string;
3
+ path?: string;
4
+ friendImageUrl?: string;
5
+ timelineImageUrl?: string;
6
+ }
7
+
8
+ export const useShare = (config: ShareConfig = {}) => {
9
+ return {
10
+ //分享给好友的处理函数
11
+ onShareAppMessage() {
12
+ return {
13
+ title: config.title,
14
+ path: config.path,
15
+ imageUrl: config.friendImageUrl,
16
+ };
17
+ },
18
+
19
+ //分享到朋友圈的处理函数
20
+ onShareTimeline() {
21
+ return {
22
+ title: config.title,
23
+ imageUrl: config.timelineImageUrl,
24
+ };
25
+ },
26
+ };
27
+ };
package/config/color.ts CHANGED
@@ -1,6 +1,7 @@
1
- export const ColorConfig = {
1
+ export const ColorConfig: AnyObject = {
2
2
  success: "#5ac725",
3
3
  primary: "#3c9cff",
4
4
  warning: "#f9ae3d",
5
- error: "#f56c6c"
5
+ error: "#f56c6c",
6
+ info: "#909399",
6
7
  };
package/config/icon.ts CHANGED
@@ -362,5 +362,25 @@ export const IconConfig = {
362
362
  /**
363
363
  * @description 分享-实心
364
364
  * */
365
- SHARE_FILL: "share-fill"
365
+ SHARE_FILL: "share-fill",
366
+ };
367
+
368
+ /**
369
+ * @description 不同主题对应不同的图标
370
+ * */
371
+ export const iconName = (type: string) => {
372
+ switch (type) {
373
+ case "success":
374
+ return IconConfig.SUCCESS_FILL;
375
+ case "error":
376
+ return IconConfig.CLOSE_CIRCLE_FILL;
377
+ case "warning":
378
+ return IconConfig.NOTICE_FILL;
379
+ case "info":
380
+ return IconConfig.HELP_FILL;
381
+ case "primary":
382
+ return IconConfig.MESSAGE_FILL;
383
+ default:
384
+ return IconConfig.CLOSE_CIRCLE_FILL;
385
+ }
366
386
  };
package/global/index.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { App } from "vue";
2
- import registerProperties from "./register-properties";
3
-
4
- export const globalRegister = (app: App): void => {
5
- app.use(registerProperties)
6
- }
1
+ import type { App } from "vue";
2
+ import registerProperties from "./register-properties";
3
+
4
+ export const globalRegister = (app: App): void => {
5
+ app.use(registerProperties);
6
+ };
@@ -1,4 +1,4 @@
1
- import { App } from "vue";
1
+ import type { App } from "vue";
2
2
  import { addUnit, bytesToSize, formatTime, random } from "../utils";
3
3
  export default function registerProperties(app: App) {
4
4
  app.config.globalProperties.$hy = {
@@ -32,6 +32,6 @@ export default function registerProperties(app: App) {
32
32
  * @param {Number} bytes 字节
33
33
  * @returns {String} 返回单位大小
34
34
  * */
35
- bytesToSize: (bytes: number): string => bytesToSize(bytes)
35
+ bytesToSize: (bytes: number): string => bytesToSize(bytes),
36
36
  };
37
37
  }
package/index.scss CHANGED
@@ -1 +1,2 @@
1
- @import "./libs/css/common.scss";
1
+ @use "./libs/css/common.scss";
2
+ //@use "./libs/css/mixin.scss" as HyMixin;
package/index.ts CHANGED
@@ -1,8 +1,9 @@
1
- export * from "./common";
2
- export * from "./utils";
3
- export * from "./store";
4
- export * from "./components";
5
- export * from "./global";
6
- export * from "./typing";
7
- export * from "./api";
8
- export * from "./config";
1
+ export * from "./common";
2
+ export * from "./utils";
3
+ export * from "./store";
4
+ export * from "./components";
5
+ export * from "./global";
6
+ export * from "./typing";
7
+ export * from "./api";
8
+ export * from "./config";
9
+ export * from "./composables";
@@ -1,4 +1,16 @@
1
- @import "../../theme.scss";
2
- .hy-border-bottom {
1
+ @use "../../theme.scss" as *;
2
+ .hy-border__bottom {
3
3
  border-bottom: $hy-border-line;
4
+ }
5
+
6
+ .hy-border {
7
+ border: $hy-border-line;
8
+ }
9
+
10
+ .hy-border__top {
11
+ border-top: $hy-border-line;
12
+ }
13
+
14
+ .hy-page {
15
+ padding: $hy-border-margin-padding-base;
4
16
  }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.1.2",
4
- "description": "表单适配微信小程序bug修改",
3
+ "version": "0.1.4",
4
+ "description": "瀑布流组件",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},
8
8
  "files": [
9
9
  "common/",
10
10
  "components/",
11
+ "composables/",
11
12
  "global/",
12
13
  "public/",
13
14
  "store/",
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
- font-family: "iconfont"; /* Project id 4305932 */
3
- src: url('iconfont.woff2?t=1745201408280') format('woff2'),
4
- url('iconfont.woff?t=1745201408280') format('woff'),
5
- url('iconfont.ttf?t=1745201408280') format('truetype');
2
+ font-family: 'iconfont'; /* Project id 4305932 */
3
+ src: url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff2?t=1745506339367') format('woff2'),
4
+ url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff?t=1745506339367') format('woff'),
5
+ url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.ttf?t=1745506339367') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
package/theme.scss CHANGED
@@ -80,15 +80,17 @@ $hy-avatar-size-lg: 120rpx;
80
80
  $hy-opacity-disabled: 0.3; // 组件禁用态的透明度
81
81
 
82
82
  /* 盒子的圆角 */
83
- $hy-border-radius-sm: 6rpx;
84
- $hy-border-radius-base: 12rpx;
85
- $hy-border-radius-lg: 20rpx;
83
+ $hy-border-radius-no: 0;
84
+ $hy-border-radius-sm: 8rpx;
85
+ $hy-border-radius-base: 20rpx;
86
+ $hy-border-radius-lg: 32rpx;
86
87
  $hy-border-radius-circle: 50%;
88
+ $hy-border-radius-semicircle: 100px;
87
89
  /* 盒子阴影 */
88
90
  $hy-box-shadow: 0 0 10rpx 4rpx rgba(0, 0, 0, 0.16);
89
91
  /* 盒内盒外间距 */
90
92
  $hy-border-margin-padding-sm: 10rpx;
91
93
  $hy-border-margin-padding-base: 20rpx;
92
- $hy-border-margin-padding-lg: 25rpx;
94
+ $hy-border-margin-padding-lg: 30rpx;
93
95
  /* 底部线条 */
94
96
  $hy-border-line: 1px solid #dadbde;
package/typing/index.ts CHANGED
@@ -3,4 +3,4 @@ export * from "./modules/dialog";
3
3
  export * from "./modules/http";
4
4
  export * from "./modules/enum";
5
5
  export * from "./modules/rect";
6
- // export * from "./modules/icon";
6
+ // export * from "./modules/common";
@@ -27,7 +27,7 @@ declare namespace HyApp {
27
27
  /**
28
28
  * @description 排列方式,row-横向,column-纵向
29
29
  * */
30
- type PermutationType = "row" | "column";
30
+ type DirectionType = "row" | "column";
31
31
  /**
32
32
  * @description 布局方式;left-左,right-右,top-上,bottom-下,center-中
33
33
  * */
@@ -36,10 +36,22 @@ declare namespace HyApp {
36
36
  * @description 布局方式:left-左,right-右
37
37
  * */
38
38
  type LeftRightType = "left" | "right";
39
+ /**
40
+ * @description 布局方式:left-左,right-右,center-中间
41
+ * */
42
+ type RowCenterType = LeftRightType | "center";
43
+ /**
44
+ * @description 布局方式:top-上,bottom-下,center-中间
45
+ * */
46
+ type ColumnCenterType = TopBottomType | "center";
39
47
  /**
40
48
  * @description 布局方式:top-上,bottom-下
41
49
  * */
42
50
  type TopBottomType = "top" | "bottom";
51
+ /**
52
+ * @description 主题亮度:light-亮色,dark-暗色
53
+ * */
54
+ type ThemeVo = "light" | "dark";
43
55
  /**
44
56
  * @description 边框:surround-四周有边框,bottom-底部有边框,none-无边框
45
57
  * */
@@ -83,7 +95,30 @@ declare namespace HyApp {
83
95
  * @description 旋转方向
84
96
  * */
85
97
  type RotateType = "left" | "up" | "down";
98
+ /**
99
+ * @description 上传类型
100
+ * */
86
101
  type FileType = "video" | "media" | "all" | "file" | "image";
102
+ /**
103
+ * @description 加载模式:circle-圆圈,spinner-经典花,semicircle-半圆
104
+ * */
105
+ type LoadingMode = "spinner" | "circle" | "semicircle";
106
+ /**
107
+ * @description 动画类型
108
+ * */
109
+ type TransitionMode =
110
+ | "fade"
111
+ | "fade-up"
112
+ | "fade-down"
113
+ | "fade-left"
114
+ | "fade-right"
115
+ | "fade-zoom"
116
+ | "slide-up"
117
+ | "slide-down"
118
+ | "slide-left"
119
+ | "slide-right"
120
+ | "zoom-in"
121
+ | "zoom-out";
87
122
  interface IFieldNames {
88
123
  /**
89
124
  * @description 自定义columns的文本键