hy-app 0.3.16 → 0.4.0

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 -44
  30. package/components/hy-input/index.scss +12 -11
  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 +38 -30
  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 +5 -5
  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
@@ -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;
@@ -26,27 +26,26 @@
26
26
  :style="[innerShadowStyle]"
27
27
  v-if="isLongContent"
28
28
  >
29
- <slot name="toggle">
30
- <view class="hy-read-more__toggle__text" @tap="toggleReadMore">
31
- <text
32
- :style="{
33
- color: color,
34
- fontSize: addUnit(fontSize),
35
- lineHeight: addUnit(fontSize),
36
- marginRight: '5px',
37
- }"
38
- >
39
- {{ status === "close" ? closeText : openText }}
40
- </text>
41
- <view class="hy-read-more__toggle__icon">
42
- <HyIcon
43
- :color="color"
44
- :size="fontSize + 2"
45
- :name="status === 'close' ? IconConfig.DOWN : IconConfig.UP"
46
- ></HyIcon>
47
- </view>
29
+ <slot v-if="$slots.toggle" name="toggle"></slot>
30
+ <view v-else class="hy-read-more__toggle--content" @tap="toggleReadMore">
31
+ <text
32
+ class="hy-read-more__toggle--content__text"
33
+ :style="{
34
+ color: color,
35
+ fontSize: addUnit(fontSize),
36
+ lineHeight: addUnit(fontSize),
37
+ }"
38
+ >
39
+ {{ status === "close" ? closeText : openText }}
40
+ </text>
41
+ <view class="hy-read-more__toggle--icon">
42
+ <HyIcon
43
+ :color="color"
44
+ :size="fontSize + 2"
45
+ :name="status === 'close' ? IconConfig.DOWN : IconConfig.UP"
46
+ ></HyIcon>
48
47
  </view>
49
- </slot>
48
+ </view>
50
49
  </view>
51
50
  </view>
52
51
  </template>
