hy-app 0.3.2 → 0.3.4

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 (93) hide show
  1. package/components/hy-action-sheet/index.scss +1 -1
  2. package/components/hy-address-picker/index.scss +1 -1
  3. package/components/hy-avatar/hy-avatar.vue +10 -13
  4. package/components/hy-avatar/index.scss +2 -2
  5. package/components/hy-back-top/index.scss +2 -2
  6. package/components/hy-badge/index.scss +1 -1
  7. package/components/hy-button/index.scss +3 -3
  8. package/components/hy-calendar/header.vue +11 -11
  9. package/components/hy-calendar/index.scss +26 -26
  10. package/components/hy-calendar/month.vue +18 -19
  11. package/components/hy-card/hy-card.vue +10 -12
  12. package/components/hy-card/index.scss +12 -10
  13. package/components/hy-cell/hy-cell.vue +13 -13
  14. package/components/hy-cell/index.scss +16 -16
  15. package/components/hy-checkbox/hy-checkbox.vue +10 -10
  16. package/components/hy-checkbox/index.scss +25 -24
  17. package/components/hy-code-input/hy-code-input.vue +314 -314
  18. package/components/hy-code-input/index.scss +1 -1
  19. package/components/hy-config-provider/index.scss +3 -2
  20. package/components/hy-count-down/index.scss +1 -1
  21. package/components/hy-count-to/index.scss +1 -1
  22. package/components/hy-divider/index.scss +1 -1
  23. package/components/hy-dropdown/index.scss +1 -1
  24. package/components/hy-dropdown-item/index.scss +1 -1
  25. package/components/hy-empty/hy-empty.vue +15 -12
  26. package/components/hy-empty/icon.ts +32 -58
  27. package/components/hy-empty/index.scss +3 -3
  28. package/components/hy-empty/typing.d.ts +48 -35
  29. package/components/hy-float-button/index.scss +1 -1
  30. package/components/hy-folding-panel/index.scss +1 -1
  31. package/components/hy-form/hy-form.vue +3 -2
  32. package/components/hy-form-group/index.scss +1 -1
  33. package/components/hy-form-item/index.scss +41 -41
  34. package/components/hy-grid/index.scss +1 -1
  35. package/components/hy-icon/index.scss +1 -1
  36. package/components/hy-image/index.scss +1 -1
  37. package/components/hy-input/hy-input.vue +2 -2
  38. package/components/hy-input/index.scss +1 -1
  39. package/components/hy-line/index.scss +1 -1
  40. package/components/hy-line-progress/index.scss +1 -1
  41. package/components/hy-list/index.scss +1 -1
  42. package/components/hy-loading/index.scss +1 -1
  43. package/components/hy-menu/index.scss +1 -1
  44. package/components/hy-modal/index.scss +1 -1
  45. package/components/hy-navbar/index.scss +1 -1
  46. package/components/hy-notice-bar/hy-column-notice.vue +2 -2
  47. package/components/hy-notice-bar/hy-row-notice.vue +1 -1
  48. package/components/hy-notice-bar/index.scss +7 -1
  49. package/components/hy-notify/index.scss +1 -1
  50. package/components/hy-number-step/index.scss +1 -1
  51. package/components/hy-overlay/index.scss +1 -1
  52. package/components/hy-pagination/index.scss +1 -1
  53. package/components/hy-picker/index.scss +1 -1
  54. package/components/hy-popover/index.scss +4 -4
  55. package/components/hy-popup/index.scss +1 -1
  56. package/components/hy-price/index.scss +1 -1
  57. package/components/hy-qrcode/index.scss +1 -1
  58. package/components/hy-radio/index.scss +1 -1
  59. package/components/hy-read-more/index.scss +1 -1
  60. package/components/hy-scroll-list/index.scss +1 -1
  61. package/components/hy-search/hy-search.vue +2 -9
  62. package/components/hy-search/index.scss +1 -1
  63. package/components/hy-signature/index.scss +1 -1
  64. package/components/hy-slider/hy-slider.vue +1 -1
  65. package/components/hy-slider/index.scss +1 -1
  66. package/components/hy-steps/index.scss +1 -1
  67. package/components/hy-submit-bar/index.scss +1 -1
  68. package/components/hy-subsection/index.scss +1 -1
  69. package/components/hy-swipe-action/index.scss +1 -1
  70. package/components/hy-swiper/index.scss +1 -1
  71. package/components/hy-switch/index.scss +1 -1
  72. package/components/hy-tabBar/index.scss +1 -1
  73. package/components/hy-tabs/index.scss +1 -1
  74. package/components/hy-tag/hy-tag.vue +2 -2
  75. package/components/hy-tag/index.scss +14 -13
  76. package/components/hy-text/index.scss +1 -1
  77. package/components/hy-textarea/index.scss +7 -1
  78. package/components/hy-toast/index.scss +1 -1
  79. package/components/hy-tooltip/index.scss +1 -1
  80. package/components/hy-upload/hy-upload.vue +5 -12
  81. package/components/hy-upload/index.scss +1 -1
  82. package/components/hy-upload/typing.d.ts +21 -0
  83. package/components/hy-warn/index.scss +1 -1
  84. package/components/hy-watermark/index.scss +1 -1
  85. package/index.scss +3 -2
  86. package/libs/css/common.scss +1 -1
  87. package/libs/css/mixin.scss +16 -13
  88. package/{theme.scss → libs/css/theme.scss} +2 -0
  89. package/libs/css/{vars.css → vars.scss} +2 -0
  90. package/package.json +6 -3
  91. package/typing/modules/common.d.ts +2 -0
  92. package/web-types.json +1 -1
  93. package/components/avatar.zip +0 -0
