hy-app 0.1.2 → 0.1.3

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 (221) 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 +12 -124
  16. package/components/hy-button/index.scss +116 -0
  17. package/components/hy-calendar/header.vue +76 -0
  18. package/components/hy-calendar/hy-calendar.vue +366 -0
  19. package/components/hy-calendar/index.scss +171 -0
  20. package/components/hy-calendar/month.vue +524 -0
  21. package/components/hy-calendar/props.ts +37 -0
  22. package/components/hy-calendar/typing.d.ts +126 -0
  23. package/components/hy-card/hy-card.vue +21 -84
  24. package/components/hy-card/index.scss +57 -0
  25. package/components/hy-card/props.ts +2 -2
  26. package/components/hy-card/typing.d.ts +1 -1
  27. package/components/hy-cell/hy-cell.vue +1 -137
  28. package/components/hy-cell/index.scss +137 -0
  29. package/components/hy-check-button/hy-check-button.vue +1 -0
  30. package/components/hy-check-button/index.scss +5 -0
  31. package/components/hy-checkbox/hy-checkbox.vue +2 -95
  32. package/components/hy-checkbox/index.scss +94 -0
  33. package/components/hy-checkbox/typing.d.ts +1 -2
  34. package/components/hy-count-down/hy-count-down.vue +150 -0
  35. package/components/hy-count-down/index.scss +6 -0
  36. package/components/hy-count-down/index.ts +52 -0
  37. package/components/hy-count-down/props.ts +10 -0
  38. package/components/hy-count-down/typing.d.ts +20 -0
  39. package/components/hy-count-to/hy-count-to.vue +213 -0
  40. package/components/hy-count-to/index.scss +6 -0
  41. package/components/hy-count-to/props.ts +17 -0
  42. package/components/hy-count-to/typing.d.ts +48 -0
  43. package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -28
  44. package/components/hy-datetime-picker/index.scss +28 -0
  45. package/components/hy-divider/hy-divider.vue +24 -49
  46. package/components/hy-divider/index.scss +25 -0
  47. package/components/hy-divider/props.ts +2 -2
  48. package/components/hy-divider/typing.d.ts +1 -1
  49. package/components/hy-dropdown/hy-dropdown.vue +43 -0
  50. package/components/hy-dropdown/index.scss +17 -0
  51. package/components/hy-dropdown/props.ts +17 -0
  52. package/components/hy-dropdown/typing.d.ts +48 -0
  53. package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
  54. package/components/hy-dropdown-item/index.scss +96 -0
  55. package/components/hy-dropdown-item/props.ts +10 -0
  56. package/components/hy-dropdown-item/typing.d.ts +31 -0
  57. package/components/hy-empty/hy-empty.vue +8 -26
  58. package/components/hy-empty/index.scss +19 -0
  59. package/components/hy-empty/props.ts +2 -2
  60. package/components/hy-empty/typing.d.ts +1 -1
  61. package/components/hy-float-button/hy-float-button.vue +201 -0
  62. package/components/hy-float-button/index.scss +69 -0
  63. package/components/hy-float-button/props.ts +25 -0
  64. package/components/hy-float-button/typing.d.ts +93 -0
  65. package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
  66. package/components/hy-folding-panel/index.scss +6 -0
  67. package/components/hy-folding-panel/props.ts +2 -2
  68. package/components/hy-folding-panel/typing.d.ts +2 -2
  69. package/components/hy-form/hy-form.vue +17 -34
  70. package/components/hy-form/index.scss +30 -0
  71. package/components/hy-form/props.ts +2 -0
  72. package/components/hy-form/typing.d.ts +9 -1
  73. package/components/hy-grid/hy-grid.vue +1 -43
  74. package/components/hy-grid/index.scss +40 -0
  75. package/components/hy-icon/hy-icon.vue +1 -93
  76. package/components/hy-icon/index.scss +84 -0
  77. package/components/hy-image/hy-image.vue +212 -0
  78. package/components/hy-image/index.scss +26 -0
  79. package/components/hy-image/props.ts +24 -0
  80. package/components/hy-image/typing.d.ts +76 -0
  81. package/components/hy-input/hy-input.vue +2 -72
  82. package/components/hy-input/index.scss +65 -0
  83. package/components/hy-line/hy-line.vue +4 -8
  84. package/components/hy-line/index.scss +5 -0
  85. package/components/hy-line/props.ts +3 -3
  86. package/components/hy-line/typing.d.ts +2 -2
  87. package/components/hy-line-progress/hy-line-progress.vue +15 -44
  88. package/components/hy-line-progress/index.scss +38 -0
  89. package/components/hy-line-progress/props.ts +2 -2
  90. package/components/hy-line-progress/typing.d.ts +1 -1
  91. package/components/hy-list/hy-list.vue +11 -41
  92. package/components/hy-list/index.scss +32 -0
  93. package/components/hy-list/props.ts +2 -2
  94. package/components/hy-loading/hy-loading.vue +95 -0
  95. package/components/hy-loading/index.scss +103 -0
  96. package/components/hy-loading/props.ts +17 -0
  97. package/components/hy-loading/typing.d.ts +52 -0
  98. package/components/hy-login/TheUserLogin.vue +16 -16
  99. package/components/hy-login/hy-login.vue +9 -9
  100. package/components/hy-login/props.ts +4 -4
  101. package/components/hy-modal/hy-modal.vue +11 -89
  102. package/components/hy-modal/index.scss +77 -0
  103. package/components/hy-modal/props.ts +2 -2
  104. package/components/hy-modal/typing.d.ts +1 -1
  105. package/components/hy-navbar/hy-navbar.vue +20 -92
  106. package/components/hy-navbar/index.scss +67 -0
  107. package/components/hy-navbar/props.ts +2 -2
  108. package/components/hy-navbar/typing.d.ts +1 -1
  109. package/components/hy-notice-bar/hy-column-notice.vue +11 -39
  110. package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
  111. package/components/hy-notice-bar/hy-row-notice.vue +5 -56
  112. package/components/hy-notice-bar/index.scss +93 -0
  113. package/components/hy-notice-bar/props.ts +4 -2
  114. package/components/hy-notice-bar/typing.d.ts +13 -3
  115. package/components/hy-number-step/hy-number-step.vue +1 -70
  116. package/components/hy-number-step/index.scss +71 -0
  117. package/components/hy-overlay/hy-overlay.vue +2 -14
  118. package/components/hy-overlay/index.scss +9 -0
  119. package/components/hy-picker/hy-picker.vue +1 -68
  120. package/components/hy-picker/index.scss +68 -0
  121. package/components/hy-popup/hy-popup.vue +1 -74
  122. package/components/hy-popup/index.scss +60 -0
  123. package/components/hy-price/hy-price.vue +1 -11
  124. package/components/hy-price/index.scss +11 -0
  125. package/components/hy-qrcode/hy-qrcode.vue +15 -37
  126. package/components/hy-qrcode/index.scss +23 -0
  127. package/components/hy-qrcode/props.ts +2 -2
  128. package/components/hy-qrcode/typing.d.ts +2 -2
  129. package/components/hy-radio/hy-radio.vue +2 -101
  130. package/components/hy-radio/index.scss +93 -0
  131. package/components/hy-radio/typing.d.ts +1 -2
  132. package/components/hy-rate/hy-rate.vue +1 -33
  133. package/components/hy-rate/index.scss +33 -0
  134. package/components/hy-read-more/hy-read-more.vue +7 -30
  135. package/components/hy-read-more/index.scss +25 -0
  136. package/components/hy-read-more/props.ts +3 -3
  137. package/components/hy-read-more/typing.d.ts +1 -1
  138. package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
  139. package/components/hy-safe-bottom/index.scss +5 -0
  140. package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
  141. package/components/hy-scroll-list/index.scss +34 -0
  142. package/components/hy-scroll-list/props.ts +2 -2
  143. package/components/hy-scroll-list/typing.d.ts +1 -1
  144. package/components/hy-search/hy-search.vue +1 -83
  145. package/components/hy-search/index.scss +83 -0
  146. package/components/hy-slider/hy-slider.vue +14 -92
  147. package/components/hy-slider/index.scss +77 -0
  148. package/components/hy-status-bar/hy-status-bar.vue +41 -0
  149. package/components/hy-status-bar/index.scss +6 -0
  150. package/components/hy-status-bar/props.ts +8 -0
  151. package/components/hy-status-bar/typing.d.ts +12 -0
  152. package/components/hy-steps/hy-steps.vue +36 -163
  153. package/components/hy-steps/index.scss +131 -0
  154. package/components/hy-steps/props.ts +2 -2
  155. package/components/hy-steps/typing.d.ts +2 -2
  156. package/components/hy-subsection/hy-subsection.vue +40 -132
  157. package/components/hy-subsection/index.scss +82 -0
  158. package/components/hy-subsection/props.ts +1 -0
  159. package/components/hy-subsection/typing.d.ts +13 -4
  160. package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
  161. package/components/hy-swipe-action/index.scss +9 -0
  162. package/components/hy-swipe-action/index.wxs +235 -0
  163. package/components/hy-swipe-action/props.ts +16 -0
  164. package/components/hy-swipe-action/typing.d.ts +55 -0
  165. package/components/hy-swipe-action/wxs.js +15 -0
  166. package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
  167. package/components/hy-swiper/hy-swiper.vue +1 -54
  168. package/components/hy-swiper/index.scss +82 -0
  169. package/components/hy-switch/hy-switch.vue +62 -72
  170. package/components/hy-switch/index.scss +46 -0
  171. package/components/hy-switch/props.ts +4 -1
  172. package/components/hy-switch/typing.d.ts +14 -1
  173. package/components/hy-tabs/hy-tabs.vue +22 -81
  174. package/components/hy-tabs/index.scss +63 -0
  175. package/components/hy-tabs/props.ts +5 -5
  176. package/components/hy-tabs/typing.d.ts +1 -1
  177. package/components/hy-tag/hy-tag.vue +1 -214
  178. package/components/hy-tag/index.scss +204 -0
  179. package/components/hy-text/hy-text.vue +238 -0
  180. package/components/hy-text/index.scss +70 -0
  181. package/components/hy-text/index.ts +0 -0
  182. package/components/hy-text/props.ts +30 -0
  183. package/components/hy-text/typing.d.ts +98 -0
  184. package/components/hy-textarea/hy-textarea.vue +1 -46
  185. package/components/hy-textarea/index.scss +40 -0
  186. package/components/hy-tooltip/hy-tooltip.vue +42 -95
  187. package/components/hy-tooltip/index.scss +64 -0
  188. package/components/hy-tooltip/props.ts +2 -2
  189. package/components/hy-tooltip/typing.d.ts +1 -1
  190. package/components/hy-transition/hy-transition.vue +4 -2
  191. package/components/hy-transition/typing.d.ts +1 -13
  192. package/components/hy-upload/hy-upload.vue +37 -182
  193. package/components/hy-upload/index.scss +147 -0
  194. package/components/hy-upload/props.ts +2 -2
  195. package/components/hy-upload/typing.d.ts +11 -11
  196. package/components/hy-warn/hy-warn.vue +15 -123
  197. package/components/hy-warn/index.scss +109 -0
  198. package/components/hy-warn/props.ts +3 -3
  199. package/components/hy-warn/typing.d.ts +4 -3
  200. package/components/hy-waterfall/index.scss +82 -0
  201. package/components/index.ts +25 -1
  202. package/components/message/index.ts +54 -54
  203. package/config/color.ts +2 -1
  204. package/global/index.ts +6 -6
  205. package/global/register-properties.ts +2 -2
  206. package/index.scss +2 -1
  207. package/libs/css/common.scss +14 -2
  208. package/package.json +2 -2
  209. package/{libs/css → public/font}/iconfont.css +4 -4
  210. package/theme.scss +6 -4
  211. package/typing/modules/common.d.ts +16 -1
  212. package/utils/calendar.js +1021 -0
  213. package/utils/colorGradient.ts +112 -0
  214. package/utils/index.ts +2 -0
  215. package/utils/inside.ts +80 -34
  216. package/utils/inspect.ts +66 -0
  217. package/utils/utils.ts +11 -12
  218. package/libs/css/download.zip +0 -0
  219. /package/{libs/css → public/font}/iconfont.ttf +0 -0
  220. /package/{libs/css → public/font}/iconfont.woff +0 -0
  221. /package/{libs/css → public/font}/iconfont.woff2 +0 -0
