hy-app 0.1.5 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +2 -1
  2. package/components/hy-address-picker/hy-address-picker.vue +11 -0
  3. package/components/hy-address-picker/index.scss +1 -1
  4. package/components/hy-avatar/hy-avatar.vue +11 -0
  5. package/components/hy-avatar/index.scss +8 -8
  6. package/components/hy-back-top/hy-back-top.vue +13 -2
  7. package/components/hy-back-top/index.scss +3 -2
  8. package/components/hy-badge/hy-badge.vue +11 -0
  9. package/components/hy-badge/index.scss +18 -40
  10. package/components/hy-button/hy-button.vue +17 -8
  11. package/components/hy-button/index.scss +20 -51
  12. package/components/hy-calendar/header.vue +12 -12
  13. package/components/hy-calendar/hy-calendar.vue +11 -2
  14. package/components/hy-calendar/index.scss +137 -131
  15. package/components/hy-calendar/month.vue +44 -22
  16. package/components/hy-calendar/props.ts +1 -1
  17. package/components/hy-card/hy-card.vue +11 -0
  18. package/components/hy-card/index.scss +5 -14
  19. package/components/hy-card/props.ts +2 -2
  20. package/components/hy-cell/hy-cell.vue +22 -13
  21. package/components/hy-cell/index.scss +45 -31
  22. package/components/hy-cell/props.ts +2 -3
  23. package/components/hy-cell/typing.d.ts +3 -10
  24. package/components/hy-check-button/hy-check-button.vue +13 -2
  25. package/components/hy-check-button/index.scss +0 -5
  26. package/components/hy-checkbox/hy-checkbox.vue +35 -9
  27. package/components/hy-checkbox/index.scss +19 -12
  28. package/components/hy-checkbox/props.ts +1 -2
  29. package/components/hy-checkbox/typing.d.ts +1 -1
  30. package/components/hy-config-provider/hy-config-provider.vue +54 -0
  31. package/components/hy-config-provider/index.scss +17 -0
  32. package/components/hy-config-provider/props.ts +13 -0
  33. package/components/hy-config-provider/typing.d.ts +28 -0
  34. package/components/hy-count-down/hy-count-down.vue +11 -0
  35. package/components/hy-count-down/index.scss +4 -1
  36. package/components/hy-count-to/hy-count-to.vue +12 -1
  37. package/components/hy-count-to/index.scss +6 -1
  38. package/components/hy-count-to/props.ts +1 -1
  39. package/components/hy-datetime-picker/hy-datetime-picker.vue +11 -0
  40. package/components/hy-datetime-picker/index.scss +1 -1
  41. package/components/hy-divider/hy-divider.vue +11 -0
  42. package/components/hy-divider/index.scss +3 -2
  43. package/components/hy-divider/props.ts +2 -2
  44. package/components/hy-dropdown/hy-dropdown.vue +13 -1
  45. package/components/hy-dropdown/index.scss +5 -2
  46. package/components/hy-dropdown/props.ts +2 -2
  47. package/components/hy-dropdown-item/hy-dropdown-item.vue +21 -3
  48. package/components/hy-dropdown-item/index.scss +22 -4
  49. package/components/hy-empty/hy-empty.vue +22 -10
  50. package/components/hy-empty/index.scss +8 -3
  51. package/components/hy-empty/props.ts +1 -5
  52. package/components/hy-empty/typing.d.ts +3 -18
  53. package/components/hy-float-button/hy-float-button.vue +11 -0
  54. package/components/hy-float-button/index.scss +8 -2
  55. package/components/hy-float-button/props.ts +3 -3
  56. package/components/hy-folding-panel/hy-folding-panel.vue +11 -0
  57. package/components/hy-folding-panel/index.scss +4 -1
  58. package/components/hy-form/hy-form.vue +25 -9
  59. package/components/hy-form/index.scss +5 -2
  60. package/components/hy-grid/hy-grid.vue +11 -0
  61. package/components/hy-grid/index.scss +2 -2
  62. package/components/hy-icon/hy-icon.vue +12 -1
  63. package/components/hy-icon/index.scss +10 -7
  64. package/components/hy-icon/props.ts +2 -2
  65. package/components/hy-image/hy-image.vue +12 -1
  66. package/components/hy-image/index.scss +4 -3
  67. package/components/hy-image/props.ts +1 -1
  68. package/components/hy-input/hy-input.vue +36 -13
  69. package/components/hy-input/index.scss +11 -3
  70. package/components/hy-input/props.ts +2 -2
  71. package/components/hy-input/typing.d.ts +8 -0
  72. package/components/hy-line/hy-line.vue +11 -0
  73. package/components/hy-line/index.scss +5 -1
  74. package/components/hy-line/props.ts +1 -1
  75. package/components/hy-line-progress/hy-line-progress.vue +17 -2
  76. package/components/hy-line-progress/index.scss +9 -8
  77. package/components/hy-line-progress/props.ts +4 -4
  78. package/components/hy-line-progress/typing.d.ts +4 -0
  79. package/components/hy-list/hy-list.vue +23 -8
  80. package/components/hy-list/index.scss +1 -4
  81. package/components/hy-loading/hy-loading.vue +11 -0
  82. package/components/hy-loading/index.scss +4 -4
  83. package/components/hy-login/TheUserLogin.vue +63 -106
  84. package/components/hy-login/hy-login.vue +269 -266
  85. package/components/hy-login/props.ts +1 -1
  86. package/components/hy-login/typing.d.ts +5 -0
  87. package/components/hy-modal/hy-modal.vue +18 -7
  88. package/components/hy-modal/index.scss +13 -9
  89. package/components/hy-modal/props.ts +3 -3
  90. package/components/hy-navbar/hy-navbar.vue +11 -0
  91. package/components/hy-navbar/index.scss +5 -5
  92. package/components/hy-navbar/props.ts +1 -1
  93. package/components/hy-notice-bar/hy-notice-bar.vue +11 -0
  94. package/components/hy-notice-bar/index.scss +27 -37
  95. package/components/hy-notice-bar/props.ts +2 -2
  96. package/components/hy-number-step/hy-number-step.vue +15 -8
  97. package/components/hy-number-step/index.scss +16 -25
  98. package/components/hy-number-step/props.ts +4 -4
  99. package/components/hy-overlay/index.scss +3 -1
  100. package/components/hy-picker/hy-picker.vue +12 -0
  101. package/components/hy-picker/index.scss +8 -4
  102. package/components/hy-picker/props.ts +1 -1
  103. package/components/hy-popup/hy-popup.vue +11 -0
  104. package/components/hy-popup/index.scss +2 -2
  105. package/components/hy-price/hy-price.vue +11 -0
  106. package/components/hy-price/index.scss +4 -7
  107. package/components/hy-qrcode/hy-qrcode.vue +11 -0
  108. package/components/hy-qrcode/index.scss +5 -2
  109. package/components/hy-radio/hy-radio.vue +23 -4
  110. package/components/hy-radio/index.scss +21 -11
  111. package/components/hy-radio/props.ts +1 -2
  112. package/components/hy-rate/hy-rate.vue +11 -0
  113. package/components/hy-rate/index.scss +1 -6
  114. package/components/hy-read-more/hy-read-more.vue +23 -2
  115. package/components/hy-read-more/index.scss +12 -2
  116. package/components/hy-read-more/props.ts +2 -7
  117. package/components/hy-scroll-list/hy-scroll-list.vue +31 -9
  118. package/components/hy-scroll-list/index.scss +10 -1
  119. package/components/hy-scroll-list/props.ts +2 -2
  120. package/components/hy-search/hy-search.vue +11 -0
  121. package/components/hy-search/index.scss +6 -4
  122. package/components/hy-search/props.ts +2 -2
  123. package/components/hy-slider/hy-slider.vue +11 -0
  124. package/components/hy-slider/index.scss +4 -3
  125. package/components/hy-slider/props.ts +3 -3
  126. package/components/hy-steps/hy-steps.vue +55 -19
  127. package/components/hy-steps/index.scss +50 -21
  128. package/components/hy-steps/props.ts +2 -2
  129. package/components/{hy-submitBar/hy-submitBar.vue → hy-submit-bar/hy-submit-bar.vue} +13 -34
  130. package/components/hy-submit-bar/index.scss +37 -0
  131. package/components/hy-subsection/hy-subsection.vue +12 -0
  132. package/components/hy-subsection/index.scss +16 -10
  133. package/components/hy-subsection/props.ts +3 -3
  134. package/components/hy-swipe-action/index.scss +0 -9
  135. package/components/hy-swiper/hy-swiper.vue +11 -0
  136. package/components/hy-swiper/index.scss +3 -2
  137. package/components/hy-switch/hy-switch.vue +17 -3
  138. package/components/hy-switch/index.scss +28 -9
  139. package/components/hy-switch/props.ts +1 -3
  140. package/components/hy-switch/typing.d.ts +3 -3
  141. package/components/hy-tabs/hy-tabs.vue +27 -15
  142. package/components/hy-tabs/index.scss +11 -4
  143. package/components/hy-tabs/props.ts +4 -10
  144. package/components/hy-tag/hy-tag.vue +13 -7
  145. package/components/hy-tag/index.scss +27 -115
  146. package/components/hy-text/hy-text.vue +13 -1
  147. package/components/hy-text/index.scss +13 -42
  148. package/components/hy-textarea/hy-textarea.vue +16 -5
  149. package/components/hy-textarea/index.scss +7 -7
  150. package/components/hy-toast/hy-toast.vue +12 -1
  151. package/components/hy-toast/index.scss +10 -27
  152. package/components/hy-tooltip/hy-tooltip.vue +11 -0
  153. package/components/hy-tooltip/index.scss +7 -5
  154. package/components/hy-tooltip/props.ts +1 -1
  155. package/components/hy-upload/hy-upload.vue +11 -0
  156. package/components/hy-upload/index.scss +6 -5
  157. package/components/hy-warn/hy-warn.vue +22 -11
  158. package/components/hy-warn/index.scss +46 -1
  159. package/components/hy-waterfall/hy-waterfall.vue +11 -0
  160. package/components/hy-waterfall/index.scss +1 -1
  161. package/config/icon.ts +4 -0
  162. package/index.scss +1 -0
  163. package/libs/css/common.scss +9 -0
  164. package/libs/css/mixin.scss +84 -0
  165. package/libs/css/vars.css +47 -0
  166. package/package.json +2 -2
  167. package/public/font/iconfont.css +3 -3
  168. package/store/userInfo.ts +26 -25
  169. package/theme.scss +87 -60
  170. package/typing/modules/common.d.ts +4 -0
  171. package/utils/colorGradient.ts +1 -1
  172. package/utils/inside.ts +3 -0
  173. package/components/hy-submitBar/Index.vue +0 -17
  174. package/components/hy-submitBar/index.scss +0 -9
  175. /package/components/{hy-submitBar → hy-submit-bar}/props.ts +0 -0
  176. /package/components/{hy-submitBar → hy-submit-bar}/typing.d.ts +0 -0
