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,137 +5,144 @@
5
5
  v-if="title || $slots['title']"
6
6
  >
7
7
  <!-- @slot 标题插槽 -->
8
- <slot name="title" :title="title">
9
- <text class="hy-cell--title__text">{{ title }}</text>
10
- </slot>
8
+ <slot v-if="$slots.title" name="title" :title="title"></slot>
9
+ <text v-else class="hy-cell--title__text">{{ title }}</text>
11
10
  </view>
12
11
  <view
13
- class="hy-cell--body"
12
+ class="hy-cell__body"
14
13
  :style="{ 'border-radius': addUnit(borderRadius) }"
15
14
  >
16
15
  <!-- @slot 整体插槽 -->
17
- <slot>
18
- <template v-for="(item, i) in list" :key="i">
19
- <view
20
- :class="ItemClass"
21
- :hover-class="containerClass(item)"
22
- :hover-stay-time="250"
23
- :style="{
24
- borderBottom:
25
- border && i !== list.length - 1 ? '1rpx solid #c8c7cc66' : '',
26
- }"
27
- @tap="clickHandler($event, item, i)"
28
- >
29
- <view class="hy-cell--body__container__content">
30
- <view
31
- v-if="item?.icon?.name || $slots.icon"
32
- class="hy-cell--body__container__content-icon"
33
- >
34
- <!-- @slot 图标插槽 -->
35
- <slot name="icon" :icon="item?.icon">
36
- <HyIcon
37
- :size="iconSize"
38
- :name="item?.icon?.name"
39
- :color="
40
- disabled || item?.disabled ? '#c0c0c0' : item?.icon?.color
41
- "
42
- :bold="item?.icon?.bold"
43
- :customPrefix="item?.icon?.customPrefix"
44
- :imgMode="item?.icon?.imgMode"
45
- :width="item?.icon?.width"
46
- :height="item?.icon?.height"
47
- :top="item?.icon?.top"
48
- :stop="item?.icon?.stop"
49
- :round="item?.icon?.round"
50
- :customStyle="item?.icon?.customStyle"
51
- ></HyIcon>
52
- </slot>
53
- </view>
54
- <view class="hy-cell--body__container__content-title">
55
- <!-- 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 -->
56
- <!-- @slot 列表标题插槽 -->
57
- <slot name="cell-title" :title="item?.title">
58
- <text
59
- class="hy-cell--body__container__content-title--text"
60
- :class="[
61
- (disabled || item?.disabled) && 'hy-cell--disabled',
62
- ]"
63
- >
64
- {{ item?.title }}
65
- </text>
66
- </slot>
67
- <!-- @slot 列表小标题插槽 -->
68
- <slot name="sub" v-if="item?.subhead" :sub="item.subhead">
69
- <text
70
- class="hy-cell--body__container__content-title--sub"
71
- :class="[disabled && 'hy-cell--disabled']"
72
- >
73
- {{ item.subhead }}
74
- </text>
75
- </slot>
76
- </view>
77
- </view>
16
+ <slot v-if="$slots.default"></slot>
17
+ <template v-else v-for="(item, i) in list" :key="i">
18
+ <view
19
+ :class="ItemClass"
20
+ :hover-class="containerClass(item)"
21
+ :hover-stay-time="250"
22
+ :style="{
23
+ borderBottom:
24
+ border && i !== list.length - 1 ? '1rpx solid #c8c7cc66' : '',
25
+ }"
26
+ @tap="clickHandler($event, item, i)"
27
+ >
28
+ <view class="hy-cell__body--container__content">
78
29
  <view
79
- class="hy-cell--body__container__center"
80
- :style="{
81
- justifyContent:
82
- arrange === 'left'
83
- ? 'flex-start'
84
- : arrange === 'right'
85
- ? 'flex-end'
86
- : 'center',
87
- }"
30
+ v-if="item?.icon?.name || $slots.icon"
31
+ class="hy-cell__body--container__content--icon"
88
32
  >