@@ -2,7 +2,7 @@
2
2
  <HyTransition mode="fade" :show="show">
3
3
  <view
4
4
  class="hy-alert"
5
- :class="[`hy-alert--${type}--${effect}`]"
5
+ :class="[`hy-alert--${type}--${theme}`]"
6
6
  @tap.stop="clickHandler"
7
7
  :style="[customStyle]"
8
8
  >
@@ -13,8 +13,8 @@
13
13
  class="hy-alert__content"
14
14
  :style="[
15
15
  {
16
- paddingRight: closable ? '20px' : 0
17
- }
16
+ paddingRight: closable ? '20px' : 0,
17
+ },
18
18
  ]"
19
19
  >
20
20
  <text
@@ -23,13 +23,13 @@
23
23
  :style="[
24
24
  {
25
25
  fontSize: addUnit(fontSize),
26
- textAlign: center ? 'center' : 'left'
27
- }
26
+ textAlign: center ? 'center' : 'left',
27
+ },
28
28
  ]"
29
29
  :class="[
30
- effect === 'dark'
30
+ theme === 'dark'
31
31
  ? 'hy-alert__text--dark'
32
- : `hy-alert__text--${type}--light`
32
+ : `hy-alert__text--${type}--light`,
33
33
  ]"
34
34
  >{{ title }}</text