@@ -10,7 +10,7 @@
10
10
  </slot>
11
11
  </view>
12
12
  <view
13
- class="hy-cell__body"
13
+ class="hy-cell--body"
14
14
  :style="{ 'border-radius': addUnit(borderRadius) }"
15
15
  >
16
16
  <!-- @slot 整体插槽 -->
@@ -26,10 +26,10 @@
26
26
  }"
27
27
  @tap="clickHandler($event, item, i)"
28
28
  >
29
- <view class="hy-cell__body--container__content">
29
+ <view class="hy-cell--body__container__content">
30
30
  <view
31
31
  v-if="item?.icon?.name || $slots.icon"
32
- class="hy-cell__body--container__content-icon"
32
+ class="hy-cell--body__container__content-icon"
33
33
  >
34
34
  <!-- @slot 图标插槽 -->
35
35
  <slot name="icon" :icon="item?.icon">
@@ -51,12 +51,12 @@
51
51
  ></HyIcon>
52
52
  </slot>
53
53
  </view>
54
- <view class="hy-cell__body--container__content-title">
54
+ <view class="hy-cell--body__container__content-title">
55
55
  <!-- 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 -->
56
56
  <!-- @slot 列表标题插槽 -->
57
57
  <slot name="cell-title" :title="item?.title">
58
58
  <text
59
- class="hy-cell__body--container__content-title--text"
59
+ class="hy-cell--body__container__content-title--text"
60
60
  :class="[
61
61
  (disabled || item?.disabled) && 'hy-cell--disabled',
62
62
  ]"
@@ -67,7 +67,7 @@
67
67
  <!-- @slot 列表小标题插槽 -->
68
68
  <slot name="sub" v-if="item?.subhead" :sub="item.subhead">
69
69
  <text
70
- class="hy-cell__body--container__content-title--sub"
70
+ class="hy-cell--body__container__content-title--sub"
71
71
  :class="[disabled && 'hy-cell--disabled']"
72
72
  >
73
73
  {{ item.subhead }}
@@ -76,7 +76,7 @@
76
76
  </view>
77
77
  </view>
78
78
  <view
79
- class="hy-cell__body--container__center"
79
+ class="hy-cell--body__container__center"
80
80
  :style="{
81
81
  justifyContent:
82
82
  arrange === 'left'
@@ -89,7 +89,7 @@
89
89
  <!-- @slot 值内容插槽 -->
90
90
  <slot name="value" :record="item">
91
91
  <text
92
- class="hy-cell__body--container__center__value"
92
+ class="hy-cell--body__container__center__value"
93
93
  :class="[disabled && 'hy-cell--disabled']"
94
94
  v-if="value || item?.value"
95
95
  >
@@ -98,9 +98,9 @@
98
98
  </slot>
99
99
  </view>
100
100
  <view
101
- class="hy-cell__body--container__right-icon"
101
+ class="hy-cell--body__container__right-icon"
102
102
  :class="[
103
- `hy-cell__body--container__right-icon--${item?.arrowDirection || arrowDirection}`,
103
+ `hy-cell--body__container__right-icon--${item?.arrowDirection || arrowDirection}`,
104
104
  ]"
105
105
  >
106
106
  <!-- @slot 右边按钮插槽 -->
