hy-app 0.1.1 → 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 (264) 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 +14 -42
  5. package/components/hy-address-picker/index.scss +27 -0
  6. package/components/hy-address-picker/props.ts +2 -3
  7. package/components/hy-address-picker/typing.d.ts +1 -2
  8. package/components/hy-avatar/hy-avatar.vue +10 -54
  9. package/components/hy-avatar/index.scss +45 -0
  10. package/components/hy-avatar/props.ts +2 -2
  11. package/components/hy-avatar/typing.d.ts +2 -2
  12. package/components/hy-back-top/hy-back-top.vue +7 -22
  13. package/components/hy-back-top/index.scss +16 -0
  14. package/components/hy-back-top/props.ts +4 -4
  15. package/components/hy-back-top/typing.d.ts +2 -3
  16. package/components/hy-badge/hy-badge.vue +5 -75
  17. package/components/hy-badge/index.scss +72 -0
  18. package/components/hy-badge/props.ts +2 -2
  19. package/components/hy-badge/typing.d.ts +2 -2
  20. package/components/hy-button/hy-button.vue +22 -134
  21. package/components/hy-button/index.scss +116 -0
  22. package/components/hy-button/props.ts +4 -5
  23. package/components/hy-button/typing.d.ts +3 -3
  24. package/components/hy-calendar/header.vue +76 -0
  25. package/components/hy-calendar/hy-calendar.vue +366 -0
  26. package/components/hy-calendar/index.scss +171 -0
  27. package/components/hy-calendar/month.vue +524 -0
  28. package/components/hy-calendar/props.ts +37 -0
  29. package/components/hy-calendar/typing.d.ts +126 -0
  30. package/components/hy-card/hy-card.vue +21 -84
  31. package/components/hy-card/index.scss +57 -0
  32. package/components/hy-card/props.ts +2 -2
  33. package/components/hy-card/typing.d.ts +1 -1
  34. package/components/hy-cell/hy-cell.vue +30 -131
  35. package/components/hy-cell/index.scss +137 -0
  36. package/components/hy-cell/props.ts +2 -2
  37. package/components/hy-cell/typing.d.ts +4 -3
  38. package/components/hy-check-button/hy-check-button.vue +14 -7
  39. package/components/hy-check-button/index.scss +5 -0
  40. package/components/hy-check-button/props.ts +3 -3
  41. package/components/hy-checkbox/hy-checkbox.vue +24 -107
  42. package/components/hy-checkbox/index.scss +94 -0
  43. package/components/hy-checkbox/props.ts +4 -5
  44. package/components/hy-checkbox/typing.d.ts +3 -7
  45. package/components/hy-count-down/hy-count-down.vue +150 -0
  46. package/components/hy-count-down/index.scss +6 -0
  47. package/components/hy-count-down/index.ts +52 -0
  48. package/components/hy-count-down/props.ts +10 -0
  49. package/components/hy-count-down/typing.d.ts +20 -0
  50. package/components/hy-count-to/hy-count-to.vue +213 -0
  51. package/components/hy-count-to/index.scss +6 -0
  52. package/components/hy-count-to/props.ts +17 -0
  53. package/components/hy-count-to/typing.d.ts +48 -0
  54. package/components/hy-datetime-picker/hy-datetime-picker.vue +38 -64
  55. package/components/hy-datetime-picker/index.scss +28 -0
  56. package/components/hy-datetime-picker/props.ts +2 -2
  57. package/components/hy-datetime-picker/typing.d.ts +1 -1
  58. package/components/hy-divider/hy-divider.vue +24 -49
  59. package/components/hy-divider/index.scss +25 -0
  60. package/components/hy-divider/props.ts +2 -2
  61. package/components/hy-divider/typing.d.ts +1 -1
  62. package/components/hy-dropdown/hy-dropdown.vue +43 -0
  63. package/components/hy-dropdown/index.scss +17 -0
  64. package/components/hy-dropdown/props.ts +17 -0
  65. package/components/hy-dropdown/typing.d.ts +48 -0
  66. package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
  67. package/components/hy-dropdown-item/index.scss +96 -0
  68. package/components/hy-dropdown-item/props.ts +10 -0
  69. package/components/hy-dropdown-item/typing.d.ts +31 -0
  70. package/components/hy-empty/hy-empty.vue +8 -26
  71. package/components/hy-empty/index.scss +19 -0
  72. package/components/hy-empty/props.ts +2 -2
  73. package/components/hy-empty/typing.d.ts +1 -1
  74. package/components/hy-float-button/hy-float-button.vue +201 -0
  75. package/components/hy-float-button/index.scss +69 -0
  76. package/components/hy-float-button/props.ts +25 -0
  77. package/components/hy-float-button/typing.d.ts +93 -0
  78. package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
  79. package/components/hy-folding-panel/index.scss +6 -0
  80. package/components/hy-folding-panel/props.ts +2 -2
  81. package/components/hy-folding-panel/typing.d.ts +2 -2
  82. package/components/hy-form/hy-form.vue +22 -39
  83. package/components/hy-form/index.scss +30 -0
  84. package/components/hy-form/props.ts +4 -2
  85. package/components/hy-form/typing.d.ts +10 -2
  86. package/components/hy-grid/hy-grid.vue +4 -45
  87. package/components/hy-grid/index.scss +40 -0
  88. package/components/hy-grid/props.ts +5 -5
  89. package/components/hy-grid/typing.d.ts +2 -2
  90. package/components/hy-icon/hy-icon.vue +7 -97
  91. package/components/hy-icon/index.scss +84 -0
  92. package/components/hy-icon/props.ts +5 -5
  93. package/components/hy-image/hy-image.vue +212 -0
  94. package/components/hy-image/index.scss +26 -0
  95. package/components/hy-image/props.ts +24 -0
  96. package/components/hy-image/typing.d.ts +76 -0
  97. package/components/hy-input/hy-input.vue +11 -82
  98. package/components/hy-input/index.scss +65 -0
  99. package/components/hy-input/props.ts +2 -2
  100. package/components/hy-input/typing.d.ts +2 -2
  101. package/components/hy-line/hy-line.vue +4 -8
  102. package/components/hy-line/index.scss +5 -0
  103. package/components/hy-line/props.ts +3 -3
  104. package/components/hy-line/typing.d.ts +2 -2
  105. package/components/hy-line-progress/hy-line-progress.vue +15 -44
  106. package/components/hy-line-progress/index.scss +38 -0
  107. package/components/hy-line-progress/props.ts +2 -2
  108. package/components/hy-line-progress/typing.d.ts +1 -1
  109. package/components/hy-list/hy-list.vue +11 -41
  110. package/components/hy-list/index.scss +32 -0
  111. package/components/hy-list/props.ts +2 -2
  112. package/components/hy-loading/hy-loading.vue +95 -0
  113. package/components/hy-loading/index.scss +103 -0
  114. package/components/hy-loading/props.ts +17 -0
  115. package/components/hy-loading/typing.d.ts +52 -0
  116. package/components/hy-login/TheUserLogin.vue +16 -16
  117. package/components/hy-login/hy-login.vue +9 -9
  118. package/components/hy-login/props.ts +4 -4
  119. package/components/hy-modal/hy-modal.vue +11 -89
  120. package/components/hy-modal/index.scss +77 -0
  121. package/components/hy-modal/props.ts +2 -2
  122. package/components/hy-modal/typing.d.ts +1 -1
  123. package/components/hy-navbar/hy-navbar.vue +20 -92
  124. package/components/hy-navbar/index.scss +67 -0
  125. package/components/hy-navbar/props.ts +2 -2
  126. package/components/hy-navbar/typing.d.ts +1 -1
  127. package/components/hy-notice-bar/hy-column-notice.vue +11 -39
  128. package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
  129. package/components/hy-notice-bar/hy-row-notice.vue +5 -56
  130. package/components/hy-notice-bar/index.scss +93 -0
  131. package/components/hy-notice-bar/props.ts +4 -2
  132. package/components/hy-notice-bar/typing.d.ts +13 -3
  133. package/components/hy-number-step/hy-number-step.vue +55 -105
  134. package/components/hy-number-step/index.scss +71 -0
  135. package/components/hy-number-step/props.ts +2 -2
  136. package/components/hy-number-step/typing.d.ts +1 -1
  137. package/components/hy-overlay/hy-overlay.vue +5 -17
  138. package/components/hy-overlay/index.scss +9 -0
  139. package/components/hy-overlay/props.ts +2 -2
  140. package/components/hy-overlay/typing.d.ts +1 -1
  141. package/components/hy-picker/hy-picker.vue +21 -87
  142. package/components/hy-picker/index.scss +68 -0
  143. package/components/hy-picker/props.ts +3 -2
  144. package/components/hy-picker/typing.d.ts +5 -1
  145. package/components/hy-popup/hy-popup.vue +7 -80
  146. package/components/hy-popup/index.scss +60 -0
  147. package/components/hy-popup/props.ts +2 -2
  148. package/components/hy-popup/typing.d.ts +1 -1
  149. package/components/hy-price/hy-price.vue +5 -15
  150. package/components/hy-price/index.scss +11 -0
  151. package/components/hy-price/props.ts +2 -2
  152. package/components/hy-price/typing.d.ts +1 -1
  153. package/components/hy-qrcode/hy-qrcode.vue +15 -37
  154. package/components/hy-qrcode/index.scss +23 -0
  155. package/components/hy-qrcode/props.ts +2 -2
  156. package/components/hy-qrcode/typing.d.ts +2 -2
  157. package/components/hy-radio/hy-radio.vue +27 -113
  158. package/components/hy-radio/index.scss +93 -0
  159. package/components/hy-radio/props.ts +4 -4
  160. package/components/hy-radio/typing.d.ts +2 -2
  161. package/components/hy-rate/hy-rate.vue +33 -53
  162. package/components/hy-rate/index.scss +33 -0
  163. package/components/hy-rate/props.ts +4 -3
  164. package/components/hy-rate/typing.d.ts +1 -1
  165. package/components/hy-read-more/hy-read-more.vue +7 -30
  166. package/components/hy-read-more/index.scss +25 -0
  167. package/components/hy-read-more/props.ts +3 -3
  168. package/components/hy-read-more/typing.d.ts +1 -1
  169. package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
  170. package/components/hy-safe-bottom/index.scss +5 -0
  171. package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
  172. package/components/hy-scroll-list/index.scss +34 -0
  173. package/components/hy-scroll-list/props.ts +2 -2
  174. package/components/hy-scroll-list/typing.d.ts +1 -1
  175. package/components/hy-search/hy-search.vue +12 -94
  176. package/components/hy-search/index.scss +83 -0
  177. package/components/hy-search/props.ts +2 -2
  178. package/components/hy-search/typing.d.ts +1 -2
  179. package/components/hy-slider/hy-slider.vue +42 -119
  180. package/components/hy-slider/index.scss +77 -0
  181. package/components/hy-slider/props.ts +2 -2
  182. package/components/hy-status-bar/hy-status-bar.vue +41 -0
  183. package/components/hy-status-bar/index.scss +6 -0
  184. package/components/hy-status-bar/props.ts +8 -0
  185. package/components/hy-status-bar/typing.d.ts +12 -0
  186. package/components/hy-steps/hy-steps.vue +36 -163
  187. package/components/hy-steps/index.scss +131 -0
  188. package/components/hy-steps/props.ts +2 -2
  189. package/components/hy-steps/typing.d.ts +2 -2
  190. package/components/hy-subsection/hy-subsection.vue +62 -125
  191. package/components/hy-subsection/index.scss +82 -0
  192. package/components/hy-subsection/props.ts +7 -3
  193. package/components/hy-subsection/typing.d.ts +20 -8
  194. package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
  195. package/components/hy-swipe-action/index.scss +9 -0
  196. package/components/hy-swipe-action/index.wxs +235 -0
  197. package/components/hy-swipe-action/props.ts +16 -0
  198. package/components/hy-swipe-action/typing.d.ts +55 -0
  199. package/components/hy-swipe-action/wxs.js +15 -0
  200. package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
  201. package/components/hy-swiper/hy-swiper.vue +45 -65
  202. package/components/hy-swiper/index.scss +82 -0
  203. package/components/hy-swiper/props.ts +3 -3
  204. package/components/hy-swiper/typing.d.ts +7 -4
  205. package/components/hy-switch/hy-switch.vue +65 -68
  206. package/components/hy-switch/index.scss +46 -0
  207. package/components/hy-switch/props.ts +6 -3
  208. package/components/hy-switch/typing.d.ts +14 -1
  209. package/components/hy-tabs/hy-tabs.vue +22 -81
  210. package/components/hy-tabs/index.scss +63 -0
  211. package/components/hy-tabs/props.ts +5 -5
  212. package/components/hy-tabs/typing.d.ts +1 -1
  213. package/components/hy-tag/hy-tag.vue +15 -230
  214. package/components/hy-tag/index.scss +204 -0
  215. package/components/hy-tag/props.ts +2 -2
  216. package/components/hy-tag/typing.d.ts +2 -2
  217. package/components/hy-text/hy-text.vue +238 -0
  218. package/components/hy-text/index.scss +70 -0
  219. package/components/hy-text/index.ts +0 -0
  220. package/components/hy-text/props.ts +30 -0
  221. package/components/hy-text/typing.d.ts +98 -0
  222. package/components/hy-textarea/hy-textarea.vue +13 -51
  223. package/components/hy-textarea/index.scss +40 -0
  224. package/components/hy-textarea/props.ts +2 -2
  225. package/components/hy-textarea/typing.d.ts +1 -1
  226. package/components/hy-tooltip/hy-tooltip.vue +42 -95
  227. package/components/hy-tooltip/index.scss +64 -0
  228. package/components/hy-tooltip/props.ts +2 -2
  229. package/components/hy-tooltip/typing.d.ts +1 -1
  230. package/components/hy-transition/hy-transition.vue +17 -8
  231. package/components/hy-transition/props.ts +2 -2
  232. package/components/hy-transition/typing.d.ts +2 -14
  233. package/components/hy-upload/hy-upload.vue +37 -182
  234. package/components/hy-upload/index.scss +147 -0
  235. package/components/hy-upload/props.ts +2 -2
  236. package/components/hy-upload/typing.d.ts +11 -11
  237. package/components/hy-warn/hy-warn.vue +15 -123
  238. package/components/hy-warn/index.scss +109 -0
  239. package/components/hy-warn/props.ts +3 -3
  240. package/components/hy-warn/typing.d.ts +4 -3
  241. package/components/hy-waterfall/index.scss +82 -0
  242. package/components/index.ts +25 -1
  243. package/components/message/index.ts +54 -54
  244. package/config/color.ts +2 -1
  245. package/global/index.ts +6 -6
  246. package/global/register-properties.ts +2 -2
  247. package/index.scss +2 -0
  248. package/libs/css/common.scss +16 -0
  249. package/package.json +4 -4
  250. package/{libs/css → public/font}/iconfont.css +5 -5
  251. package/{libs/css → public/font}/iconfont.ttf +0 -0
  252. package/public/font/iconfont.woff +0 -0
  253. package/public/font/iconfont.woff2 +0 -0
  254. package/theme.scss +9 -7
  255. package/typing/index.ts +0 -1
  256. package/typing/modules/common.d.ts +66 -1
  257. package/typing/modules/form.ts +3 -3
  258. package/utils/calendar.js +1021 -0
  259. package/utils/colorGradient.ts +112 -0
  260. package/utils/index.ts +2 -0
  261. package/utils/inside.ts +80 -34
  262. package/utils/inspect.ts +66 -0
  263. package/utils/utils.ts +27 -19
  264. package/typing/modules/img.ts +0 -15