35
35
  >
@@ -39,13 +39,13 @@
39
39
  :style="[
40
40
  {
41
41
  fontSize: addUnit(fontSize),
42
- textAlign: center ? 'center' : 'left'
43
- }
42
+ textAlign: center ? 'center' : 'left',
43
+ },
44
44
  ]"
45
45
  :class="[
46
- effect === 'dark'
46
+ theme === 'dark'
47
47
  ? 'hy-alert__text--dark'
48
- : `hy-alert__text--${type}--light`
48
+ : `hy-alert__text--${type}--light`,
49
49
  ]"
50
50
  >{{ description }}</text
51
51
  >
@@ -60,7 +60,7 @@
60
60
  <script setup lang="ts">
61
61
  import { computed, ref, toRefs } from "vue";
62
62
  import defaultProps from "./props";
63
- import IProps from "./typing";
63
+ import type IProps from "./typing";
64
64
  import { addUnit } from "../../utils";
65
65
  import { IconConfig } from "../../config";
66
66
 
@@ -69,7 +69,7 @@ import HyTransition from "../hy-transition/hy-transition.vue";
69
69
  import HyIcon from "../hy-icon/hy-icon.vue";
70
70
 
71
71
  const props = withDefaults(defineProps<IProps>(), defaultProps);
72
- const { type, effect } = toRefs(props);
72
+ const { type, theme } = toRefs(props);
73
73
  const emit = defineEmits(["click", "close"]);