@@ -246,7 +246,7 @@ const containerClass = computed(() => {
246
246
  !props.disabled &&
247
247
  !temp?.disabled &&
248
248
  props.clickable &&
249
- "hy-cell__body--container__clickable",
249
+ "hy-cell--body__container__clickable",
250
250
  ]
251
251
  .filter(Boolean)
252
252
  .join();
@@ -254,8 +254,8 @@ const containerClass = computed(() => {
254
254
  });
255
255
  const ItemClass = computed(() => {
256
256
  return [
257
- "hy-cell__body--container",
258
- `hy-cell__body--container__${props.size}`,
257
+ "hy-cell--body__container",
258
+ `hy-cell--body__container__${props.size}`,
259
259
  ];
260
260
  });
261
261
 
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
- @use "../../theme.scss" as *;
2
+ @use "../../libs/css/theme" as *;
3
3
 
4
4
 
5
5
  @include b(cell) {
@@ -8,7 +8,7 @@
8
8
  /*标题*/
9
9
  @include m(title) {
10
10
  padding: $hy-border-margin-padding-lg $hy-border-margin-padding-base;
11
- &__vertical {
11
+ @include e(vertical){
12
12
  position: relative;
13
13
  &::after {
14
14
  content: "";
@@ -22,13 +22,13 @@
22
22
  border-radius: $hy-border-radius-semicircle;
23
23
  }
24
24
  }
25
- &__text {
25
+ @include e(text) {
26
26
  font-size: $hy-font-size-lg;
27
27
  }
28
28
  }
29
29
 
30
30
  /*row内容*/
31
- &__body {
31
+ @include m(body) {
32
32
  /* #ifndef APP-NVUE */
33
33
  box-sizing: border-box;
34
34
  /* #endif */
@@ -37,7 +37,7 @@
37
37
  border-radius: $hy-border-margin-padding-sm;
38
38
  overflow: hidden;
39
39
 
40
- &--container {
40
+ @include e(container) {
41
41
  @include flex(row);
42
42
  align-items: center;
43
43
  justify-content: space-between;
@@ -45,32 +45,32 @@
45
45
  background-color: $hy-background--container;
46
46
 
47
47
  /* 大 */
48
- &__large {
48
+ @include e(large) {
49
49
  font-size: $hy-font-size-lg;
50
50
  padding: 35rpx;
51
51
  line-height: 25px;
52
52
  }
53
53
 
54
54
  /* 默认 */
55
- &__medium {
55
+ @include e(medium) {
56
56
  font-size: $hy-font-size-base;
57
57
  padding: 30rpx;
58
58
  line-height: 20px;
59
59
  }
60
60
 
61
61
  /* 小 */
62
- &__small {
62
+ @include e(small) {
63
63
  font-size: $hy-font-size-sm;
64
64
  padding: 25rpx;
65
65
  line-height: 15px;
66
66
  }
67
67
 
68
68
  /*点击状态*/
69
- &__clickable {
69
+ @include e(clickable) {
70
70
  background-color: $hy-background--hover;
71
71
  }
72
72
 
73
- &__content {
73
+ @include e(content) {
74
74
  @include flex(row);
75
75
  /*左边icon*/
76
76
  &-icon {
@@ -94,11 +94,11 @@
94
94
  }
95
95
 
96
96
  /*cell值*/
97
- &__center {
97
+ @include e(center) {
98
98
  @include flex;
99
99
  max-width: 90%;
100
100
  flex: 1;
101
- &__value {
101
+ @include e(value) {
102
102
  line-height: 24px;
103
103
  color: $hy-text-color--grey;
104
104
  margin-right: $hy-border-margin-padding-sm;
@@ -106,21 +106,21 @@
106
106
  }
107
107
 
108
108
  /*右边icon*/
109
- &__right-icon {
109
+ @include e(right-icon) {
110
110
  transition: transform 0.3s;
111
111
  :deep(.hy-icon) {
112
112
  color: $hy-text-color--3;
113
113
  }
114
114
 
115
- &--up {
115
+ @include m(up) {
116
116
  transform: rotate(-90deg);
117
117
  }
118
118
 
119
- &--left {
119
+ @include m(left) {
120
120
  transform: rotate(180deg);
121
121
  }
122
122
 
123
- &--down {
123
+ @include m(down) {
124
124
  transform: rotate(90deg);
125
125
  }
126
126
  }
@@ -1,17 +1,17 @@
1
1
  <template>
2
- <view class="hy-checkbox-group" :class="bemClass">
2
+ <view class="hy-checkbox--group" :class="bemClass">
3
3
  <template v-for="(item, i) in columns_1" :key="i">
4
4
  <view
5
5
  class="hy-checkbox cursor-pointer"
6
6
  @tap.stop="wrapperClickHandler($event, item)"
7
7
  :style="checkboxStyle"
8
8
  :class="[
9
- `hy-checkbox-label--${iconPlacement}`,
9
+ `hy-checkbox--label__${iconPlacement}`,
10
10
  borderBottom && placement === 'column' && 'hy-border__bottom',
11
11
  ]"
12
12
  >
13
13
  <view
14
- class="hy-checkbox__icon-wrap cursor-pointer"
14
+ class="hy-checkbox--icon-wrap cursor-pointer"
15
15
  @tap.stop="iconClickHandler($event, item)"
16
16
  :class="iconClasses(item)"
17
17
  :style="iconWrapStyle(item)"
@@ -22,7 +22,7 @@
22
22
  :iconSize="addUnit(iconSize)"
23
23
  >
24
24
  <HyIcon
25
- class="hy-checkbox__icon-wrap__icon"
25
+ class="hy-checkbox--icon-wrap__icon"
26
26
  :name="IconConfig.CHECK_MASK"
27
27
  :size="addUnit(sizeType[size] ?? iconSize)"
28
28
  :color="iconColor || '#ffffff'"
@@ -31,9 +31,9 @@
31
31
  </view>
32
32
  <view
33
33
  :class="[
34
- 'hy-checkbox__label-wrap',
34
+ 'hy-checkbox--label__wrap',
35
35
  'cursor-pointer',
36
- disabled && 'hy-checkbox__label-wrap--disabled',
36
+ disabled && 'hy-checkbox--label__wrap--disabled',
37
37
  ]"
38
38
  @tap.stop="labelClickHandler($event, item)"
39
39
  >
@@ -229,14 +229,14 @@ const iconClasses = computed(() => {
229
229
  return (temp: CheckboxColumnsVo): string[] => {
230
230
  let classes: string[] = [];
231
231
  // 组件的形状
232
- classes.push("hy-checkbox__icon-wrap--" + props.shape);
232
+ classes.push("hy-checkbox--icon-wrap--" + props.shape);
233
233
  if (isDisabled(temp?.disabled)) {
234
- classes.push("hy-checkbox__icon-wrap--disabled");
234
+ classes.push("hy-checkbox--icon-wrap--disabled");
235
235
  }
236
236
  if (temp[props.fieldNames.checked]) {
237
- classes.push("hy-checkbox__icon-wrap--checked");
237
+ classes.push("hy-checkbox--icon-wrap--checked");
238
238
  if (isDisabled(temp?.disabled)) {
239
- classes.push("hy-checkbox__icon-wrap--disabled--checked");
239
+ classes.push("hy-checkbox--icon-wrap--disabled--checked");
240
240
  }
241
241
  }
242
242
  return classes;
@@ -1,5 +1,5 @@
1
1
  @use "../../libs/css/mixin.scss" as *;
2
- @use "../../theme.scss" as *;
2
+ @use "../../libs/css/theme" as *;
3
3
 
4
4
  @include b(checkbox) {
5
5
  /* #ifndef APP-NVUE */
@@ -11,29 +11,42 @@
11
11
  margin-bottom: 5px;
12
12
  margin-top: 5px;
13
13
 
14
- &-group {
15
- &--row {
14
+ @include m(group) {
15
+ @include m(row) {
16
16
  /* #ifndef APP-NVUE */
17
17
  display: flex;
18
18
  /* #endif */
19
19
  flex-flow: row wrap;
20
20
  }
21
21
 
22
- &--column {
22
+ @include m(column) {
23
23
  @include flex(column);
24
24
  }
25
25
  }
26
26
 
27
- &-label--left {
28
- flex-direction: row;
29
- }
27
+ @include m(label) {
28
+ @include e(left) {
29
+ flex-direction: row;
30
+ }
31
+ @include e(right) {
32
+ flex-direction: row-reverse;
33
+ justify-content: space-between;
34
+ }
35
+
36
+ @include e(wrap){
37
+ /* #ifndef APP-NVUE */
38
+ word-wrap: break-word;
39
+ /* #endif */
40
+ font-size: $hy-font-size-base;
41
+ margin-right: $hy-border-margin-padding-sm;
30
42
 
31
- &-label--right {
32
- flex-direction: row-reverse;
33
- justify-content: space-between;
43
+ @include m(disabled) {
44
+ color: $hy-text-color--disabled;
45
+ }
46
+ }
34
47
  }
35
48
 
36
- &__icon-wrap {
49
+ @include m(icon-wrap) {
37
50
  /* #ifndef APP-NVUE */
38
51
  box-sizing: border-box;
39
52
  // nvue下,border-color过渡有问题
@@ -50,7 +63,7 @@
50
63
 
51
64
  /* #ifdef MP-TOUTIAO */
52
65
  // 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
53
- &__icon {
66
+ @include e(icon) {
54
67
  line-height: 0;
55
68
  }
56
69
 
@@ -86,16 +99,4 @@
86
99
  }
87
100
  }
88
101
  }
89
-
90
- &__label-wrap {
91
- /* #ifndef APP-NVUE */
92
- word-wrap: break-word;
93
- /* #endif */
94
- font-size: $hy-font-size-base;
95
- margin-right: $hy-border-margin-padding-sm;
96
-
97
- @include m(disabled) {
98
- color: $hy-text-color--disabled;
99
- }
100
- }
101
102
  }