89
- <!-- @slot 值内容插槽 -->
90
- <slot name="value" :record="item">
33
+ <!-- @slot 图标插槽 -->
34
+ <slot v-if="$slots.icon" name="icon" :icon="item?.icon"></slot>
35
+ <HyIcon
36
+ v-else
37
+ :size="iconSize"
38
+ :name="item?.icon?.name"
39
+ :color="
40
+ disabled || item?.disabled ? '#c0c0c0' : item?.icon?.color
41
+ "
42
+ :bold="item?.icon?.bold"
43
+ :customPrefix="item?.icon?.customPrefix"
44
+ :imgMode="item?.icon?.imgMode"
45
+ :width="item?.icon?.width"
46
+ :height="item?.icon?.height"
47
+ :top="item?.icon?.top"
48
+ :stop="item?.icon?.stop"
49
+ :round="item?.icon?.round"
50
+ :customStyle="item?.icon?.customStyle"
51
+ ></HyIcon>
52
+ </view>
53
+ <view class="hy-cell__body--container__content--title">
54
+ <!-- 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 -->
55
+ <!-- @slot 列表标题插槽 -->
56
+ <slot
57
+ v-if="$slots['cell-title']"
58
+ name="cell-title"
59
+ :title="item?.title"
60
+ ></slot>
61
+ <text
62
+ v-else
63
+ class="hy-cell__body--container__content--title__text"
64
+ :class="[(disabled || item?.disabled) && 'hy-cell__disabled']"
65
+ >
66
+ {{ item?.title }}
67
+ </text>
68
+ <!-- @slot 列表小标题插槽 -->
69
+ <template v-if="item?.subhead">
70
+ <slot v-if="$slots.sub" name="sub" :sub="item.subhead"></slot>
91
71
  <text
92
- class="hy-cell--body__container__center__value"
93
- :class="[disabled && 'hy-cell--disabled']"
94
- v-if="value || item?.value"
72
+ v-else
73
+ class="hy-cell__body--container__content--title__sub"
74
+ :class="[disabled && 'hy-cell__disabled']"
95
75
  >
96
- {{ item.value || value }}
76
+ {{ item.subhead }}
97
77
  </text>
98
- </slot>
78
+ </template>
99
79
  </view>
100
- <view
101
- class="hy-cell--body__container__right-icon"
80
+ </view>
81
+ <view
82
+ class="hy-cell__body--container__center"
83
+ :style="{
84
+ justifyContent:
85
+ arrange === 'left'
86
+ ? 'flex-start'
87
+ : arrange === 'right'
88
+ ? 'flex-end'
89
+ : 'center',
90
+ }"
91
+ >
92
+ <!-- @slot 值内容插槽 -->
93
+ <slot v-if="$slots.value" name="value" :record="item"></slot>
94
+ <text
95
+ v-else-if="value || item?.value"
102
96
  :class="[
103
- `hy-cell--body__container__right-icon--${item?.arrowDirection || arrowDirection}`,
97
+ 'hy-cell__body__container__center--value',
98
+ disabled && 'hy-cell--disabled',
104
99
  ]"
105
100
  >
