hy-app 0.3.16 → 0.4.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 (102) hide show
  1. package/components/hy-action-sheet/hy-action-sheet.vue +2 -2
  2. package/components/hy-action-sheet/typing.d.ts +32 -33
  3. package/components/hy-back-top/hy-back-top.vue +36 -32
  4. package/components/hy-button/hy-button.vue +7 -7
  5. package/components/hy-button/typing.d.ts +39 -40
  6. package/components/hy-calendar/index.scss +1 -1
  7. package/components/hy-card/hy-card.vue +3 -3
  8. package/components/hy-cell/hy-cell.vue +125 -118
  9. package/components/hy-cell/index.scss +7 -7
  10. package/components/hy-checkbox/hy-checkbox.vue +17 -16
  11. package/components/hy-checkbox/index.scss +1 -1
  12. package/components/hy-checkbox-item/hy-checkbox-item.vue +25 -30
  13. package/components/hy-checkbox-item/index.scss +1 -1
  14. package/components/hy-code-input/hy-code-input.vue +314 -314
  15. package/components/hy-code-input/index.scss +12 -12
  16. package/components/hy-count-down/index.scss +1 -1
  17. package/components/hy-datetime-picker/index.scss +1 -1
  18. package/components/hy-datetime-picker/typing.d.ts +0 -1
  19. package/components/hy-divider/index.scss +3 -3
  20. package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -2
  21. package/components/hy-dropdown-item/index.scss +5 -5
  22. package/components/hy-float-button/hy-float-button.vue +1 -1
  23. package/components/hy-float-button/index.scss +9 -18
  24. package/components/hy-folding-panel/index.scss +1 -1
  25. package/components/hy-form-item/hy-form-item.vue +10 -11
  26. package/components/hy-grid/hy-grid.vue +23 -23
  27. package/components/hy-grid/index.scss +2 -8
  28. package/components/hy-icon/index.scss +8 -8
  29. package/components/hy-input/hy-input.vue +45 -45
  30. package/components/hy-input/index.scss +20 -15
  31. package/components/hy-line-progress/index.scss +3 -3
  32. package/components/hy-list/hy-list.vue +2 -2
  33. package/components/hy-list/index.scss +4 -4
  34. package/components/hy-loading/hy-loading.vue +2 -3
  35. package/components/hy-loading/index.scss +17 -15
  36. package/components/hy-menu/hy-menu.vue +26 -16
  37. package/components/hy-menu/index.scss +1 -1
  38. package/components/hy-menu/typing.d.ts +16 -12
  39. package/components/hy-modal/hy-modal.vue +11 -11
  40. package/components/hy-modal/index.scss +17 -17
  41. package/components/hy-modal/typing.d.ts +0 -2
  42. package/components/hy-navbar/hy-navbar.vue +3 -3
  43. package/components/hy-navbar/index.scss +10 -11
  44. package/components/hy-notice-bar/hy-column-notice.vue +2 -2
  45. package/components/hy-notice-bar/hy-row-notice.vue +3 -3
  46. package/components/hy-notice-bar/index.scss +9 -12
  47. package/components/hy-notify/hy-notify.vue +8 -5
  48. package/components/hy-notify/index.scss +2 -2
  49. package/components/hy-number-step/index.scss +9 -10
  50. package/components/hy-pagination/index.scss +7 -2
  51. package/components/hy-parse/index.scss +0 -9
  52. package/components/hy-picker/hy-picker.vue +1 -1
  53. package/components/hy-picker/index.scss +9 -16
  54. package/components/hy-popover/hy-popover.vue +6 -4
  55. package/components/hy-popup/hy-popup.vue +4 -2
  56. package/components/hy-popup/index.scss +45 -32
  57. package/components/hy-qrcode/hy-qrcode.vue +3 -3
  58. package/components/hy-qrcode/index.scss +18 -17
  59. package/components/hy-radio/hy-radio.vue +20 -18
  60. package/components/hy-radio/index.scss +26 -22
  61. package/components/hy-rate/hy-rate.vue +5 -5
  62. package/components/hy-rate/index.scss +4 -4
  63. package/components/hy-read-more/hy-read-more.vue +19 -20
  64. package/components/hy-read-more/index.scss +12 -6
  65. package/components/hy-scroll-list/hy-scroll-list.vue +3 -6
  66. package/components/hy-scroll-list/index.scss +4 -4
  67. package/components/hy-search/index.scss +9 -8
  68. package/components/hy-slider/hy-slider.vue +17 -11
  69. package/components/hy-slider/index.scss +12 -12
  70. package/components/hy-status-bar/index.scss +3 -1
  71. package/components/hy-steps/hy-steps.vue +50 -23
  72. package/components/hy-submit-bar/hy-submit-bar.vue +1 -1
  73. package/components/hy-submit-bar/index.scss +5 -4
  74. package/components/hy-subsection/hy-subsection.vue +3 -3
  75. package/components/hy-subsection/index.scss +7 -7
  76. package/components/hy-swipe-action/hy-swipe-action.vue +8 -8
  77. package/components/hy-swipe-action/index.scss +8 -4
  78. package/components/hy-swiper/hy-swiper-indicator.vue +2 -2
  79. package/components/hy-swiper/hy-swiper.vue +6 -6
  80. package/components/hy-swiper/index.scss +6 -10
  81. package/components/hy-switch/hy-switch.vue +4 -4
  82. package/components/hy-switch/index.scss +4 -22
  83. package/components/hy-tabs/hy-tabs.vue +16 -16
  84. package/components/hy-tabs/index.scss +16 -16
  85. package/components/hy-tag/index.scss +1 -1
  86. package/components/hy-text/index.scss +3 -3
  87. package/components/hy-textarea/hy-textarea.vue +11 -11
  88. package/components/hy-textarea/index.scss +11 -10
  89. package/components/hy-toast/hy-toast.vue +5 -5
  90. package/components/hy-toast/index.scss +8 -8
  91. package/components/hy-tooltip/hy-tooltip.vue +193 -183
  92. package/components/hy-tooltip/index.scss +69 -45
  93. package/components/hy-upload/hy-upload.vue +15 -10
  94. package/components/hy-upload/index.scss +37 -36
  95. package/components/hy-warn/hy-warn.vue +11 -11
  96. package/components/hy-warn/index.scss +76 -82
  97. package/components/hy-waterfall/index.scss +2 -1
  98. package/composables/usePopover.ts +2 -2
  99. package/libs/css/mixin.scss +0 -9
  100. package/package.json +2 -2
  101. package/utils/inside.ts +4 -1
  102. package/utils/utils.ts +187 -162
