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
@@ -4,24 +4,28 @@
4
4
  @include b(swipe-action) {
5
5
  position: relative;
6
6
  overflow: hidden;
7
- @include m(left) {
7
+
8
+ @include e(left) {
8
9
  left: 0;
9
10
  transform: translate3d(-100%, 0, 0);
10
11
  position: absolute;
11
12
  top: 0;
12
13
  height: 100%;
13
14
  }
14
- @include m(right) {
15
+
16
+ @include e(right) {
15
17
  right: 0;
16
18
  transform: translate3d(100%, 0, 0);
17
19
  position: absolute;
18
20
  top: 0;
19
21
  height: 100%;
20
- &__action {
22
+
23
+ @include m(action) {
21
24
  display: flex;
22
25
  align-items: center;
23
26
  height: 100%;
24
- &-btn {
27
+
28
+ @include e(btn) {
25
29
  padding: 0 15px;
26
30
  line-height: 46px;
27
31
  display: flex;
@@ -18,11 +18,11 @@
18
18
  </view>
19
19
  <view class="hy-swiper-indicator__wrapper" v-if="indicatorMode === 'dot'">
20
20
  <view
21
- class="hy-swiper-indicator__wrapper__dot"
21
+ class="hy-swiper-indicator__wrapper--dot"
22
22
  v-for="(item, index) in length"
23
23
  :key="index"
24
24
  :class="[
25
- index === current && 'hy-swiper-indicator__wrapper__dot--active',
25
+ index === current && 'hy-swiper-indicator__wrapper--dot__active',
26
26
  ]"
27
27
  :style="[dotStyle(index)]"
28
28
  >
@@ -31,18 +31,18 @@
31
31
  :easingFunction="easingFunction"
32
32
  >
33
33
  <swiper-item
34
- class="hy-swiper__wrapper__item"
34
+ class="hy-swiper__wrapper--item"
35
35
  v-for="(item, index) in list"
36
36
  :key="index"
37
37
  >
38
38
  <slot :record="item" :index="index">
39
39
  <view
40
- class="hy-swiper__wrapper__item__wrapper"
40
+ class="hy-swiper__wrapper--item__wrapper"
41
41
  :style="[itemStyle(index)]"
42
42
  >
43
43
  <!-- 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 -->
44
44
  <image
45
- class="hy-swiper__wrapper__item__wrapper__image"
45
+ class="hy-swiper__wrapper--item__wrapper--image"
46
46
  v-if="getItemType(item) === 'image'"
47
47
  :src="getSource(item)"
48
48
  :mode="imgMode"
@@ -53,7 +53,7 @@
53
53
  }"
54
54
  ></image>
55
55
  <video
56
- class="hy-swiper__wrapper__item__wrapper__video"
56
+ class="hy-swiper__wrapper--item__wrapper--video"
57
57
  v-if="getItemType(item) === 'video'"
58
58
  :id="`video-${index}`"
59
59
  :enable-progress-gesture="false"
@@ -68,7 +68,7 @@
68
68
  ></video>
69
69
  <view
70
70
  v-if="showTitle && hasTitle(item)"
71
- class="hy-swiper__wrapper__item__wrapper__title"
71
+ class="hy-swiper__wrapper--item__wrapper--title"
72
72
  >
73
73
  <text class="hy-line-1">{{ hasTitle(item) }}</text>
74
74
  </view>
@@ -258,7 +258,7 @@ watch(
258
258
  const hasTitle = computed(() => {
259
259
  return (item: string | Record<string, any>) => {
260
260
  if (typeof item === "object") {
261
- return item.title ?? "";
261
+ return item.title || "";
262
262
  } else {
263
263
  return "";
264
264
  }
@@ -9,14 +9,14 @@
9
9
  position: relative;
10
10
  overflow: hidden;
11
11
 
12
- &__wrapper {
12
+ @include e(wrapper) {
13
13
  flex: 1;
14
14
  background-color: $hy-background;
15
15
 
16
- &__item {
16
+ @include m(item) {
17
17
  flex: 1;
18
18
 
19
- &__wrapper {
19
+ @include e(wrapper){
20
20
  @include flex;
21
21
  position: relative;
22
22
  overflow: hidden;
@@ -24,15 +24,11 @@
24
24
  flex: 1;
25
25
 
26
26
 
27
- &__image {
28
- flex: 1;
29
- }
30
-
31
- &__video {
27
+ @include m([image, video]){
32
28
  flex: 1;
33
29
  }
34
30
 
35
- &__title {
31
+ @include m(title) {
36
32
  position: absolute;
37
33
  background-color: rgba(0, 0, 0, 0.3);
38
34
  bottom: 0;
@@ -47,7 +43,7 @@
47
43
  }
48
44
  }
49
45
 
50
- &__indicator {
46
+ @include e(indicator) {
51
47
  position: absolute;
52
48
  bottom: $hy-border-margin-padding-sm;
53
49
  }
@@ -2,16 +2,16 @@
2
2
  <view
3
3
  :class="[
4
4
  'hy-switch cursor-pointer',
5
- disabled && 'hy-switch--disabled',
6
- isActive ? 'hy-switch--active' : 'hy-switch--container',
5
+ disabled && 'hy-switch__disabled',
6
+ isActive ? 'hy-switch__active' : 'hy-switch__container',
7
7
  customClass,
8
8
  ]"
9
9
  :style="[switchStyle, customStyle]"
10
10
  @tap="clickHandler"
11
11
  >
12
- <view class="hy-switch--bg" :style="[bgStyle]"></view>
12
+ <view class="hy-switch__bg" :style="[bgStyle]"></view>
13
13
  <view
14
- :class="['hy-switch--node', modelValue && 'hy-switch__node--on']"
14
+ :class="['hy-switch__node', modelValue && 'hy-switch__node--on']"
15
15
  :style="[nodeStyle]"
16
16
  ref="hy-switch__node"
17
17
  >
@@ -1,24 +1,6 @@
1
1
  @use "../../libs/css/theme" as *;
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
- /* 暗色主题 */
5
- //@include b(theme){
6
- // @include m(dark) {
7
- // @include b(switch) {
8
- // color: $hy-dark-color;
9
- // @include m(container) {
10
- // background-color: $hy-dark-background--track;
11
- // }
12
- // @include m(node) {
13
- // background-color: $hy-dark-background--container;
14
- // }
15
- // @include m(bg) {
16
- // background-color: $hy-dark-background--track;
17
- // }
18
- // }
19
- // }
20
- //}
21
-
22
4
  @include b(switch) {
23
5
  @include flex(row);
24
6
  /* #ifndef APP-NVUE */
@@ -34,11 +16,11 @@
34
16
  // 由于weex为阿里逗着玩的KPI项目,导致bug奇多,这必须要写这一行,
35
17
  // 否则在iOS上,点击页面任意地方,都会触发switch的点击事件
36
18
  overflow: hidden;
37
- @include m(active){
19
+ @include e(active){
38
20
  background: $hy-primary;
39
21
  }
40
22
 
41
- @include m(node) {
23
+ @include e(node) {
42
24
  @include flex(row);
43
25
  align-items: center;
44
26
  justify-content: center;
@@ -50,7 +32,7 @@
50
32
  transition-timing-function: cubic-bezier(0.3, 1.05, 0.4, 1.05);
51
33
  }
52
34
 
53
- @include m(bg) {
35
+ @include e(bg) {
54
36
  position: absolute;
55
37
  border-radius: $hy-border-radius-semicircle;
56
38
  background-color: $hy-background--3;
@@ -59,7 +41,7 @@
59
41
  transition-timing-function: ease;
60
42
  }
61
43
 
62
- @include m(disabled) {
44
+ @include e(disabled) {
63
45
  opacity: 0.6;
64
46
  }
65
47
  }
@@ -2,29 +2,29 @@
2
2
  <view class="hy-tabs">
3
3
  <view class="hy-tabs__wrapper">
4
4
  <slot name="left" />
5
- <view class="hy-tabs__wrapper__scroll-view-wrapper">
5
+ <view class="hy-tabs__wrapper--scroll-view__wrapper">
6
6
  <scroll-view
7
7
  :scroll-x="scrollable"
8
8
  :scroll-left="scrollLeft"
9
9
  :scroll-with-animation="true"
10
- class="hy-tabs__wrapper__scroll-view"
10
+ class="hy-tabs__wrapper--scroll-view"
11
11
  :show-scrollbar="false"
12
- ref="hy-tabs__wrapper__scroll-view"
12
+ ref="hy-tabs__wrapper--scroll-view"
13
13
  >
14
- <view class="hy-tabs__wrapper__nav" ref="hy-tabs__wrapper__nav">
14
+ <view class="hy-tabs__wrapper--nav" ref="hy-tabs__wrapper__nav">
15
15
  <view
16
16
  v-for="(item, index) in list"
17
17
  :key="index"
18
18
  @tap="clickHandler(item, index)"
19
19
  @longpress="longPressHandler(item, index)"
20
- :ref="`u-tabs__wrapper__nav__item-${index}`"
20
+ :ref="`u-tabs__wrapper--nav__item-${index}`"
21
21
  :style="[itemStyle, { flex: scrollable ? '' : 1 }]"
22
22
  :class="[
23
- 'hy-tabs__wrapper__nav__item',
24
- `hy-tabs__wrapper__nav__item-${index}`,
25
- item.disabled && 'hy-tabs__wrapper__nav__item--disabled',
23
+ 'hy-tabs__wrapper--nav__item',
24
+ `hy-tabs__wrapper--nav__item-${index}`,
25
+ item.disabled && 'hy-tabs__wrapper--nav__item--disabled',
26
26
  innerCurrent == index
27
- ? 'hy-tabs__wrapper__nav__item--active'
27
+ ? 'hy-tabs__wrapper--nav__item--active'
28
28
  : '',
29
29
  ]"
30
30
  >
@@ -36,7 +36,7 @@
36
36
  />
37
37
  <template v-else>
38
38
  <view
39
- class="hy-tabs__wrapper__nav__item__prefix-icon"
39
+ class="hy-tabs__wrapper--nav__item--prefix-icon"
40
40
  v-if="item.icon"
41
41
  >
42
42
  <HyIcon :name="item.icon" :customStyle="iconStyle"></HyIcon>
@@ -51,10 +51,10 @@
51
51
  <text
52
52
  v-else
53
53
  :class="[
54
+ 'hy-tabs__wrapper--nav__item--text',
54
55
  item.disabled &&
55
- 'hy-tabs__wrapper__nav__item__text--disabled',
56
+ 'hy-tabs__wrapper--nav__item--text__disabled',
56
57
  ]"
57
- class="hy-tabs__wrapper__nav__item--text"
58
58
  :style="[textStyle(index)]"
59
59
  >
60
60
  {{ item[keyName] }}
@@ -102,8 +102,8 @@
102
102
  </view>
103
103
  <!-- #ifndef APP-NVUE -->
104
104
  <view
105
- class="hy-tabs__wrapper__nav__line"
106
- ref="hy-tabs__wrapper__nav__line"
105
+ class="hy-tabs__wrapper--nav__line"
106
+ ref="hy-tabs__wrapper--nav__line"
107
107
  :style="[
108
108
  {
109
109
  width: addUnit(lineWidth),
@@ -406,7 +406,7 @@ const resize = () => {
406
406
  * */
407
407
  const getTabsRect = () => {
408
408
  return new Promise((resolve) => {
409
- getRect(".hy-tabs__wrapper__scroll-view", false, instance).then((size) =>
409
+ getRect(".hy-tabs__wrapper--scroll-view", false, instance).then((size) =>
410
410
  resolve(size),
411
411
  );
412
412
  });
@@ -417,7 +417,7 @@ const getTabsRect = () => {
417
417
  const getAllItemRect = () => {
418
418
  return new Promise((resolve) => {
419
419
  const promiseAllArr = props.list.map((item, index) =>
420
- getRect(`.hy-tabs__wrapper__nav__item-${index}`, false, instance),
420
+ getRect(`.hy-tabs__wrapper--nav__item-${index}`, false, instance),
421
421
  );
422
422
  Promise.all(promiseAllArr).then((sizes) => resolve(sizes));
423
423
  });
@@ -2,27 +2,27 @@
2
2
  @use "../../libs/css/mixin.scss" as *;
3
3
 
4
4
  @include b(tabs) {
5
- &__wrapper {
5
+ @include e(wrapper) {
6
6
  @include flex;
7
7
  align-items: center;
8
8
 
9
- &__scroll-view-wrapper {
10
- flex: 1;
11
- /* #ifndef APP-NVUE */
12
- overflow: auto hidden;
13
- /* #endif */
14
- }
15
-
16
- &__scroll-view {
9
+ @include m(scroll-view) {
17
10
  @include flex;
18
11
  flex: 1;
12
+
13
+ @include e(wrapper) {
14
+ flex: 1;
15
+ /* #ifndef APP-NVUE */
16
+ overflow: auto hidden;
17
+ /* #endif */
18
+ }
19
19
  }
20
20
 
21
- &__nav {
21
+ @include m(nav) {
22
22
  @include flex;
23
23
  position: relative;
24
24
 
25
- &__item {
25
+ @include e(item) {
26
26
  height: 44px;
27
27
  padding: 0 11px;
28
28
  @include flex;
@@ -32,30 +32,30 @@
32
32
  cursor: pointer;
33
33
  /* #endif */
34
34
 
35
- &--disabled {
35
+ @include m(disabled) {
36
36
  /* #ifdef H5 */
37
37
  cursor: not-allowed;
38
38
  /* #endif */
39
39
  }
40
40
 
41
- &--active {
41
+ @include m(active) {
42
42
  .hy-tabs__wrapper__nav__item--text {
43
43
  color: $hy-text-color;
44
44
  }
45
45
  }
46
46
 
47
- &--text {
47
+ @include m(text) {
48
48
  font-size: 15px;
49
49
  color: $hy-text-color;
50
50
  white-space: nowrap;
51
51
 
52
- &--disabled {
52
+ @include e(disabled) {
53
53
  color: $hy-background--disabled !important;
54
54
  }
55
55
  }
56
56
  }
57
57
 
58
- &__line {
58
+ @include e(line) {
59
59
  height: 3px;
60
60
  background: $hy-primary;
61
61
  width: 30px;
@@ -6,7 +6,7 @@
6
6
  border-style: solid;
7
7
  @include flex;
8
8
  align-items: center;
9
- &__wrapper {
9
+ @include e(wrapper) {
10
10
  @include flex;
11
11
  position: relative;
12
12
  box-sizing: border-box;
@@ -8,12 +8,12 @@
8
8
  flex-wrap: nowrap;
9
9
  color: $hy-text-color;
10
10
 
11
- &__price {
11
+ @include e(price) {
12
12
  font-size: 14px;
13
13
  color: $hy-text-color--grey;
14
14
  }
15
15
 
16
- &__value {
16
+ @include e(value) {
17
17
  font-size: 14px;
18
18
  @include flex;
19
19
  flex-wrap: wrap;
@@ -22,7 +22,7 @@
22
22
  align-items: center;
23
23
 
24
24
  /*链接*/
25
- &--link {
25
+ @include m(link) {
26
26
  text-decoration: underline;
27
27
  color: $hy-primary;
28
28
  }
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <View
2
+ <view
3
3
  :class="['hy-textarea', customClass, textareaClass]"
4
4
  :style="[textareaStyle, borderStyle(isFocus)]"
5
5
  >
6
- <Textarea
7
- class="hy-textarea--field"
6
+ <textarea
7
+ class="hy-textarea__field"
8
8
  :value="innerValue"
9
9
  :style="{ height: autoHeight ? 'auto' : addUnit(height) }"
10
10
  :placeholder="placeholder || ''"
@@ -30,19 +30,19 @@
30
30
  @input="onInput"
31
31
  @confirm="onConfirm"
32
32
  @keyboardheightchange="onKeyboardheightchange"
33
- ></Textarea>
33
+ ></textarea>
34
34
  <!-- #ifndef MP-ALIPAY -->
35
- <Text
36
- class="hy-textarea--count"
35
+ <text
36
+ class="hy-textarea__count"
37
37
  :style="{
38
38
  'background-color': disabled ? 'transparent' : '',
39
39
  }"
40
40
  v-if="count"
41
41
  >
42
42
  {{ innerValue.length }}/{{ maxlength }}
43
- </Text>
43
+ </text>
44
44
  <!-- #endif -->
45
- </View>
45
+ </view>
46
46
  </template>
47
47
 
48
48
  <script lang="ts">
@@ -220,10 +220,10 @@ watch(
220
220
  const textareaClass = computed(() => {
221
221
  let classes: string[] = [];
222
222
  props.border === "surround" &&
223
- (classes = classes.concat(["hy-border", "hy-textarea--radius"]));
223
+ (classes = classes.concat(["hy-border", "hy-textarea__radius"]));
224
224
  props.border === "bottom" &&
225
- (classes = classes.concat(["hy-border__bottom", "hy-textarea--no-radius"]));
226
- props.disabled && classes.push("hy-textarea--disabled");
225
+ (classes = classes.concat(["hy-border__bottom", "hy-textarea__no-radius"]));
226
+ props.disabled && classes.push("hy-textarea__disabled");
227
227
  return classes.join(" ");
228
228
  });
229
229
  // 组件的样式
@@ -8,25 +8,26 @@
8
8
  flex: 1;
9
9
  padding: $hy-border-margin-padding-sm;
10
10
 
11
- @include m(field) {
11
+ @include e(field) {
12
12
  min-height: 50rpx;
13
13
  max-height: 200rpx;
14
+ color: $hy-text-color;
14
15
  }
15
16
 
16
- @include m(radius) {
17
+ @include e(radius) {
17
18
  border-radius: $hy-border-radius-sm;
18
19
  }
19
20
 
20
- @include m(no-radius) {
21
+ @include e(no-radius) {
21
22
  border-radius: $hy-border-radius-no;
22
23
  }
23
24
 
24
- @include m(disabled) {
25
+ @include e(disabled) {
25
26
  background-color: $hy-background--disabled;
26
27
  color: $hy-text-color--disabled;
27
28
  }
28
29
 
29
- @include m(field) {
30
+ @include e(field) {
30
31
  flex: 1;
31
32
  font-size: 15px;
32
33
  width: 100%;
@@ -34,7 +35,7 @@
34
35
  border: none;
35
36
  }
36
37
 
37
- @include m(count) {
38
+ @include e(count) {
38
39
  position: absolute;
39
40
  right: 5px;
40
41
  bottom: 2px;
@@ -44,7 +45,7 @@
44
45
  border-radius: $hy-border-radius-sm;
45
46
  }
46
47
  }
47
- textarea {
48
- background-color: transparent;
49
- border: none;
50
- }
48
+ //textarea {
49
+ // background-color: transparent;
50
+ // border: none;
51
+ //}
@@ -8,7 +8,7 @@
8
8
  :style="[contentStyle]"
9
9
  :class="[
10
10
  'hy-toast__content',
11
- 'hy-toast--' + tmpConfig.type,
11
+ 'hy-toast__' + tmpConfig.type,
12
12
  tmpConfig.type === 'loading' || tmpConfig.loading
13
13
  ? 'hy-toast__content--loading'
14
14
  : '',
@@ -31,8 +31,8 @@
31
31
  ></HyIcon>
32
32
  <text
33
33
  :class="[
34
- 'hy-toast__content__text',
35
- 'hy-toast__content__text--' + tmpConfig.type,
34
+ 'hy-toast__content--text',
35
+ 'hy-toast__content--text__' + tmpConfig.type,
36
36
  ]"
37
37
  style="max-width: 400rpx"
38
38
  >
@@ -139,10 +139,10 @@ const contentStyle = computed(() => {
139
139
 
140
140
  const loadingIconColor = computed(() => {
141
141
  let colorTmp = "rgb(255, 255, 255)";
142
- if (isThemeType(tmpConfig.value.type)) {
142
+ if (isThemeType(tmpConfig.value.type!)) {
143
143
  // loading-icon组件内部会对color参数进行一个透明度处理,该方法要求传入的颜色值
144
144
  // 必须为rgb格式的,所以这里做一个处理
145
- colorTmp = hexToRgb(ColorConfig[tmpConfig.value.type]) as string;
145
+ colorTmp = hexToRgb(ColorConfig[tmpConfig.value.type!]) as string;
146
146
  }
147
147
  return colorTmp;
148
148
  });
@@ -2,7 +2,7 @@
2
2
  @use "../../libs/css/theme" as *;
3
3
 
4
4
  @include b(toast){
5
- &__content {
5
+ @include e(content) {
6
6
  @include flex;
7
7
  padding: 12px 20px;
8
8
  border-radius: 4px;
@@ -14,33 +14,33 @@
14
14
  /* #endif */
15
15
  position: relative;
16
16
 
17
- &--loading {
17
+ @include m(loading) {
18
18
  flex-direction: column;
19
19
  padding: 20px;
20
20
  }
21
21
 
22
- &__text {
22
+ @include m(text) {
23
23
  color: #ffffff;
24
24
  font-size: 15px;
25
25
  line-height: 15px;
26
26
 
27
- &--default {
27
+ @include e(default) {
28
28
  color: #ffffff;
29
29
  }
30
30
 
31
- &--error {
31
+ @include e(error) {
32
32
  color: $hy-error;
33
33
  }
34
34
 
35
- &--primary {
35
+ @include e(primary) {
36
36
  color: $hy-primary;
37
37
  }
38
38
 
39
- &--success {
39
+ @include e(success) {
40
40
  color: $hy-success;
41
41
  }
42
42
 
43
- &--warning {
43
+ @include e(warning) {
44
44
  color: $hy-warning;
45
45
  }
46
46
  }