106
- <!-- @slot 右边按钮插槽 -->
107
- <slot name="right-icon" :icon="item?.rightIcon || rightIcon">
108
- <HyIcon
109
- :name="
110
- item?.rightIcon?.name || rightIcon?.name || IconConfig.RIGHT
111
- "
112
- :color="
113
- disabled || item?.disabled
114
- ? '#c0c0c0'
115
- : item?.rightIcon?.color || rightIcon?.color
116
- "
117
- :bold="item?.rightIcon?.bold || rightIcon?.bold"
118
- :customPrefix="
119
- item?.rightIcon?.customPrefix || rightIcon?.customPrefix
120
- "
121
- :imgMode="item?.rightIcon?.imgMode || rightIcon?.imgMode"
122
- :width="item?.rightIcon?.width || rightIcon?.width"
123
- :height="item?.rightIcon?.height || rightIcon?.height"
124
- :top="item?.rightIcon?.top || rightIcon?.name"
125
- :stop="item?.rightIcon?.stop || rightIcon?.stop"
126
- :round="item?.rightIcon?.round || rightIcon?.round"
127
- :customStyle="
128
- item?.rightIcon?.customStyle || rightIcon?.customStyle
129
- "
130
- ></HyIcon>
131
- </slot>
132
- </view>
101
+ {{ item.value || value }}
102
+ </text>
103
+ </view>
104
+ <view
105
+ class="hy-cell__body--container__right-icon"
106
+ :class="[
107
+ `hy-cell__body--container__right-icon--${item?.arrowDirection || arrowDirection}`,
108
+ ]"
109
+ >
110
+ <!-- @slot 右边按钮插槽 -->
111
+ <slot
112
+ v-if="$slots['right-icon']"
113
+ name="right-icon"
114
+ :icon="item?.rightIcon || rightIcon"
115
+ ></slot>
116
+ <HyIcon
117
+ v-else
118
+ :name="
119
+ item?.rightIcon?.name || rightIcon?.name || IconConfig.RIGHT
120
+ "
121
+ :color="
122
+ disabled || item?.disabled
123
+ ? '#c0c0c0'
124
+ : item?.rightIcon?.color || rightIcon?.color
125
+ "
126
+ :bold="item?.rightIcon?.bold || rightIcon?.bold"
127
+ :customPrefix="
128
+ item?.rightIcon?.customPrefix || rightIcon?.customPrefix
129
+ "
130
+ :imgMode="item?.rightIcon?.imgMode || rightIcon?.imgMode"
131
+ :width="item?.rightIcon?.width || rightIcon?.width"
132
+ :height="item?.rightIcon?.height || rightIcon?.height"
133
+ :top="item?.rightIcon?.top || rightIcon?.name"
134
+ :stop="item?.rightIcon?.stop || rightIcon?.stop"
135
+ :round="item?.rightIcon?.round || rightIcon?.round"
136
+ :customStyle="
137
+ item?.rightIcon?.customStyle || rightIcon?.customStyle
138
+ "
139
+ ></HyIcon>
133
140
  </view>
141
+ </view>
134
142
 
135
- <!-- @slot 底部插槽 -->
136
- <slot name="bottom" :record="item" />
137
- </template>
138
- </slot>
143
+ <!-- @slot 底部插槽 -->
144
+ <slot name="bottom" :record="item" />
145
+ </template>
139
146
  </view>
140
147
  </view>
141
148
  </template>