74
74
 
75
75
  const show = ref<boolean>(true);
@@ -78,7 +78,7 @@ const show = ref<boolean>(true);
78
78
  * @description icon颜色
79
79
  * */
80
80
  const iconColor = computed(() => {
81
- return effect.value === "light" ? type.value : "#fff";
81
+ return theme.value === "light" ? type.value : "#fff";
82
82
  });
83
83
  /**
84
84
  * @description 不同主题对应不同的图标
@@ -116,113 +116,5 @@ const closeHandler = () => {
116
116
  </script>
117
117
 
118
118
  <style lang="scss" scoped>
119
- @import "../../libs/css/mixin.scss";
120
- @import "../../theme.scss";
121
-
122
- .hy-alert {
123
- position: relative;
124
- background-color: $hy-primary;
125
- padding: 8px 10px;
126
- @include flex(row);
127
- align-items: center;
128
- border-radius: 4px;
129
-
130
- &--primary--dark {
131
- background-color: $hy-primary;
132
- }
133
-
134
- &--primary--light {
135
- background-color: #ecf5ff;
136
- }
137
-
138
- &--error--dark {
139
- background-color: $hy-error;
140
- }
141
-
142
- &--error--light {
143
- background-color: #fef0f0;
144
- }
145
-
146
- &--success--dark {
147
- background-color: $hy-success;
148
- }
149
-
150
- &--success--light {
151
- background-color: #f5fff0;
152
- }
153
-
154
- &--warning--dark {
155
- background-color: $hy-warning;
156
- }
157
-
158
- &--warning--light {
159
- background-color: #fdf6ec;
160
- }
161
-
162
- &--info--dark {
163
- background-color: $hy-info;
164
- }
165
-
166
- &--info--light {
167
- background-color: #f4f4f5;
168
- }
169
-
170
- &__icon {
171
- margin-right: 5px;
172
- }
173
-
174
- &__content {
175
- @include flex(column);
176
- flex: 1;
177
-
178
- &__title {
179
- font-size: 14px;
180
- font-weight: bold;
181
- color: #fff;
182
- margin-bottom: 2px;
183
- }
184
-
185
- &__desc {
186
- font-size: 14px;
187
- flex-wrap: wrap;
188
- color: #fff;
189
- }
190
- }
191
-
192
- &__title--dark,
193
- &__desc--dark {
194
- color: #ffffff;
195
- }
196
-
197
- &__text--primary--light,
198
- &__text--primary--light {
199
- color: $hy-primary;
200
- }
201
-
202
- &__text--success--light,
203
- &__text--success--light {
204
- color: $hy-success;
205
- }
206
-
207
- &__text--warning--light,
208
- &__text--warning--light {
209
- color: $hy-warning;
210
- }
211
-
212
- &__text--error--light,
213
- &__text--error--light {
214
- color: $hy-error;
215
- }
216
-
217
- &__text--info--light,
218
- &__text--info--light {
219
- color: $hy-info;
220
- }
221
-
222
- &__close {
223
- position: absolute;
224
- top: 11px;
225
- right: 10px;
226
- }
227
- }
119
+ @import "./index.scss";
228
120
  </style>
@@ -0,0 +1,109 @@
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ .hy-alert {
5
+ position: relative;
6
+ background-color: $hy-primary;
7
+ padding: $hy-border-margin-padding-base;
8
+ @include flex(row);
9
+ align-items: center;
10
+ border-radius: $hy-border-radius-sm;
11
+
12
+ &--primary--dark {
13
+ background-color: $hy-primary;
14
+ }
15
+
16
+ &--primary--light {
17
+ background-color: $hy-primary-light;
18
+ }
19
+
20
+ &--error--dark {
21
+ background-color: $hy-error;
22
+ }
23
+
24
+ &--error--light {
25
+ background-color: $hy-error-light;
26
+ }
27
+
28
+ &--success--dark {
29
+ background-color: $hy-success;
30
+ }
31
+
32
+ &--success--light {
33
+ background-color: $hy-success-light;
34
+ }
35
+
36
+ &--warning--dark {
37
+ background-color: $hy-warning;
38
+ }
39
+
40
+ &--warning--light {
41
+ background-color: $hy-warning-light;
42
+ }
43
+
44
+ &--info--dark {
45
+ background-color: $hy-info;
46
+ }
47
+
48
+ &--info--light {
49
+ background-color: $hy-info-light;
50
+ }
51
+
52
+ &__icon {
53
+ margin-right: $hy-border-margin-padding-sm;
54
+ }
55
+
56
+ &__content {
57
+ @include flex(column);
58
+ flex: 1;
59
+
60
+ &__title {
61
+ font-size: 14px;
62
+ font-weight: bold;
63
+ color: #fff;
64
+ margin-bottom: 2px;
65
+ }
66
+
67
+ &__desc {
68
+ font-size: 14px;
69
+ flex-wrap: wrap;
70
+ color: #fff;
71
+ }
72
+ }
73
+
74
+ &__title--dark,
75
+ &__desc--dark {
76
+ color: #ffffff;
77
+ }
78
+
79
+ &__text--primary--light,
80
+ &__text--primary--light {
81
+ color: $hy-primary;
82
+ }
83
+
84
+ &__text--success--light,
85
+ &__text--success--light {
86
+ color: $hy-success;
87
+ }
88
+
89
+ &__text--warning--light,
90
+ &__text--warning--light {
91
+ color: $hy-warning;
92
+ }
93
+
94
+ &__text--error--light,
95
+ &__text--error--light {
96
+ color: $hy-error;
97
+ }
98
+
99
+ &__text--info--light,
100
+ &__text--info--light {
101
+ color: $hy-info;
102
+ }
103
+
104
+ &__close {
105
+ position: absolute;
106
+ top: 11px;
107
+ right: 10px;
108
+ }
109
+ }
@@ -1,4 +1,4 @@
1
- import IProps from "./typing";
1
+ import type IProps from "./typing";
2
2
 
3
3
  const defaultProps: IProps = {
4
4
  title: "",
@@ -6,9 +6,9 @@ const defaultProps: IProps = {
6
6
  description: "",
7
7
  closable: false,
8
8
  showIcon: false,
9
- effect: "light",
9
+ theme: "light",
10
10
  center: false,
11
- fontSize: 14
11
+ fontSize: 14,
12
12
  };
13
13
 
14
14
  export default defaultProps;
@@ -1,4 +1,5 @@
1
- import { CSSProperties } from "vue";
1
+ import type { CSSProperties } from "vue";
2
+ import { HyApp, type ThemeVo } from "@/package/typing/modules/common";
2
3
 
3
4
  export default interface IProps {
4
5
  /**
@@ -22,9 +23,9 @@ export default interface IProps {
22
23
  * */