@@ -11,7 +11,7 @@
11
11
  :customStyle="{ marginRight: '3px' }"
12
12
  ></HyIcon>
13
13
  </slot>
14
- <text :class="textClass">
14
+ <text :class="textClass" :style="{ color: color }">
15
15
  <slot>
16
16
  {{ text }}
17
17
  </slot>
@@ -34,9 +34,9 @@
34
34
  </template>
35
35
 
36
36
  <script setup lang="ts">
37
- import { computed, CSSProperties, toRefs } from "vue";
37
+ import { computed, type CSSProperties, toRefs } from "vue";
38
38
  import defaultProps from "./props";
39
- import IProps from "./typing";
39
+ import type IProps from "./typing";
40
40
  import HyTransition from "../hy-transition/hy-transition.vue";
41
41
  import HyIcon from "../hy-icon/hy-icon.vue";
42
42
  import { IconConfig } from "../../config";
@@ -55,7 +55,8 @@ const {
55
55
  color,
56
56
  borderColor,
57
57
  iconColor,
58
- disabled
58
+ disabled,
59
+ customStyle,
59
60
  } = toRefs(props);
60
61
  const emit = defineEmits(["click", "close"]);
61
62
 
@@ -70,7 +71,7 @@ const tagClass = computed((): string[] => {
70
71
  const arr = [
71
72
  !plain.value && `hy-tag--${type.value}`,
72
73
  plain.value && `hy-tag--${type.value}--plain`,
73
- plain.value && plainFill.value && `hy-tag--${type.value}--plain--fill`
74
+ plain.value && plainFill.value && `hy-tag--${type.value}--plain--fill`,
74
75
  ].filter(Boolean);
75
76
  classes = classes.concat(arr as string[]);
76
77
  }
@@ -81,19 +82,16 @@ const tagClass = computed((): string[] => {
81
82
  * */
82
83
  const tagStyle = computed<CSSProperties>(() => {
83
84
  const style: CSSProperties = {
84
- marginRight: closable ? "10px" : 0,
85
- marginTop: closable ? "10px" : 0
85
+ marginRight: closable.value ? "10px" : 0,
86
+ marginTop: closable.value ? "10px" : 0,
86
87
  };
87
88
  if (bgColor.value) {
88
- style.backgroundColor = bgColor.value;
89
- }
90
- if (color.value) {
91
- style.color = color.value;
89
+ style.background = bgColor.value;
92
90
  }
93
91
  if (borderColor.value) {
94
92
  style.borderColor = borderColor.value;
95
93
  }
96
- return style;
94
+ return Object.assign(style, customStyle.value);
97
95
  });
98
96
 
99
97
  /**
@@ -104,7 +102,7 @@ const textClass = computed((): string[] => {
104
102
  `hy-tag__text`,
105
103
  `hy-tag__text--${type.value}`,
106
104
  plain.value && `hy-tag__text--${type.value}--plain`,
107
- `hy-tag__text--${size.value}`
105
+ `hy-tag__text--${size.value}`,
108
106
  ].filter(Boolean) as string[];
109
107
  });
110
108
 
@@ -131,8 +129,8 @@ const hyIconColor = computed(() => {
131
129
  return iconColor.value
132
130
  ? iconColor.value
133
131
  : plain.value
134
- ? type.value
135
- : "#ffffff";
132
+ ? type.value
133
+ : "#ffffff";
136
134
  });
137
135
 
138
136
  /**
@@ -150,225 +148,12 @@ const clickHandler = () => {
150
148
  if (!disabled.value) {
151
149
  emit("click", {
152
150
  value: text.value,
153
- name: name.value
151
+ name: name.value,
154
152
  });
155
153
  }
156
154
  };
157
155
  </script>
158
156
 
159
157
  <style lang="scss" scoped>
160
- @import "../../libs/css/mixin.scss";
161
- @import "../../theme.scss";
162
-
163
- .hy-tag {
164
- @include flex;
165
- align-items: center;
166
- border-style: solid;
167
-
168
- &__wrapper {
169
- position: relative;
170
- }
171
-
172
- /*禁用*/
173
- &--disabled {
174
- background-color: $hy-color-disable-bg;
175
- color: $hy-text-color-disable;
176
- border: 1px solid $hy-color-disable-icon;
177
- }
178
-
179
- &--circle {
180
- border-radius: 100px;
181
- }
182
-
183
- &--square {
184
- border-radius: 3px;
185
- }
186
-
187
- &__icon {
188
- margin-right: 4px;
189
- }
190
-
191
- &__text {
192
- &--small {
193
- font-size: $hy-font-size-sm;
194
- line-height: $hy-font-size-sm;
195
- }
196
-
197
- &--medium {
198
- font-size: $hy-font-size-base;
199
- line-height: $hy-font-size-base;
200
- }
201
-
202
- &--large {
203
- font-size: $hy-font-size-lg;
204
- line-height: $hy-font-size-lg;
205
- }
206
- }
207
-
208
- &--small {
209
- height: 22px;
210
- line-height: 22px;
211
- padding: 0 5px;
212
- }
213
-
214
- &--medium {
215
- height: 26px;
216
- line-height: 22px;
217
- padding: 0 10px;
218
- }
219
-
220
- &--large {
221
- height: 32px;
222
- line-height: 32px;
223
- padding: 0 15px;
224
- }
225
-
226
- &--primary {
227
- background-color: $hy-primary;
228
- border-width: 1px;
229
- border-color: $hy-primary;
230
- }
231
-
232
- &--primary--plain {
233
- border-width: 1px;
234
- border-color: $hy-primary;
235
- }
236
-
237
- &--primary--plain--fill {
238
- background-color: #ecf5ff;
239
- }
240
-
241
- &__text--primary {
242
- color: #ffffff;
243
- }
244
-
245
- &__text--primary--plain {
246
- color: $hy-primary;
247
- }
248
-
249
- &--error {
250
- background-color: $hy-error;
251
- border-width: 1px;
252
- border-color: $hy-error;
253
- }
254
-
255
- &--error--plain {
256
- border-width: 1px;
257
- border-color: $hy-error;
258
- }
259
-
260
- &--error--plain--fill {
261
- background-color: #fef0f0;
262
- }
263
-
264
- &__text--error {
265
- color: #ffffff;
266
- }
267
-
268
- &__text--error--plain {
269
- color: $hy-error;
270
- }
271
-
272
- &--warning {
273
- background-color: $hy-warning;
274
- border-width: 1px;
275
- border-color: $hy-warning;
276
- }
277
-
278
- &--warning--plain {
279
- border-width: 1px;
280
- border-color: $hy-warning;
281
- }
282
-
283
- &--warning--plain--fill {
284
- background-color: #fdf6ec;
285
- }
286
-
287
- &__text--warning {
288
- color: #ffffff;
289
- }
290
-
291
- &__text--warning--plain {
292
- color: $hy-warning;
293
- }
294
-
295
- &--success {
296
- background-color: $hy-success;
297
- border-width: 1px;
298
- border-color: $hy-success;
299
- }
300
-
301
- &--success--plain {
302
- border-width: 1px;
303
- border-color: $hy-success;
304
- }
305
-
306
- &--success--plain--fill {
307
- background-color: #f5fff0;
308
- }
309
-
310
- &__text--success {
311
- color: #ffffff;
312
- }
313
-
314
- &__text--success--plain {
315
- color: $hy-success;
316
- }
317
-
318
- &--info {
319
- background-color: $hy-info;
320
- border-width: 1px;
321
- border-color: $hy-info;
322
- }
323
-
324
- &--info--plain {
325
- border-width: 1px;
326
- border-color: $hy-info;
327
- }
328
-
329
- &--info--plain--fill {
330
- background-color: #f4f4f5;
331
- }
332
-
333
- &__text--info {
334
- color: #ffffff;
335
- }
336
-
337
- &__text--info--plain {
338
- color: $hy-info;
339
- }
340
-
341
- &__close {
342
- position: absolute;
343
- z-index: 999;
344
- top: 10px;
345
- right: 10px;
346
- border-radius: 100px;
347
- background-color: #c6c7cb;
348
- @include flex(row);
349
- align-items: center;
350
- justify-content: center;
351
- /* #ifndef APP-NVUE */
352
- transform: scale(0.6) translate(80%, -80%);
353
- /* #endif */
354
- /* #ifdef APP-NVUE */
355
- transform: scale(0.6) translate(50%, -50%);
356
- /* #endif */
357
-
358
- &--small {
359
- width: 18px;
360
- height: 18px;
361
- }
362
-
363
- &--medium {
364
- width: 22px;
365
- height: 22px;
366
- }
367
-
368
- &--large {
369
- width: 25px;
370
- height: 25px;
371
- }
372
- }
373
- }
158
+ @import "./index.scss";
374
159
  </style>
@@ -0,0 +1,204 @@
1
+ @use "../../theme.scss" as *;
2
+ @use "../../libs/css/mixin.scss" as *;
3
+
4
+ .hy-tag {
5
+ @include flex;
6
+ align-items: center;
7
+ border-style: solid;
8
+
9
+ &__wrapper {
10
+ position: relative;
11
+ }
12
+
13
+ /*禁用*/
14
+ &--disabled {
15
+ background-color: $hy-color-disable-bg;
16
+ color: $hy-text-color-disable;
17
+ border: 1px solid $hy-color-disable-icon;
18
+ }
19
+
20
+ &--circle {
21
+ border-radius: $hy-border-radius-semicircle;
22
+ }
23
+
24
+ &--square {
25
+ border-radius: $hy-border-radius-sm;
26
+ }
27
+
28
+ &__icon {
29
+ margin-right: $hy-border-margin-padding-sm;
30
+ }
31
+
32
+ &__text {
33
+ &--small {
34
+ font-size: $hy-font-size-sm;
35
+ line-height: $hy-font-size-sm;
36
+ }
37
+
38
+ &--medium {
39
+ font-size: $hy-font-size-base;
40
+ line-height: $hy-font-size-base;
41
+ }
42
+
43
+ &--large {
44
+ font-size: $hy-font-size-lg;
45
+ line-height: $hy-font-size-lg;
46
+ }
47
+ }
48
+
49
+ &--small {
50
+ height: 22px;
51
+ line-height: 22px;
52
+ padding: 0 $hy-border-margin-padding-sm;
53
+ }
54
+
55
+ &--medium {
56
+ height: 26px;
57
+ line-height: 22px;
58
+ padding: 0 $hy-border-margin-padding-base;
59
+ }
60
+
61
+ &--large {
62
+ height: 32px;
63
+ line-height: 32px;
64
+ padding: 0 15px;
65
+ }
66
+
67
+ &--primary {
68
+ background-color: $hy-primary;
69
+ border: 1px solid $hy-primary;
70
+ }
71
+
72
+ &--primary--plain {
73
+ border: 1px solid $hy-primary;
74
+ }
75
+
76
+ &--primary--plain--fill {
77
+ background-color: $hy-primary-light;
78
+ }
79
+
80
+ &__text--primary {
81
+ color: #ffffff;
82
+ }
83
+
84
+ &__text--primary--plain {
85
+ color: $hy-primary;
86
+ }
87
+
88
+ &--error {
89
+ background-color: $hy-error;
90
+ border: 1px solid $hy-error;
91
+ }
92
+
93
+ &--error--plain {
94
+ border: 1px solid $hy-error;
95
+ }
96
+
97
+ &--error--plain--fill {
98
+ background-color: $hy-error-light;
99
+ }
100
+
101
+ &__text--error {
102
+ color: #ffffff;
103
+ }
104
+
105
+ &__text--error--plain {
106
+ color: $hy-error;
107
+ }
108
+
109
+ &--warning {
110
+ background-color: $hy-warning;
111
+ border: 1px solid $hy-warning;
112
+ }
113
+
114
+ &--warning--plain {
115
+ border: 1px solid $hy-warning;
116
+ }
117
+
118
+ &--warning--plain--fill {
119
+ background-color: $hy-warning-light;
120
+ }
121
+
122
+ &__text--warning {
123
+ color: #ffffff;
124
+ }
125
+
126
+ &__text--warning--plain {
127
+ color: $hy-warning;
128
+ }
129
+
130
+ &--success {
131
+ background-color: $hy-success;
132
+ border: 1px solid $hy-success;
133
+ }
134
+
135
+ &--success--plain {
136
+ border: 1px solid $hy-success;
137
+ }
138
+
139
+ &--success--plain--fill {
140
+ background-color: $hy-success-light;
141
+ }
142
+
143
+ &__text--success {
144
+ color: #ffffff;
145
+ }
146
+
147
+ &__text--success--plain {
148
+ color: $hy-success;
149
+ }
150
+
151
+ &--info {
152
+ background-color: $hy-info;
153
+ border: 1px solid $hy-info;
154
+ }
155
+
156
+ &--info--plain {
157
+ border: 1px solid $hy-info;
158
+ }
159
+
160
+ &--info--plain--fill {
161
+ background-color: $hy-info-light;
162
+ }
163
+
164
+ &__text--info {
165
+ color: #ffffff;
166
+ }
167
+
168
+ &__text--info--plain {
169
+ color: $hy-info;
170
+ }
171
+
172
+ &__close {
173
+ position: absolute;
174
+ z-index: 999;
175
+ top: 10px;
176
+ right: 10px;
177
+ border-radius: $hy-border-radius-semicircle;
178
+ background-color: #c6c7cb;
179
+ @include flex(row);
180
+ align-items: center;
181
+ justify-content: center;
182
+ /* #ifndef APP-NVUE */
183
+ transform: scale(0.6) translate(80%, -80%);
184
+ /* #endif */
185
+ /* #ifdef APP-NVUE */
186
+ transform: scale(0.6) translate(50%, -50%);
187
+ /* #endif */
188
+
189
+ &--small {
190
+ width: 18px;
191
+ height: 18px;
192
+ }
193
+
194
+ &--medium {
195
+ width: 22px;
196
+ height: 22px;
197
+ }
198
+
199
+ &--large {
200
+ width: 25px;
201
+ height: 25px;
202
+ }
203
+ }
204
+ }
@@ -1,4 +1,4 @@
1
- import IProps from "./typing";
1
+ import type IProps from "./typing";
2
2
 
3
3
  const defaultProps: IProps = {
4
4
  text: "",
@@ -16,7 +16,7 @@ const defaultProps: IProps = {
16
16
  closable: false,
17
17
  show: true,
18
18
  icon: "",
19
- iconColor: ""
19
+ iconColor: "",
20
20
  };
21
21
 
22
22
  export default defaultProps;
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from "vue";
1
+ import type { CSSProperties } from "vue";
2
2
 
3
3
  export default interface IProps {
4
4
  /**
@@ -8,7 +8,7 @@ export default interface IProps {
8
8
  /**
9
9
  * @description 点击需要传得值
10
10
  * */
11
- name: string | number;
11
+ name?: string | number;
12
12
  /**
13
13
  * @description 标签类型info、primary、success、warning、error (默认 'primary' )
14
14
  * */