@@ -246,7 +253,7 @@ const containerClass = computed(() => {
246
253
  !props.disabled &&
247
254
  !temp?.disabled &&
248
255
  props.clickable &&
249
- "hy-cell--body__container__clickable",
256
+ "hy-cell__body--container__clickable",
250
257
  ]
251
258
  .filter(Boolean)
252
259
  .join();
@@ -254,8 +261,8 @@ const containerClass = computed(() => {
254
261
  });
255
262
  const ItemClass = computed(() => {
256
263
  return [
257
- "hy-cell--body__container",
258
- `hy-cell--body__container__${props.size}`,
264
+ "hy-cell__body--container",
265
+ `hy-cell__body--container__${props.size}`,
259
266
  ];
260
267
  });
261
268
 
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  /*row内容*/
31
- @include m(body) {
31
+ @include e(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
- @include e(container) {
40
+ @include m(container) {
41
41
  @include flex(row);
42
42
  align-items: center;
43
43
  justify-content: space-between;
@@ -73,20 +73,20 @@
73
73
  @include e(content) {
74
74
  @include flex(row);
75
75
  /*左边icon*/
76
- &-icon {
76
+ @include m(icon) {
77
77
  @include flex;
78
78
  align-items: center;
79
79
  margin-right: 10px;
80
80
  }
81
81
  /*行头部*/
82
- &-title {
82
+ @include m(title) {
83
83
  margin-right: $hy-border-margin-padding-sm;
84
84
  flex: 33rpx;
85
85
  display: flex;
86
86
  flex-direction: column;
87
87
 
88
88
  /*sub值*/
89
- &--sub {
89
+ @include e(sub) {
90
90
  margin-top: $hy-border-margin-padding-sm;
91
91
  color: $hy-text-color--grey;
92
92
  }
@@ -98,7 +98,7 @@
98
98
  @include flex;
99
99
  max-width: 90%;
100
100
  flex: 1;
101
- @include e(value) {
101
+ @include m(value) {
102
102
  line-height: 24px;
103
103
  color: $hy-text-color--grey;
104
104
  margin-right: $hy-border-margin-padding-sm;
@@ -127,7 +127,7 @@
127
127
  }
128
128
  }
129
129
 
130
- @include m(disabled) {
130
+ @include e(disabled) {
131
131
  color: $hy-text-color--disabled;
132
132
  /* #ifndef APP-NVUE */
133
133
  cursor: not-allowed;
@@ -11,23 +11,26 @@
11
11
  ]"
12
12
  >
13
13
  <view
14
- class="hy-checkbox--icon-wrap cursor-pointer"
15
14
  @tap.stop="iconClickHandler($event, item)"
16
15
  :class="iconClasses(item)"
17
16
  :style="iconWrapStyle(item)"
18
17
  >
19
- <slot
20
- name="icon"
21
- :iconColor="iconColor"
22
- :iconSize="addUnit(iconSize)"
23
- >
18
+ <template v-if="item[fieldNames.checked]">
19
+ <slot
20
+ v-if="$slots.icon"
21
+ name="icon"
22
+ :iconColor="iconColor"
23
+ :iconSize="addUnit(iconSize)"
24
+ >
25
+ </slot>
24
26
  <HyIcon
27
+ v-else
25
28
  class="hy-checkbox--icon-wrap__icon"
26
29
  :name="IconConfig.CHECK_MASK"
27
- :size="addUnit(sizeType[size] ?? iconSize)"
30
+ :size="addUnit(sizeType[size] || iconSize)"
28
31
  :color="iconColor || '#ffffff'"
29
32
  />
30
- </slot>
33
+ </template>
31
34
  </view>
32
35
  <view
33
36
  :class="[
@@ -41,7 +44,7 @@
41
44
  <text
42
45
  :style="{
43
46
  color: labelColor,
44
- fontSize: addUnit(sizeType[size] ?? labelSize),
47
+ fontSize: addUnit(sizeType[size] || labelSize),
45
48
  }"
46
49
  >
47
50
  {{ item[fieldNames.label] }}
@@ -178,7 +181,7 @@ const columns_1 = ref();
178
181
  const sizeType: AnyObject = reactive({
179
182
  small: 14,
180
183
  medium: 18,
181
- large: 22,
184
+ large: 24,
182
185
  });
183
186
 
184
187
  watch(
@@ -227,7 +230,7 @@ const bemClass = computed(() => {
227
230
  * */
228
231
  const iconClasses = computed(() => {
229
232
  return (temp: CheckboxColumnsVo): string[] => {
230
- let classes: string[] = [];
233
+ let classes: string[] = ["hy-checkbox--icon-wrap", "cursor-pointer"];
231
234
  // 组件的形状
232
235
  classes.push("hy-checkbox--icon-wrap--" + props.shape);
233
236
  if (isDisabled(temp?.disabled)) {
@@ -253,15 +256,13 @@ const iconWrapStyle = computed(() => {
253
256
  style.backgroundColor =
254
257
  temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
255
258
  ? props.activeColor
256
- : !isDisabled(temp?.disabled)
257
- ? "#ffffff"
258
- : "";
259
+ : "";
259
260
  style.borderColor =
260
261
  temp[props.fieldNames.checked] && !isDisabled(temp?.disabled)
261
262
  ? props.activeColor
262
263
  : props.inactiveColor;
263
- style.width = addUnit(sizeType[props.size] ?? props.size);
264
- style.height = addUnit(sizeType[props.size] ?? props.size);
264
+ style.width = addUnit(sizeType[props.size] || props.size);
265
+ style.height = addUnit(sizeType[props.size] || props.size);
265
266
  return style;
266
267
  };
267
268
  });
@@ -90,7 +90,7 @@
90
90
  }
91
91
  }
92
92
 
93
- @include m([disabled--checked]){
93
+ @include m(disabled--checked){
94
94
  background-color: $hy-primary;
95
95
  border-color: $hy-primary;
96
96
  opacity: 0.5;
@@ -11,24 +11,25 @@
11
11
  ]"
12
12
  >
13
13
  <view
14
- class="hy-checkbox--icon-wrap cursor-pointer"
15
14
  @tap.stop="iconClickHandler"
16
15
  :class="iconClasses"
17
16
  :style="iconWrapStyle"
18
17
  >
19
- <slot name="icon">
18
+ <template v-if="isChecked">
19
+ <slot v-if="$slots.icon" name="icon"></slot>
20
20
  <HyIcon
21
+ v-else
21
22
  class="hy-checkbox--icon-wrap__icon"
22
23
  :name="IconConfig.CHECK_MASK"
23
24
  :size="
24
25
  addUnit(
25
- sizeType[checkboxGroup?.size?.value] ??
26
+ sizeType[checkboxGroup?.size?.value] ||
26
27
  checkboxGroup?.iconSize?.value,
27
28
  )
28
29
  "
29
30
  :color="checkboxGroup?.iconColor?.value || '#ffffff'"
30
31
  />
31
- </slot>
32
+ </template>
32
33
  </view>
33
34
  <view
34
35
  :class="[
@@ -43,7 +44,7 @@
43
44
  :style="{
44
45
  color: checkboxGroup?.labelColor?.value,
45
46
  fontSize: addUnit(
46
- sizeType[checkboxGroup?.size?.value] ??
47
+ sizeType[checkboxGroup?.size?.value] ||
47
48
  checkboxGroup?.labelSize?.value,
48
49
  ),
49
50
  }"
@@ -110,7 +111,7 @@ const isChecked = ref(false);
110
111
  const sizeType: AnyObject = reactive({
111
112
  small: 14,
112
113
  medium: 18,
113
- large: 22,
114
+ large: 24,
114
115
  });
115
116
 
116
117
  watch(
@@ -160,7 +161,7 @@ const checkboxStyle = computed(() => {
160
161
  * @description 定义icon的Class类名
161
162
  * */
162
163
  const iconClasses = computed(() => {
163
- let classes: string[] = [];
164
+ let classes: string[] = ["hy-checkbox--icon-wrap", "cursor-pointer"];
164
165
  // 组件的形状
165
166
  classes.push("hy-checkbox--icon-wrap--" + checkboxGroup?.shape?.value);
166
167
  if (isDisabled()) {
@@ -179,29 +180,23 @@ const iconClasses = computed(() => {
179
180
  * @description 定义icon的样式
180
181
  * */
181
182
  const iconWrapStyle = computed(() => {
182
- return (): CSSProperties => {
183
- // checkbox的整体样式
184
- const style: CSSProperties = {};
185
- style.backgroundColor =
186
- isChecked.value && !isDisabled()
187
- ? checkboxGroup?.activeColor?.value
188
- : !isDisabled()
189
- ? "#ffffff"
190
- : "";
191
- style.borderColor =
192
- isChecked.value && !isDisabled()
193
- ? checkboxGroup?.activeColor?.value
194
- : checkboxGroup?.inactiveColor?.value;
195
- if (checkboxGroup?.size?.value) {
196
- style.width = addUnit(
197
- sizeType[checkboxGroup.size.value] ?? checkboxGroup.size.value,
198
- );
199
- style.height = addUnit(
200
- sizeType[checkboxGroup.size.value] ?? checkboxGroup.size.value,
201
- );
202
- }
203
- return style;
204
- };
183
+ // checkbox的整体样式
184
+ const style: CSSProperties = {};
185
+ style.backgroundColor =
186
+ isChecked.value && !isDisabled() ? checkboxGroup?.activeColor?.value : "";
187
+ style.borderColor =
188
+ isChecked.value && !isDisabled()
189
+ ? checkboxGroup?.activeColor?.value
190
+ : checkboxGroup?.inactiveColor?.value;
191
+ if (checkboxGroup?.size?.value) {
192
+ style.width = addUnit(
193
+ sizeType[checkboxGroup.size.value] || checkboxGroup.size.value,
194
+ );
195
+ style.height = addUnit(
196
+ sizeType[checkboxGroup.size.value] || checkboxGroup.size.value,
197
+ );
198
+ }
199
+ return style;
205
200
  });
206
201
 
207
202
  /**
@@ -77,7 +77,7 @@
77
77
  }
78
78
  }
79
79
 
80
- @include m([disabled--checked]){
80
+ @include m(disabled--checked){
81
81
  background-color: $hy-primary;
82
82
  border-color: $hy-primary;
83
83
  opacity: 0.5;