23
24
  showIcon?: boolean;
24
25
  /**
25
- * @description 多图时,图片缩放裁剪的模式 (默认 'light' )
26
+ * @description 显示的暗色或者亮色 (默认 'light' )
26
27
  * */
27
- effect?: "light" | "dark";
28
+ theme?: HyApp.ThemeVo;
28
29
  /**
29
30
  * @description 文字是否居中 (默认 false )
30
31
  * */
@@ -0,0 +1,82 @@
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ .hy-subsection {
5
+ @include flex;
6
+ position: relative;
7
+ overflow: hidden;
8
+ /* #ifndef APP-NVUE */
9
+ width: 100%;
10
+ box-sizing: border-box;
11
+ /* #endif */
12
+
13
+ &--button {
14
+ height: 35px;
15
+ background-color: rgb(238, 238, 239);
16
+ padding: 3px;
17
+ border-radius: $hy-border-radius-sm;
18
+ align-items: stretch;
19
+
20
+ &__bar {
21
+ background-color: #ffffff;
22
+ border-radius: $hy-border-radius-base;
23
+ }
24
+ }
25
+
26
+ &--subsection {
27
+ height: 32px;
28
+ }
29
+
30
+ &__bar {
31
+ position: absolute;
32
+ /* #ifndef APP-NVUE */
33
+ transition-property: transform, color;
34
+ transition-duration: 0.3s;
35
+ transition-timing-function: ease-in-out;
36
+ /* #endif */
37
+
38
+ &--first {
39
+ border-radius: $hy-border-radius-sm 0 0 $hy-border-radius-sm;
40
+ }
41
+
42
+ &--center {
43
+ border-radius: 0;
44
+ }
45
+
46
+ &--last {
47
+ border-radius: 0 $hy-border-radius-sm $hy-border-radius-sm 0;
48
+ }
49
+ }
50
+
51
+ &__item {
52
+ @include flex;
53
+ flex: 1;
54
+ justify-content: center;
55
+ align-items: center;
56
+ // vue环境下,需要设置相对定位,因为滑块为绝对定位,item需要在滑块的上面
57
+ position: relative;
58
+
59
+ &--no-border-right {
60
+ border-right-width: 0 !important;
61
+ }
62
+
63
+ &--first {
64
+ border-top-left-radius: $hy-border-radius-sm;
65
+ border-bottom-left-radius: $hy-border-radius-sm;
66
+ }
67
+
68
+ &--last {
69
+ border-top-right-radius: $hy-border-radius-sm;
70
+ border-bottom-right-radius: $hy-border-radius-sm;
71
+ }
72
+
73
+ &__text {
74
+ font-size: 12px;
75
+ line-height: 14px;
76
+ @include flex;
77
+ align-items: center;
78
+ transition-property: color;
79
+ transition-duration: 0.3s;
80
+ }
81
+ }
82
+ }
@@ -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;
package/config/color.ts CHANGED
@@ -2,5 +2,6 @@ export const ColorConfig = {
2
2
  success: "#5ac725",
3
3
  primary: "#3c9cff",
4
4
  warning: "#f9ae3d",
5
- error: "#f56c6c"
5
+ error: "#f56c6c",
6
+ info: "#909399",
6
7
  };
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;
@@ -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
  }