package/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ## 使用文档地址
2
- [华玥组件库](https://hy-component-docs.vercel.app/)
2
+ [华玥组件库(需要翻墙)](https://hy-component-docs.vercel.app/)
3
+ [华玥组件库(国内地址)](https://www.gxh151.top)
3
4
 
4
5
  ## 安装教程
5
6
 
@@ -62,6 +62,17 @@
62
62
  </view>
63
63
  </template>
64
64
 
65
+ <script lang="ts">
66
+ export default {
67
+ name: 'hy-address-picker',
68
+ options: {
69
+ addGlobalClass: true,
70
+ virtualHost: true,
71
+ styleIsolation: 'shared'
72
+ }
73
+ }
74
+ </script>
75
+
65
76
  <script setup lang="ts">
66
77
  import { onMounted, ref, toRefs } from "vue";
67
78
  import defaultProps from "./props";
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
- .hy-datetime-picker {
2
+ @include b(datetime-picker) {
3
3
  flex: 1;
4
4
  &__has-input {
5
5
  position: relative;
@@ -49,6 +49,17 @@
49
49
  </view>
50
50
  </template>
51
51
 
52
+ <script lang="ts">
53
+ export default {
54
+ name: 'hy-avatar',
55
+ options: {
56
+ addGlobalClass: true,
57
+ virtualHost: true,
58
+ styleIsolation: 'shared'
59
+ }
60
+ }
61
+ </script>
62
+
52
63
  <script setup lang="ts">
53
64
  import { computed, type CSSProperties, toRefs, ref, watch } from "vue";
54
65
  import defaultProps from "./props";
@@ -1,30 +1,30 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- .hy-avatar {
4
+ @include b(avatar) {
5
5
  @include flex;
6
6
  align-items: center;
7
7
  justify-content: center;
8
8
 
9
- &--circle {
9
+ @include m(circle) {
10
10
  border-radius: $hy-border-radius-circle;
11
11
  }
12
12
 
13
- &--square {
13
+ @include m(square) {
14
14
  border-radius: $hy-border-margin-padding-sm;
15
15
  }
16
16
 
17
- &--small {
17
+ @include m(small) {
18
18
  width: $hy-avatar-size-sm;
19
19
  height: $hy-avatar-size-sm;
20
20
  }
21
21
 
22
- &--medium {
22
+ @include m(medium) {
23
23
  width: $hy-avatar-size-base;
24
24
  height: $hy-avatar-size-base;
25
25
  }
26
26
 
27
- &--large {
27
+ @include m(large) {
28
28
  width: $hy-avatar-size-lg;
29
29
  height: $hy-avatar-size-lg;
30
30
  }
@@ -33,12 +33,12 @@
33
33
  width: 100%;
34
34
  height: 100%;
35
35
 
36
- &--circle {
36
+ @include m(circle) {
37
37
  border-radius: $hy-border-radius-circle;
38
38
  overflow: hidden;
39
39
  }
40
40
 
41
- &--square {
41
+ @include m(square) {
42
42
  border-radius: $hy-border-margin-padding-sm;
43
43
  }
44
44
  }
@@ -22,15 +22,26 @@
22
22
  </HyTransition>
23
23
  </template>
24
24
 
25
+ <script lang="ts">
26
+ export default {
27
+ name: 'hy-back-top',
28
+ options: {
29
+ addGlobalClass: true,
30
+ virtualHost: true,
31
+ styleIsolation: 'shared'
32
+ }
33
+ }
34
+ </script>
35
+
25
36
  <script setup lang="ts">
26
37
  import { computed, type CSSProperties, toRefs } from "vue";
27
38
  import defaultProps from "./props";
39
+ import { addUnit, getPx } from "../../utils";
40
+ import { IconConfig } from "@/package";
28
41
  import type IProps from "./typing";
29
42
  // 组件
30
43
  import HyTransition from "../hy-transition/hy-transition.vue";
31
44
  import HyIcon from "../hy-icon/hy-icon.vue";
32
- import { addUnit, getPx } from "../../utils";
33
- import { IconConfig } from "@/package";
34
45
 
35
46
  const props = withDefaults(defineProps<IProps>(), defaultProps);
36
47
  const { customStyle, duration, mode, bottom, right, top, scrollTop } =
@@ -1,13 +1,14 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../theme.scss" as *;
2
3
 
3
- .hy-back-top {
4
+ @include b(back-top) {
4
5
  @include flex;
5
6
  flex-direction: column;
6
7
  align-items: center;
7
8
  flex: 1;
8
9
  height: 100%;
9
10
  justify-content: center;
10
- background-color: #e1e1e1;
11
+ background-color: $hy-background--3;
11
12
 
12
13
  &__tips {
13
14
  font-size: 12px;
@@ -13,6 +13,17 @@
13
13
  >
14
14
  </template>
15
15
 
16
+ <script lang="ts">
17
+ export default {
18
+ name: 'hy-badge',
19
+ options: {
20
+ addGlobalClass: true,
21
+ virtualHost: true,
22
+ styleIsolation: 'shared'
23
+ }
24
+ }
25
+ </script>
26
+
16
27
  <script setup lang="ts">
17
28
  import type IProps from "./typing";
18
29
  import defaultProps from "./props";
@@ -4,69 +4,47 @@
4
4
  $hy-badge-dot-size: 8px !default;
5
5
  $hy-badge-text-font-size: 11px !default;
6
6
 
7
- .hy-badge {
7
+
8
+
9
+ @include b(badge) {
8
10
  border-radius: 100px;
9
11
  @include flex;
10
12
  line-height: $hy-badge-text-font-size;
11
13
  text-align: center;
12
14
  font-size: $hy-badge-text-font-size;
13
- color: $hy-text-color-inverse;
14
15
  z-index: 999;
15
16
 
16
- &--dot {
17
+ @include m(dot) {
17
18
  height: $hy-badge-dot-size;
18
19
  width: $hy-badge-dot-size;
19
20
  }
20
21
 
21
- &--inverted {
22
+ @include m(inverted) {
22
23
  font-size: 13px;
23
24
  }
24
25
 
25
- &--not-dot {
26
+ @include m(not-dot) {
26
27
  padding: 2px 5px;
27
28
  }
28
29
 
29
- &--horn {
30
+ @include m(horn) {
30
31
  border-bottom-left-radius: 0;
31
32
  }
32
33
 
33
- &--primary {
34
- background-color: $hy-primary;
35
- }
36
-
37
- &--primary--inverted {
38
- color: $hy-primary;
39
- }
40
-
41
- &--error {
42
- background-color: $hy-error;
43
- }
44
-
45
- &--error--inverted {
46
- color: $hy-error;
47
- }
48
-
49
- &--success {
50
- background-color: $hy-success;
51
- }
34
+ /* 主题色 */
35
+ @include themeColor(primary, $hy-primary);
36
+ @include themeColor(primary--inverted, "", transparent, $hy-primary);
52
37
 
53
- &--success--inverted {
54
- color: $hy-success;
55
- }
38
+ @include themeColor(error, $hy-error);
39
+ @include themeColor(error--inverted, "", transparent, $hy-error);
56
40
 
57
- &--info {
58
- background-color: $hy-info;
59
- }
41
+ @include themeColor(success, $hy-success);
42
+ @include themeColor(success--inverted, "", transparent, $hy-success);
60
43
 
61
- &--info--inverted {
62
- color: $hy-info;
63
- }
44
+ @include themeColor(warning, $hy-warning);
45
+ @include themeColor(warning--inverted, "", transparent, $hy-warning);
64
46
 
65
- &--warning {
66
- background-color: $hy-warning;
67
- }
47
+ @include themeColor(info, $hy-info);
48
+ @include themeColor(info--inverted, "", transparent, $hy-info);
68
49
 
69
- &--warning--inverted {
70
- color: $hy-warning;
71
- }
72
50
  }
@@ -21,10 +21,9 @@
21
21
  @launchapp="launchapp"
22
22
  @agreeprivacyauthorization="agreeprivacyauthorization"
23
23
  :hover-class="!disabled && !loading ? 'hy-button--active' : ''"
24
- class="hy-button hy-reset-button"
25
24
  :style="[baseColor, customStyle]"
26
25
  @tap="clickHandler"
27
- :class="bemClass"
26
+ :class="['hy-button', 'hy-reset-button', bemClass]"
28
27
  >
29
28
  <template v-if="loading">
30
29
  <HyLoading
@@ -126,6 +125,17 @@
126
125
  <!-- #endif -->
127
126
  </template>
128
127
 
128
+ <script lang="ts">
129
+ export default {
130
+ name: "hy-button",
131
+ options: {
132
+ addGlobalClass: true,
133
+ virtualHost: true,
134
+ styleIsolation: "shared",
135
+ },
136
+ };
137
+ </script>
138
+
129
139
  <script setup lang="ts">
130
140
  import { computed, type CSSProperties, toRefs } from "vue";
131
141
  import { bem, throttle } from "../../utils";
@@ -187,7 +197,7 @@ const bemClass = computed(() => {
187
197
  const loadingColor = computed(() => {
188
198
  if (plain.value) {
189
199
  // 如果有设置color值,则用color值,否则使用type主题颜色
190
- return color.value ? color.value : textColor;
200
+ return color.value ? color.value : "";
191
201
  }
192
202
  if (type.value === "info") {
193
203
  return "#c9c9c9";
@@ -197,12 +207,11 @@ const loadingColor = computed(() => {
197
207
 
198
208
  const iconColorCom = computed((): string => {
199
209
  // 如果是镂空状态,设置了color就用color值,否则使用主题颜色,
200
- // u-icon的color能接受一个主题颜色的值
201
210
  if (icon.value?.color) return icon.value?.color;
202
211
  if (plain.value) {
203
- return color.value ? color.value : textColor;
212
+ return color.value ? color.value : "";
204
213
  } else {
205
- return type.value === "info" ? "#000000" : "#ffffff";
214
+ return (type.value = "#ffffff");
206
215
  }
207
216
  });
208
217
  const baseColor = computed((): CSSProperties => {
@@ -212,7 +221,7 @@ const baseColor = computed((): CSSProperties => {
212
221
  style.color = plain.value ? color.value : "white";
213
222
  if (!plain.value) {
214
223
  // 非镂空,背景色使用自定义的颜色
215
- style["background-color"] = color.value;
224
+ style["background"] = color.value;
216
225
  }
217
226
  if (color.value.indexOf("gradient") !== -1) {
218
227
  // 如果自定义的颜色为渐变色,不显示边框,以及通过backgroundImage设置渐变色
@@ -233,7 +242,7 @@ const baseColor = computed((): CSSProperties => {
233
242
  }
234
243
  } else {
235
244
  // 针对自定义了color颜色的情况,镂空状态下,就是用自定义的颜色
236
- style.color = plain.value ? textColor : "";
245
+ // style.color = plain.value ? textColor : "";
237
246
  }
238
247
  return style;
239
248
  });
@@ -1,7 +1,7 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
2
  @use "../../theme.scss" as *;
3
3
 
4
- .hy-button {
4
+ @include b(button){
5
5
  height: 40px;
6
6
  position: relative;
7
7
  align-items: center;
@@ -21,7 +21,7 @@
21
21
  margin-left: 4px;
22
22
  }
23
23
 
24
- &--large {
24
+ @include m(large) {
25
25
  /* #ifndef APP-NVUE */
26
26
  width: 100%;
27
27
  /* #endif */
@@ -29,12 +29,12 @@
29
29
  padding: 0 15px;
30
30
  }
31
31
 
32
- &--medium {
32
+ @include m(medium) {
33
33
  padding: 0 12px;
34
34
  font-size: 14px;
35
35
  }
36
36
 
37
- &--small {
37
+ @include m(small) {
38
38
  /* #ifndef APP-NVUE */
39
39
  min-width: 60px;
40
40
  /* #endif */
@@ -43,7 +43,7 @@
43
43
  font-size: 12px;
44
44
  }
45
45
 
46
- &--mini {
46
+ @include m(mini) {
47
47
  height: 22px;
48
48
  font-size: 10px;
49
49
  /* #ifndef APP-NVUE */
@@ -52,65 +52,34 @@
52
52
  padding: 0 8px;
53
53
  }
54
54
 
55
- &--disabled {
55
+ @include m(disabled) {
56
56
  opacity: 0.5;
57
57
  }
58
58
 
59
- &--info {
60
- color: #323233;
61
- background-color: #fff;
62
- border: 1px solid #909399;
63
- }
64
-
65
- &--success {
66
- color: #fff;
67
- background-color: $hy-success;
68
- border: 1px solid $hy-success;
69
- }
59
+ @include themeColor(info, $hy-info, $hy-info);
60
+ @include themeColor(success, $hy-success, $hy-success);
61
+ @include themeColor(primary, $hy-primary, $hy-primary);
62
+ @include themeColor(error, $hy-error, $hy-error);
63
+ @include themeColor(warning, $hy-warning, $hy-warning);
70
64
 
71
- &--primary {
72
- color: #fff;
73
- background-color: $hy-primary;
74
- border: 1px solid $hy-primary;
75
- }
65
+ @include themeColor(info__plain, transparent, $hy-info, $hy-info);
66
+ @include themeColor(success__plain, transparent, $hy-success, $hy-success);
67
+ @include themeColor(primary__plain, transparent, $hy-primary, $hy-primary);
68
+ @include themeColor(error__plain, transparent, $hy-error, $hy-error);
69
+ @include themeColor(warning__plain, transparent, $hy-warning, $hy-warning);
76
70
 
77
- &--error {
78
- color: #fff;
79
- background-color: $hy-error;
80
- border: 1px solid $hy-error;
81
- }
82
71
 
83
- &--warning {
84
- color: #fff;
85
- background-color: $hy-warning;
86
- border: 1px solid $hy-warning;
87
- }
88
72
 
89
- &--block {
73
+ @include m(block) {
90
74
  @include flex;
91
75
  width: 100%;
92
76
  }
93
77
 
94
- &--circle {
95
- border-radius: 100px;
96
- }
97
-
98
- &--square {
99
- border-radius: 3px;
100
- }
78
+ @include borderRadio(circle);
79
+ @include borderRadio(square);
101
80
 
102
- &__icon {
103
- min-width: 1em;
104
- line-height: inherit !important;
105
- vertical-align: top;
106
- }
107
-
108
- &--plain {
109
- color: v-bind(textColor);
110
- background-color: #fff;
111
- }
112
81
 
113
- &--hairline {
82
+ @include m(hairline) {
114
83
  border-width: 0.5px;
115
84
  }
116
85
  }
@@ -1,29 +1,29 @@
1
1
  <template>
2
- <view class="u-calendar-header u-border-bottom">
3
- <text class="u-calendar-header__title" v-if="showTitle">{{ title }}</text>
4
- <text class="u-calendar-header__subtitle" v-if="showSubtitle">{{
2
+ <view class="hy-calendar-header hy-border-bottom">
3
+ <text class="hy-calendar-header__title" v-if="showTitle">{{ title }}</text>
4
+ <text class="hy-calendar-header__subtitle" v-if="showSubtitle">{{
5
5
  subtitle
6
6
  }}</text>
7
- <view class="u-calendar-header__weekdays">
8
- <text class="u-calendar-header__weekdays__weekday">{{
7
+ <view class="hy-calendar-header__weekdays">
8
+ <text class="hy-calendar-header__weekdays__weekday">{{
9
9
  weekText[0]
10
10
  }}</text>
11
- <text class="u-calendar-header__weekdays__weekday">{{
11
+ <text class="hy-calendar-header__weekdays__weekday">{{
12
12
  weekText[1]
13
13
  }}</text>
14
- <text class="u-calendar-header__weekdays__weekday">{{
14
+ <text class="hy-calendar-header__weekdays__weekday">{{
15
15
  weekText[2]
16
16
  }}</text>
17
- <text class="u-calendar-header__weekdays__weekday">{{
17
+ <text class="hy-calendar-header__weekdays__weekday">{{
18
18
  weekText[3]
19
19
  }}</text>
20
- <text class="u-calendar-header__weekdays__weekday">{{
20
+ <text class="hy-calendar-header__weekdays__weekday">{{
21
21
  weekText[4]
22
22
  }}</text>
23
- <text class="u-calendar-header__weekdays__weekday">{{
23
+ <text class="hy-calendar-header__weekdays__weekday">{{
24
24
  weekText[5]
25
25
  }}</text>
26
- <text class="u-calendar-header__weekdays__weekday">{{
26
+ <text class="hy-calendar-header__weekdays__weekday">{{
27
27
  weekText[6]
28
28
  }}</text>
29
29
  </view>
@@ -32,7 +32,7 @@
32
32
 
33
33
  <script>
34
34
  export default {
35
- name: "u-calendar-header",
35
+ name: "hy-calendar-header",
36
36
  props: {
37
37
  // 标题
38
38
  title: {
@@ -7,7 +7,7 @@
7
7
  :round="round"
8
8
  :closeOnClickOverlay="closeOnClickOverlay"
9
9
  >
10
- <view class="u-calendar">
10
+ <view class="hy-calendar">
11
11
  <HyHeader
12
12
  :title="title"
13
13
  :subtitle="subtitle"
@@ -50,7 +50,7 @@
50
50
  ></HyMount>
51
51
  </scroll-view>
52
52
  <slot name="footer" v-if="showConfirm">
53
- <view class="u-calendar__confirm">
53
+ <view class="hy-calendar__confirm">
54
54
  <HyButton
55
55
  shape="circle"
56
56
  :text="buttonDisabled ? confirmDisabledText : confirmText"
@@ -64,6 +64,15 @@
64
64
  </HyPopup>
65
65
  </template>
66
66
 
67
+ <script lang="ts">
68
+ export default {
69
+ name: "hy-calendar",
70
+ options: {
71
+ virtualHost: true,
72
+ styleIsolation: "shared",
73
+ },
74
+ };
75
+ </script>
67
76
  <script setup lang="ts">
68
77
  import type IProps from "./typing";
69
78
  import defaultProps from "./props";