@@ -2,31 +2,37 @@
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
4
  @include b(read-more) {
5
- &__content {
5
+ @include e(content) {
6
6
  overflow: hidden;
7
7
  font-size: 15px;
8
8
  text-align: left;
9
9
  transition: height 0.3s ease;
10
10
  }
11
11
 
12
- &__toggle {
12
+ @include e(toggle) {
13
13
  @include flex;
14
14
  justify-content: center;
15
15
  position: relative;
16
16
 
17
- &--mask {
17
+ @include m(mask) {
18
18
  background-image:
19
19
  linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, $hy-background--2 80%);
20
20
  padding-top: 100px;
21
21
  margin-top: -100px;
22
22
  }
23
23
 
24
- &__text {
24
+ @include m(content) {
25
25
  @include flex;
26
26
  align-items: center;
27
27
  justify-content: center;
28
- margin-top: 5px;
29
- color: $hy-primary;
28
+ margin: $hy-border-margin-padding-sm 0;
29
+ line-height: 30px;
30
+
31
+ @include e(text) {
32
+ color: $hy-primary;
33
+ margin-right: $hy-border-margin-padding-sm;
34
+ }
35
+
30
36
  :deep(.hy-icon) {
31
37
  color: $hy-primary;
32
38
  }
@@ -1,7 +1,5 @@
1
1
  <template>
2
2
  <view class="hy-scroll-list" ref="hy-scroll-list">
3
- <!-- #ifdef MP-WEIXIN || APP-VUE || H5 || MP-QQ -->
4
- <!-- 以上平台,支持wxs -->
5
3
  <scroll-view
6
4
  class="hy-scroll-list__scroll-view scroll-view-native"
7
5
  scroll-x
@@ -18,13 +16,12 @@
18
16
  >
19
17
  <slot></slot>
20
18
  </scroll-view>
21
- <!-- #endif -->
22
19
  <view class="hy-scroll-list__indicator" v-if="indicator">
23
- <view class="hy-scroll-list__indicator__line" :style="lineStyle">
20
+ <view class="hy-scroll-list__indicator--line" :style="lineStyle">
24
21
  <view
25
- class="hy-scroll-list__indicator__line__bar"
22
+ class="hy-scroll-list__indicator--line__bar"
26
23
  :style="barStyle"
27
- ref="hy-scroll-list__indicator__line__bar"
24
+ ref="hy-scroll-list__indicator--line__bar"
28
25
  ></view>
29
26
  </view>
30
27
  </view>
@@ -11,7 +11,7 @@
11
11
  @include b(scroll-list) {
12
12
  padding-bottom: $hy-border-margin-padding-base;
13
13
 
14
- &__scroll-view {
14
+ @include e(scroll-view) {
15
15
  @include flex;
16
16
  // 缺少会在enable-flex模式下高度异常
17
17
  align-items: flex-start;
@@ -20,19 +20,19 @@
20
20
  }
21
21
  }
22
22
 
23
- &__indicator {
23
+ @include e(indicator) {
24
24
  @include flex;
25
25
  justify-content: center;
26
26
  margin-top: $hy-border-margin-padding-lg;
27
27
 
28
- &__line {
28
+ @include m(line) {
29
29
  width: 60px;
30
30
  height: 4px;
31
31
  border-radius: $hy-border-radius-semicircle;
32
32
  overflow: hidden;
33
33
  background-color: $hy-background--empty;
34
34
 
35
- &__bar {
35
+ @include e(bar) {
36
36
  width: 20px;
37
37
  height: 4px;
38
38
  border-radius: $hy-border-radius-semicircle;
@@ -15,7 +15,7 @@ $hy-search-close-size: 20px !default;
15
15
  align-items: center;
16
16
  flex: 1;
17
17
 
18
- &__content {
18
+ @include e(content) {
19
19
  @include flex;
20
20
  align-items: center;
21
21
  padding: 0 $hy-border-margin-padding-lg;
@@ -27,19 +27,19 @@ $hy-search-close-size: 20px !default;
27
27
  overflow: hidden;
28
28
  background-color: $hy-background--empty;
29
29
 
30
- &__icon {
30
+ @include e(icon) {
31
31
  @include flex;
32
32
  align-items: center;
33
33
  }
34
34
 
35
- &__label {
35
+ @include e(label) {
36
36
  color: $hy-text-color;
37
37
  font-size: $hy-font-size-base;
38
38
  margin: 0 4px;
39
39
  }
40
40
 
41
41
  /*清除icon样式*/
42
- &__close {
42
+ @include e(close) {
43
43
  width: $hy-search-close-size;
44
44
  height: $hy-search-close-size;
45
45
  border-radius: $hy-border-radius-circle;
@@ -51,21 +51,22 @@ $hy-search-close-size: 20px !default;
51
51
  }
52
52
 
53
53
  /*输入框样式*/
54
- &__input {
54
+ @include e(input) {
55
55
  flex: 1;
56
56
  font-size: $hy-font-size-base;
57
57
  line-height: 1;
58
58
  margin: 0 $hy-border-margin-padding-sm;
59
59
  color: $hy-text-color;
60
+ background-color: $hy-background--empty;
60
61
 
61
- &--placeholder {
62
+ @include m(placeholder) {
62
63
  font-size: 25rpx;
63
64
  color: $hy-text-color--placeholder;
64
65
  }
65
66
  }
66
67
  }
67
68
 
68
- &__action {
69
+ @include e(action) {
69
70
  font-size: $hy-font-size-base;
70
71
  color: $hy-text-color;
71
72
  width: 0;
@@ -77,7 +78,7 @@ $hy-search-close-size: 20px !default;
77
78
  /* #endif */
78
79
  text-align: center;
79
80
 
80
- &--active {
81
+ @include m(active) {
81
82
  width: 40px;
82
83
  margin-left: $hy-border-margin-padding-sm;
83
84
  }
@@ -2,14 +2,14 @@
2
2
  <view :class="['hy-slider', customClass]" :style="[customStyle]">
3
3
  <template v-if="!useNative || isRange">
4
4
  <view
5
- ref="hy-slider-inner"
6
- class="hy-slider-inner"
5
+ ref="hy-slider__inner"
6
+ class="hy-slider__inner"
7
7
  @tap="onClick"
8
8
  @onTouchStart="onTouchStart2($event, 1)"
9
9
  @touchmove="onTouchMove2($event, 1)"
10
10
  @touchend="onTouchEnd2($event, 1)"
11
11
  @touchcancel="onTouchEnd2($event, 1)"
12
- :class="[disabled ? 'hy-slider--disabled' : '']"
12
+ :class="[disabled ? 'hy-slider__disabled' : '']"
13
13
  :style="{
14
14
  height:
15
15
  isRange && showValue
@@ -71,7 +71,7 @@
71
71
  </text>
72
72
  <template v-if="isRange">
73
73
  <view
74
- class="hy-slider__button-wrap hy-slider__button-wrap-0"
74
+ class="hy-slider__button--wrap hy-slider__button--wrap-0"
75
75
  @touchstart="onTouchStart($event, 0)"
76
76
  @touchmove="onTouchMove($event, 0)"
77
77
  @touchend="onTouchEnd($event, 0)"
@@ -96,7 +96,7 @@
96
96
  </view>
97
97
  </template>
98
98
  <view
99
- class="hy-slider__button-wrap"
99
+ class="hy-slider__button--wrap"
100
100
  @touchstart="onTouchStart"
101
101
  @touchmove="onTouchMove"
102
102
  @touchend="onTouchEnd"
@@ -7,11 +7,11 @@
7
7
  @include flex;
8
8
  align-items: center;
9
9
 
10
- &__native {
10
+ @include e(native) {
11
11
  flex: 1;
12
12
  }
13
13
 
14
- &-inner {
14
+ @include e(inner) {
15
15
  flex: 1;
16
16
  @include flex(column);
17
17
  position: relative;
@@ -20,11 +20,11 @@
20
20
  justify-content: center;
21
21
  }
22
22
 
23
- &__show-value {
23
+ @include e(show-value) {
24
24
  margin: $hy-border-margin-padding-base $hy-border-margin-padding-lg $hy-border-margin-padding-base 0;
25
25
  }
26
26
 
27
- &__show-range-value {
27
+ @include e(show-range-value) {
28
28
  padding-top: 2px;
29
29
  font-size: 12px;
30
30
  line-height: 12px;
@@ -32,7 +32,7 @@
32
32
  bottom: 0;
33
33
  }
34
34
 
35
- &__base {
35
+ @include e(base) {
36
36
  background-color: $hy-background--empty;
37
37
  border-radius: $hy-border-radius-semicircle;
38
38
  }
@@ -49,7 +49,7 @@
49
49
  }
50
50
  /* #endif */
51
51
 
52
- &__gap {
52
+ @include e(gap) {
53
53
  position: relative;
54
54
  border-radius: $hy-border-radius-semicircle;
55
55
  transition: width 0.2s;
@@ -59,7 +59,7 @@
59
59
  }
60
60
  }
61
61
 
62
- &__button {
62
+ @include e(button) {
63
63
  width: 24px;
64
64
  height: 24px;
65
65
  border-radius: 50%;
@@ -69,14 +69,14 @@
69
69
  /* #ifdef H5 */
70
70
  cursor: pointer;
71
71
  /* #endif */
72
- }
73
72
 
74
- &__button-wrap {
75
- position: absolute;
76
- // transform: translate3d(50%, -50%, 0);
73
+ @include m(wrap) {
74
+ position: absolute;
75
+ // transform: translate3d(50%, -50%, 0);
76
+ }
77
77
  }
78
78
 
79
- @include m(disabled) {
79
+ @include e(disabled) {
80
80
  opacity: 0.5;
81
81
  }
82
82
  }
@@ -1,4 +1,6 @@
1
- .hy-status-bar {
1
+ @use "../../libs/css/mixin.scss" as *;
2
+
3
+ @include b(status-bar) {
2
4
  // nvue会默认100%,如果nvue下,显式写100%的话,会导致宽度不为100%而异常
3
5
  /* #ifndef APP-NVUE */
4
6
  width: 100%;
@@ -26,7 +26,13 @@
26
26
  ]"
27
27
  :style="itemStyleInner"
28
28
  >
29
- <slot name="icon" :error="item?.error" :index="i">
29
+ <slot
30
+ v-if="$slots.icon"
31
+ name="icon"
32
+ :error="item?.error"
33
+ :index="i"
34
+ ></slot>
35
+ <template v-else>
30
36
  <view
31
37
  :class="[
32
38
  'hy-steps-item__wrapper--dot__item',
@@ -83,7 +89,7 @@
83
89
  "
84
90
  ></HyIcon>
85
91
  </view>
86
- </slot>
92
+ </template>
87
93
  </view>
88
94
  <!-- 步骤状态 -->
89
95
 
@@ -93,26 +99,32 @@
93
99
  :class="[`hy-steps-item__content--${direction}`]"
94
100
  :style="[contentStyle]"
95
101
  >
96
- <slot name="content" :record="item" :index="i">
97
- <slot name="title" :title="item.title" :index="i">
98
- <text
99
- :class="[
100
- 'hy-steps-item__content__title',
101
- current == i && 'hy-steps-item__content__title--active',
102
- current == i &&
103
- item.error &&
104
- 'hy-steps-item__content__title--error',
105
- ]"
106
- >
107
- {{ item.title }}
108
- </text>
109
- </slot>
110
- <slot name="desc" :desc="item.desc" :index="i">
111
- <text :style="{ fontSize: '12px', color: '#999' }">{{
112
- item.desc
113
- }}</text>
114
- </slot>
115
- </slot>
102
+ <slot
103
+ v-if="$slots.content"
104
+ name="content"
105
+ :record="item"
106
+ :index="i"
107
+ ></slot>
108
+ <template v-else>
109
+ <slot
110
+ v-if="$slots.title"
111
+ name="title"
112
+ :title="item.title"
113
+ :index="i"
114
+ ></slot>
115
+ <text v-else :class="titleClass(i, item.error)">
116
+ {{ item.title }}
117
+ </text>
118
+ <slot
119
+ v-if="$slots.desc"
120
+ name="desc"
121
+ :desc="item.desc"
122
+ :index="i"
123
+ ></slot>
124
+ <text v-else :style="{ fontSize: '12px', color: '#999' }">{{
125
+ item.desc
126
+ }}</text>
127
+ </template>
116
128
  </view>
117
129
  <!-- 内容区域 -->
118
130
  </view>
@@ -212,10 +224,25 @@ watch(
212
224
  },
213
225
  );
214
226
 
227
+ // 字体标题类名
228
+ const titleClass = computed(() => {
229
+ return (index: number, error: boolean) => {
230
+ const classes = ["hy-steps-item__content__title"];
231
+ if (props.current === index) {
232
+ classes.push("hy-steps-item__content__title--active");
233
+
234
+ if (error) {
235
+ classes.push("hy-steps-item__content__title--error");
236
+ }
237
+ }
238
+
239
+ return classes;
240
+ };
241
+ });
215
242
  // 字体颜色
216
243
  const textColor = computed(() => {
217
244
  return (index: number) =>
218
- index == props.current ? "#ffffff" : props.inactiveColor;
245
+ index === props.current ? "#ffffff" : props.inactiveColor;
219
246
  });
220
247
 
221
248
  /**
@@ -23,7 +23,7 @@
23
23
  <HyBadge
24
24
  :value="item?.badge?.value"
25
25
  :absolute="true"
26
- :offset="item?.badge?.offset ?? [-5, 20]"
26
+ :offset="item?.badge?.offset || [-5, 20]"
27
27
  :isDot="item?.badge?.isDot"
28
28
  :type="item?.badge?.type"
29
29
  :color="item?.badge?.color"
@@ -8,25 +8,26 @@
8
8
  padding: $hy-border-margin-padding-base;
9
9
  width: 100%;
10
10
  box-sizing: border-box;
11
+
11
12
  /*左边内容*/
12
- &__left {
13
+ @include e(left) {
13
14
  display: flex;
14
15
  font-size: 20rpx;
15
16
  flex: 1;
16
- &--item {
17
+ @include m(item) {
17
18
  margin: 0 $hy-border-margin-padding-base;
18
19
  position: relative;
19
20
  }
20
21
  }
21
22
 
22
23
  /*右边内容*/
23
- &__right {
24
+ @include e(right) {
24
25
  display: flex;
25
26
  justify-content: flex-end;
26
27
  font-size: 26rpx;
27
28
  align-items: center;
28
29
  width: 400rpx;
29
- &--button {
30
+ @include m(button) {
30
31
  padding: $hy-border-margin-padding-base $hy-border-margin-padding-lg;
31
32
  color: #ffffff;
32
33
  display: flex;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view
3
3
  ref="hy-subsection"
4
- :class="[`hy-subsection--${mode}`, 'hy-subsection', customClass]"
4
+ :class="[`hy-subsection__${mode}`, 'hy-subsection', customClass]"
5
5
  :style="[customStyle, wrapperStyle]"
6
6
  >
7
7
  <view ref="hy-subsection__bar" :style="barStyle" :class="barClass"></view>
@@ -13,7 +13,7 @@
13
13
  v-for="(item, index) in list"
14
14
  :key="index"
15
15
  >
16
- <text class="hy-subsection__item__text" :style="[textStyle(index)]">{{
16
+ <text class="hy-subsection__item--text" :style="[textStyle(index)]">{{
17
17
  getName(item)
18
18
  }}</text>
19
19
  </view>
@@ -150,7 +150,7 @@ const barStyle = computed<CSSProperties>(() => {
150
150
  const barClass = computed(() => {
151
151
  let className: string[] = ["hy-subsection__bar", "cursor-pointer"];
152
152
  const className_2 = [
153
- props.mode === "button" && "hy-subsection--button__bar",
153
+ props.mode === "button" && "hy-subsection__button--bar",
154
154
  innerCurrent.value === 0 &&
155
155
  props.mode === "subsection" &&
156
156
  "hy-subsection__bar--first",
@@ -11,24 +11,24 @@
11
11
  box-sizing: border-box;
12
12
  /* #endif */
13
13
 
14
- @include m(button) {
14
+ @include e(button) {
15
15
  height: 35px;
16
16
  background-color: $hy-background--3;
17
17
  padding: 3px;
18
18
  border-radius: $hy-border-radius-sm;
19
19
  align-items: stretch;
20
20
 
21
- &__bar {
21
+ @include m(bar) {
22
22
  background-color: $hy-background--container !important;
23
23
  border-radius: $hy-border-radius-sm;
24
24
  }
25
25
  }
26
26
 
27
- @include m(subsection) {
27
+ @include e(subsection) {
28
28
  height: 32px;
29
29
  }
30
30
 
31
- &__bar {
31
+ @include e(bar) {
32
32
  position: absolute;
33
33
  /* #ifndef APP-NVUE */
34
34
  transition-property: transform, color;
@@ -50,7 +50,7 @@
50
50
  }
51
51
  }
52
52
 
53
- &__item {
53
+ @include e(item) {
54
54
  @include flex;
55
55
  flex: 1;
56
56
  justify-content: center;
@@ -62,7 +62,7 @@
62
62
  border: 1px solid $hy-primary;
63
63
  }
64
64
 
65
- &--no-border-right {
65
+ @include m(no-border-right) {
66
66
  border-right-width: 0 !important;
67
67
  }
68
68
 
@@ -76,7 +76,7 @@
76
76
  border-bottom-right-radius: $hy-border-radius-sm;
77
77
  }
78
78
 
79
- &__text {
79
+ @include m(text) {
80
80
  font-size: 12px;
81
81
  line-height: 14px;
82
82
  @include flex;
@@ -9,10 +9,10 @@
9
9
  @touchcancel="endDrag"
10
10
  >
11
11
  <!--容器-->
12
- <view class="hy-swipe-action--wrapper" :style="wrapperStyle">
12
+ <view class="hy-swipe-action__wrapper" :style="wrapperStyle">
13
13
  <!--左侧操作-->
14
14
  <view
15
- :class="['hy-swipe-action--left', leftClass]"
15
+ :class="['hy-swipe-action__left', leftClass]"
16
16
  @click="onClick('left')"
17
17
  >
18
18
  <slot name="left" />
@@ -22,7 +22,7 @@
22
22
  <!--内容-->
23
23
  <view
24
24
  :class="[
25
- 'hy-swipe-action--center',
25
+ 'hy-swipe-action__center',
26
26
  borderBottom && 'hy-border__bottom',
27
27
  ]"
28
28
  >
@@ -32,13 +32,13 @@
32
32
 
33
33
  <!--右侧操作-->
34
34
  <view
35
- :class="['hy-swipe-action--right', rightClass]"
35
+ :class="['hy-swipe-action__right', rightClass]"
36
36
  @click="onClick('right')"
37
37
  >
38
38
  <slot name="right">
39
- <view v-if="!slots.left" class="hy-swipe-action--right__action">
39
+ <view v-if="!slots.left" class="hy-swipe-action__right--action">
40
40
  <view
41
- class="hy-swipe-action--right__action-btn"
41
+ class="hy-swipe-action__right--action__btn"
42
42
  v-for="(item, i) in options"
43
43
  :style="item.style"
44
44
  @tap.stop="onActiveClick(item, i)"
@@ -135,8 +135,8 @@ const props = defineProps({
135
135
  beforeClose: Function,
136
136
  });
137
137
  const emit = defineEmits<ISwipeActionEmits>();
138
- const leftClass = `hy-swipe-action--left--${guid()}`;
139
- const rightClass = `hy-swipe-action--right--${guid()}`;
138
+ const leftClass = `hy-swipe-action__left--${guid()}`;
139
+ const rightClass = `hy-swipe-action__right--${guid()}`;
140
140
 
141
141
  const slots = useSlots();
142
142
  const wrapperStyle = ref<string>("");