@@ -5,18 +5,21 @@
5
5
  :style="[backgroundColor, customStyle]"
6
6
  >
7
7
  <hy-status-bar v-if="tmpConfig?.safeAreaInsetTop"></hy-status-bar>
8
- <view class="hy-notify--wrapper">
9
- <slot name="icon">
8
+ <view class="hy-notify__wrapper">
9
+ <template
10
+ v-if="['success', 'warning', 'error'].includes(tmpConfig.type)"
11
+ >
12
+ <slot v-if="$slots.icon" name="icon"></slot>
10
13
  <hy-icon
11
- v-if="['success', 'warning', 'error'].includes(tmpConfig.type)"
14
+ v-else
12
15
  :name="tmpConfig?.icon || icon"
13
16
  :color="tmpConfig?.color"
14
17
  :size="tmpConfig.fontSize"
15
18
  :customStyle="{ marginRight: '4px' }"
16
19
  ></hy-icon>
17
- </slot>
20
+ </template>
18
21
  <text
19
- class="hy-notify--wrapper__text"
22
+ class="hy-notify__wrapper--text"
20
23
  :style="{
21
24
  fontSize: addUnit(tmpConfig?.fontSize),
22
25
  color: tmpConfig?.color,
@@ -5,13 +5,13 @@
5
5
  @include b(notify) {
6
6
  padding: $hy-border-margin-padding-base;
7
7
 
8
- @include m(wrapper) {
8
+ @include e(wrapper) {
9
9
  @include flex;
10
10
  align-items: center;
11
11
  text-align: center;
12
12
  justify-content: center;
13
13
 
14
- &__text {
14
+ @include m(text) {
15
15
  font-size: $hy-font-size-base;
16
16
  text-align: center;
17
17
  }
@@ -6,15 +6,13 @@
6
6
  @include flex(row);
7
7
  align-items: center;
8
8
 
9
- &__slot {
9
+ @include e(slot) {
10
10
  /* #ifndef APP-NVUE */
11
11
  touch-action: none;
12
12
  /* #endif */
13
13
  }
14
14
 
15
- &__input,
16
- &__plus,
17
- &__minus {
15
+ @include e(input, plus, minus) {
18
16
  background-color: $hy-background--empty;
19
17
  width: 35px;
20
18
  @include flex;
@@ -24,27 +22,27 @@
24
22
  touch-action: none;
25
23
  /* #endif */
26
24
 
27
- &--hover {
25
+ @include m(hover) {
28
26
  background-color: $hy-background--hover;
29
27
  }
30
28
 
31
- &--disabled {
29
+ @include m(disabled) {
32
30
  color: $hy-text-color--disabled;
33
31
  background-color: $hy-background--disabled;
34
32
  }
35
33
  }
36
34
 
37
- &__plus {
35
+ @include e(plus) {
38
36
  border-top-right-radius: 4px;
39
37
  border-bottom-right-radius: 4px;
40
38
  }
41
39
 
42
- &__minus {
40
+ @include e(minus) {
43
41
  border-top-left-radius: 4px;
44
42
  border-bottom-left-radius: 4px;
45
43
  }
46
44
 
47
- &__input {
45
+ @include e(input) {
48
46
  position: relative;
49
47
  text-align: center;
50
48
  font-size: 15px;
@@ -53,8 +51,9 @@
53
51
  @include flex;
54
52
  align-items: center;
55
53
  justify-content: center;
54
+ color: $hy-text-color;
56
55
 
57
- &--disabled {
56
+ @include m(disabled) {
58
57
  color: $hy-text-color--disabled;
59
58
  background-color: $hy-background--disabled;
60
59
  }
@@ -15,12 +15,14 @@
15
15
  align-items: center;
16
16
  padding: $hy-border-margin-padding-base;
17
17
  }
18
+
18
19
  @include e(message) {
19
20
  text-align: center;
20
21
  font-size: $hy-font-size-sm;
21
22
  padding: 1px 0 16px 0;
22
23
  }
23
- &__nav {
24
+
25
+ @include e(nav) {
24
26
  min-width: 60px;
25
27
  @include m(active){
26
28
  color: rgba(0,0,0,0.65)
@@ -29,15 +31,18 @@
29
31
  color: rgba(0,0,0,0.15)
30
32
  }
31
33
  }
34
+
32
35
  @include e(size){
33
36
  flex: 1;
34
37
  text-align: center;
35
38
  font-size: $hy-font-size-sm;
36
39
  }
40
+
37
41
  @include e(separator){
38
42
  padding: 0 4px;
39
43
  }
40
- &__left {
44
+
45
+ @include e(left) {
41
46
  display: inline-block;
42
47
  }
43
48
  @include e(current){
@@ -1,9 +0,0 @@
1
-
2
- .hy-overlay {
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- background-color: rgba(0, 0, 0, 0.7);
9
- }
@@ -81,8 +81,8 @@
81
81
  >
82
82
  <view
83
83
  v-if="Array.isArray(item)"
84
- class="hy-picker--view__column__item u-line-1"
85
84
  :class="[
85
+ 'hy-picker--view__column__item',
86
86
  index1 === innerIndex[index] &&
87
87
  'hy-picker--view__column__item--selected',
88
88
  ]"
@@ -17,22 +17,22 @@
17
17
  }
18
18
  }
19
19
 
20
- &__title {
20
+ @include e(title) {
21
21
  @include flex();
22
22
  justify-content: space-between;
23
23
  padding: $hy-border-margin-padding-lg;
24
- &--center {
24
+ @include m(center) {
25
25
  font-size: $hy-font-size-base;
26
26
  color: $hy-text-color--grey;
27
27
  }
28
28
 
29
- &--right {
29
+ @include m(right) {
30
30
  color: $hy-primary;
31
31
  }
32
32
  }
33
33
 
34
34
  @include m(view) {
35
- &__column {
35
+ @include e(column) {
36
36
  @include flex;
37
37
  flex: 1;
38
38
  justify-content: center;
@@ -41,17 +41,10 @@
41
41
  background: $hy-background--hover;
42
42
  }
43
43
 
44
- &__item {
45
- @include flex;
46
- justify-content: center;
47
- align-items: center;
48
- font-size: 16px;
49
- text-align: center;
50
- /* #ifndef APP-NVUE */
51
- display: block;
52
- /* #endif */
53
-
54
- &--disabled {
44
+ @include e(item) {
45
+ color: $hy-text-color;
46
+ @include lineEllipsis;
47
+ @include m(disabled) {
55
48
  /* #ifndef APP-NVUE */
56
49
  cursor: not-allowed;
57
50
  /* #endif */
@@ -60,7 +53,7 @@
60
53
  }
61
54
  }
62
55
 
63
- :deep(.hy-picker--view__mask) {
56
+ @include edeep(mask) {
64
57
  background-image: none;
65
58
  }
66
59
  }
@@ -34,11 +34,11 @@
34
34
  </view>
35
35
  </view>
36
36
  </view>
37
+
37
38
  <hy-transition
38
39
  custom-class="hy-popover__pos"
39
40
  :custom-style="popover.popStyle.value"
40
41
  :show="showPopover"
41
- name="fade"
42
42
  :duration="200"
43
43
  >
44
44
  <view class="hy-popover__container">
@@ -195,6 +195,7 @@ const emit = defineEmits<IPopoverEmits>();
195
195
  const slots = useSlots();
196
196
  const queue = inject<Queue | null>(queueKey, null);
197
197
  const selector: string = "popover";
198
+ const visibleArrow = ref<boolean>(true);
198
199
  const { proxy } = getCurrentInstance() as any;
199
200
  const popover = usePopover();
200
201
  const showPopover = ref<boolean>(false); // 控制popover显隐
@@ -213,7 +214,7 @@ watch(
213
214
  watch(
214
215
  () => props.placement,
215
216
  (newVal) => {
216
- popover.init(newVal, true, selector);
217
+ popover.init(newVal, visibleArrow.value, selector);
217
218
  },
218
219
  );
219
220
 
@@ -229,7 +230,6 @@ watch(
229
230
  (newValue) => {
230
231
  if (newValue) {
231
232
  popover.control(props.placement, props.offset);
232
- // provide/inject在微信小程序不能使用,所以执行两个保存方法
233
233
  if (queue && queue.closeOther) {
234
234
  queue.closeOther(proxy);
235
235
  } else {
@@ -245,7 +245,9 @@ watch(
245
245
  );
246
246
 
247
247
  onMounted(() => {
248
- popover.init(props.placement, true, selector);
248
+ setTimeout(() => {
249
+ popover.init(props.placement, visibleArrow.value, selector);
250
+ }, 2000);
249
251
  });
250
252
 
251
253
  onBeforeMount(() => {
@@ -24,8 +24,10 @@
24
24
  <view
25
25
  v-if="closeable"
26
26
  @tap.stop="close"
27
- class="hy-popup__content__close"
28
- :class="['hy-popup__content__close--' + closeIconPos]"
27
+ :class="[
28
+ 'hy-popup__content__close',
29
+ 'hy-popup__content__close--' + closeIconPos,
30
+ ]"
29
31
  hover-class="hy-popup__content__close--hover"
30
32
  hover-stay-time="150"
31
33
  >
@@ -5,56 +5,69 @@
5
5
  @include b(popup) {
6
6
  flex: 1;
7
7
 
8
- &__content {
8
+ @include e(content) {
9
9
  background-color: $hy-background--container;
10
10
  position: relative;
11
11
 
12
- &--round-top {
13
- border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
14
- }
12
+ @include m(round) {
15
13
 
16
- &--round-left {
17
- border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
18
- }
14
+ &-top {
15
+ border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
16
+ }
19
17
 
20
- &--round-right {
21
- border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
22
- }
18
+ &-left {
19
+ border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
20
+ }
23
21
 
24
- &--round-bottom {
25
- border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
26
- }
22
+ &-right {
23
+ border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
24
+ }
27
25
 
28
- &--round-center {
29
- border-radius: $hy-border-radius-lg;
26
+ &-bottom {
27
+ border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
28
+ }
29
+
30
+ &-center {
31
+ border-radius: $hy-border-radius-lg;
32
+ }
30
33
  }
31
34
 
32
- &__close {
35
+ @include e(close) {
33
36
  position: absolute;
34
37
 
35
- &--hover {
38
+ @include m(hover) {
36
39
  opacity: 0.4;
37
40
  }
38
41
  }
39
42
 
40
- &__close--top-left {
41
- top: $hy-border-margin-padding-lg;
42
- left: $hy-border-margin-padding-lg;
43
- }
43
+ @include e(close) {
44
44
 
45
- &__close--top-right {
46
- top: $hy-border-margin-padding-lg;
47
- right: $hy-border-margin-padding-lg;
48
- }
45
+ @include m(top) {
49
46
 
50
- &__close--bottom-left {
51
- bottom: $hy-border-margin-padding-lg;
52
- left: $hy-border-margin-padding-lg;
53
- }
47
+ &-left {
48
+ top: $hy-border-margin-padding-lg;
49
+ left: $hy-border-margin-padding-lg;
50
+ }
51
+
52
+ &-right {
53
+ top: $hy-border-margin-padding-lg;
54
+ right: $hy-border-margin-padding-lg;
55
+ }
56
+
57
+ }
58
+ @include m(bottom) {
59
+
60
+ &-left {
61
+ bottom: $hy-border-margin-padding-lg;
62
+ left: $hy-border-margin-padding-lg;
63
+ }
64
+
65
+ &-right {
66
+ right: $hy-border-margin-padding-lg;
67
+ bottom: $hy-border-margin-padding-lg;
68
+ }
69
+ }
54
70
 
55
- &__close--bottom-right {
56
- right: $hy-border-margin-padding-lg;
57
- bottom: $hy-border-margin-padding-lg;
58
71
  }
59
72
  }
60
73
  }
@@ -3,7 +3,7 @@
3
3
  <view class="hy-qrcode__content" @click="preview">
4
4
  <!-- #ifndef APP-NVUE -->
5
5
  <canvas
6
- class="hy-qrcode__canvas"
6
+ class="hy-qrcode__content--canvas"
7
7
  :id="cid"
8
8
  :canvas-id="cid"
9
9
  :style="{ width: addUnit(size), height: addUnit(size) }"
@@ -11,7 +11,7 @@
11
11
  <!-- #endif -->
12
12
  <view
13
13
  v-if="showLoading && loading"
14
- class="hy-qrcode__loading"
14
+ class="hy-qrcode__content--loading"
15
15
  :style="{ width: addUnit(size), height: addUnit(size) }"
16
16
  >
17
17
  <HyLoading></HyLoading>
@@ -32,7 +32,7 @@ export default {
32
32
  </script>
33
33
 
34
34
  <script setup lang="ts">
35
- import { getCurrentInstance, toRefs, ref, onMounted } from "vue";
35
+ import { getCurrentInstance, ref, onMounted } from "vue";
36
36
  import type { IQrcodeEmits } from "./typing";
37
37
  import QRCode from "./qrcode.js";
38
38
  import { addUnit, error } from "../../utils";
@@ -2,25 +2,26 @@
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
4
  @include b(qrcode) {
5
- &__loading {
6
- display: flex;
7
- justify-content: center;
8
- align-items: center;
9
- background-color: $hy-background;
10
- position: absolute;
11
- top: 0;
12
- bottom: 0;
13
- left: 0;
14
- right: 0;
15
- }
16
- &__content {
5
+ @include e(content) {
17
6
  position: relative;
18
7
 
19
- &__canvas {
20
- position: fixed;
21
- top: -99999rpx;
22
- left: -99999rpx;
23
- z-index: -99999;
8
+ //@include m(canvas) {
9
+ // position: fixed;
10
+ // top: -99999rpx;
11
+ // left: -99999rpx;
12
+ // z-index: -99999;
13
+ //}
14
+
15
+ @include m(loading) {
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ background-color: $hy-background;
20
+ position: absolute;
21
+ top: 0;
22
+ bottom: 0;
23
+ left: 0;
24
+ right: 0;
24
25
  }
25
26
  }
26
27
  }
@@ -6,7 +6,7 @@
6
6
  @tap.stop="wrapperClickHandler($event, item)"
7
7
  :style="radioStyle"
8
8
  :class="[
9
- `hy-radio-label--${iconPlacement}`,
9
+ `hy-radio__label--${iconPlacement}`,
10
10
  borderBottom && placement === 'column' && 'hy-border__bottom',
11
11
  ]"
12
12
  >
@@ -16,32 +16,36 @@
16
16
  :class="iconClasses(item)"
17
17
  :style="iconWrapStyle(item)"
18
18
  >
19
- <slot
20
- name="icon"
21
- :iconColor="iconColor"
22
- :iconSize="addUnit(sizeType[size] ?? iconSize)"
23
- >
19
+ <template v-if="item[fieldNames.checked]">
20
+ <slot
21
+ v-if="$slots.icon"
22
+ name="icon"
23
+ :iconColor="iconColor"
24
+ :iconSize="addUnit(sizeType[size] || iconSize)"
25
+ >
26
+ </slot>
24
27
  <HyIcon
28
+ v-else
25
29
  class="hy-radio__icon-wrap__icon"
26
30
  :name="IconConfig.CHECK_MASK"
27
- :size="addUnit(sizeType[size] ?? iconSize)"
31
+ :size="addUnit(sizeType[size] || iconSize)"
28
32
  :color="iconColorCom(item.checked)"
29
33
  />
30
- </slot>
34
+ </template>
31
35
  </view>
32
36
  <view
33
- class="hy-radio__label-wrap cursor-pointer"
37
+ class="hy-radio__label--wrap cursor-pointer"
34
38
  @tap.stop="labelClickHandler($event, item)"
35
39
  >
36
40
  <slot name="label" :record="item">
37
41
  <text
38
42
  :class="[
39
43
  'hy-radio__text',
40
- disabled && 'hy-radio__label-wrap--disabled',
44
+ disabled && 'hy-radio__label--wrap--disabled',
41
45
  ]"
42
46
  :style="{
43
47
  color: labelColor,
44
- fontSize: addUnit(sizeType[size] ?? labelSize),
48
+ fontSize: addUnit(sizeType[size] || labelSize),
45
49
  }"
46
50
  >
47
51
  {{ item[fieldNames.label] }}
@@ -179,7 +183,7 @@ const columns_1 = ref<CheckboxColumnsVo[]>();
179
183
  const sizeType: AnyObject = reactive({
180
184
  small: 14,
181
185
  medium: 18,
182
- large: 22,
186
+ large: 24,
183
187
  });
184
188
 
185
189
  watch(
@@ -220,7 +224,7 @@ const radioStyle = computed(() => {
220
224
  const style: CSSProperties = {};
221
225
  if (props.borderBottom && props.placement === "row") {
222
226
  error(
223
- "检测到您将borderBottom设置为true,需要同时将u-checkbox-group的placement设置为column才有效",
227
+ "检测到您将borderBottom设置为true,需要同时将hy-checkbox-group的placement设置为column才有效",
224
228
  );
225
229
  }
226
230
  // 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
@@ -264,15 +268,13 @@ const iconWrapStyle = computed(() => {
264
268
  style.backgroundColor =
265
269
  temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
266
270
  ? props.activeColor
267
- : !isDisabled(temp?.disabled)
268
- ? "#ffffff"
269
- : "";
271
+ : "";
270
272
  style.borderColor =
271
273
  temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
272
274
  ? props.activeColor
273
275
  : props.inactiveColor;
274
- style.width = addUnit(sizeType[props.size] ?? props.size);
275
- style.height = addUnit(sizeType[props.size] ?? props.size);
276
+ style.width = addUnit(sizeType[props.size] || props.size);
277
+ style.height = addUnit(sizeType[props.size] || props.size);
276
278
  return style;
277
279
  };
278
280
  });
@@ -24,16 +24,34 @@
24
24
  }
25
25
  }
26
26
 
27
- &-label--left {
28
- flex-direction: row;
29
- }
27
+ @include e(label) {
28
+
29
+ @include m(left) {
30
+ flex-direction: row;
31
+ }
32
+
33
+ @include m(right) {
34
+ flex-direction: row-reverse;
35
+ justify-content: space-between;
36
+ }
37
+
38
+ @include m(wrap) {
39
+ /* #ifndef APP-NVUE */
40
+ word-wrap: break-word;
41
+ /* #endif */
42
+
43
+ color: $hy-text-color;
44
+ font-size: $hy-font-size-base;
45
+ margin-right: $hy-border-margin-padding-sm;
46
+
47
+ @include m(disabled) {
48
+ color: $hy-text-color--disabled;
49
+ }
50
+ }
30
51
 
31
- &-label--right {
32
- flex-direction: row-reverse;
33
- justify-content: space-between;
34
52
  }
35
53
 
36
- &__icon-wrap {
54
+ @include e(icon-wrap) {
37
55
  /* #ifndef APP-NVUE */
38
56
  box-sizing: border-box;
39
57
  // nvue下,border-color过渡有问题
@@ -50,7 +68,7 @@
50
68
 
51
69
  /* #ifdef MP-TOUTIAO */
52
70
  // 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
53
- &__icon {
71
+ @include e(icon) {
54
72
  line-height: 0;
55
73
  }
56
74
 
@@ -86,18 +104,4 @@
86
104
  }
87
105
  }
88
106
  }
89
-
90
- &__label-wrap {
91
- /* #ifndef APP-NVUE */
92
- word-wrap: break-word;
93
- /* #endif */
94
-
95
- color: $hy-text-color;
96
- font-size: $hy-font-size-base;
97
- margin-right: $hy-border-margin-padding-sm;
98
-
99
- @include m(disabled) {
100
- color: $hy-text-color--disabled;
101
- }
102
- }
103
107
  }
@@ -6,14 +6,14 @@
6
6
  @touchend.stop="touchEnd"
7
7
  >
8
8
  <view
9
- class="hy-rate__content__item cursor-pointer"
9
+ class="hy-rate__content--item cursor-pointer"
10
10
  v-for="(item, index) in Number(count)"
11
11
  :key="index"
12
12
  :class="[elClass]"
13
13
  >
14
14
  <view
15
- class="hy-rate__content__item__icon-wrap"
16
- ref="hy-rate__content__item__icon-wrap"
15
+ class="hy-rate__content--item__icon-wrap"
16
+ ref="hy-rate__content--item__icon-wrap"
17
17
  @tap.stop="clickHandler($event)"
18
18
  >
19
19
  <HyIcon
@@ -34,13 +34,13 @@
34
34
  <view
35
35
  v-if="allowHalf"
36
36
  @tap.stop="clickHandler($event)"
37
- class="hy-rate__content__item__icon-wrap hy-rate__content__item__icon-wrap--half"
37
+ class="hy-rate__content--item__icon-wrap hy-rate__content--item__icon-wrap--half"
38
38
  :style="[
39
39
  {
40
40
  width: addUnit(rateWidth / 2),
41
41
  },
42
42
  ]"
43
- ref="hy-rate__content__item__icon-wrap"
43
+ ref="hy-rate__content--item__icon-wrap"
44
44
  >
45
45
  <HyIcon
46
46
  :name="Math.ceil(activeIndex) > index ? activeIcon : inactiveIcon"
@@ -9,14 +9,14 @@
9
9
  touch-action: none;
10
10
  /* #endif */
11
11
 
12
- &__content {
12
+ @include e(content) {
13
13
  @include flex;
14
14
 
15
- &__item {
15
+ @include m(item) {
16
16
  position: relative;
17
17
 
18
- &__icon-wrap {
19
- &--half {
18
+ @include e(icon-wrap) {
19
+ @include m(half) {
20
20
  position: absolute;
21
21
  overflow: hidden;
22
22
  top: 0;