hy-app 0.2.16 → 0.2.18

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 (82) hide show
  1. package/components/hy-action-sheet/hy-action-sheet.vue +5 -5
  2. package/components/hy-action-sheet/index.scss +6 -1
  3. package/components/hy-address-picker/hy-address-picker.vue +5 -5
  4. package/components/hy-avatar/hy-avatar.vue +5 -5
  5. package/components/hy-back-top/hy-back-top.vue +5 -5
  6. package/components/hy-badge/hy-badge.vue +5 -5
  7. package/components/hy-button/hy-button.vue +5 -5
  8. package/components/hy-calendar/hy-calendar.vue +22 -18
  9. package/components/hy-calendar/typing.d.ts +1 -1
  10. package/components/hy-card/hy-card.vue +5 -5
  11. package/components/hy-cell/hy-cell.vue +10 -11
  12. package/components/hy-check-button/hy-check-button.vue +7 -6
  13. package/components/hy-checkbox/hy-checkbox.vue +14 -14
  14. package/components/hy-code-input/hy-code-input.vue +8 -15
  15. package/components/hy-code-input/index.scss +1 -1
  16. package/components/hy-config-provider/hy-config-provider.vue +8 -6
  17. package/components/hy-count-down/hy-count-down.vue +7 -6
  18. package/components/hy-count-to/hy-count-to.vue +6 -5
  19. package/components/hy-datetime-picker/hy-datetime-picker.vue +7 -7
  20. package/components/hy-divider/hy-divider.vue +10 -7
  21. package/components/hy-dropdown/hy-dropdown.vue +6 -5
  22. package/components/hy-dropdown-item/hy-dropdown-item.vue +7 -5
  23. package/components/hy-empty/hy-empty.vue +6 -5
  24. package/components/hy-float-button/hy-float-button.vue +6 -6
  25. package/components/hy-folding-panel/hy-folding-panel.vue +6 -5
  26. package/components/hy-grid/hy-grid.vue +11 -13
  27. package/components/hy-grid/typing.d.ts +1 -1
  28. package/components/hy-icon/hy-icon.vue +15 -15
  29. package/components/hy-image/hy-image.vue +15 -9
  30. package/components/hy-input/hy-input.vue +7 -6
  31. package/components/hy-line/hy-line.vue +8 -6
  32. package/components/hy-line-progress/hy-line-progress.vue +9 -16
  33. package/components/hy-list/hy-list.vue +6 -5
  34. package/components/hy-loading/hy-loading.vue +9 -10
  35. package/components/hy-menu/hy-menu.vue +11 -8
  36. package/components/hy-modal/hy-modal.vue +6 -6
  37. package/components/hy-modal/index.scss +1 -1
  38. package/components/hy-navbar/hy-navbar.vue +6 -6
  39. package/components/hy-notice-bar/hy-notice-bar.vue +14 -9
  40. package/components/hy-notify/hy-notify.vue +6 -6
  41. package/components/hy-number-step/hy-number-step.vue +8 -6
  42. package/components/hy-overlay/hy-overlay.vue +8 -9
  43. package/components/hy-pagination/hy-pagination.vue +11 -8
  44. package/components/hy-picker/hy-picker.vue +9 -9
  45. package/components/hy-popover/hy-popover.vue +11 -7
  46. package/components/hy-popup/hy-popup.vue +9 -7
  47. package/components/hy-price/hy-price.vue +6 -5
  48. package/components/hy-qrcode/hy-qrcode.vue +6 -8
  49. package/components/hy-radio/hy-radio.vue +10 -12
  50. package/components/hy-rate/hy-rate.vue +7 -7
  51. package/components/hy-read-more/hy-read-more.vue +6 -5
  52. package/components/hy-scroll-list/hy-scroll-list.vue +6 -5
  53. package/components/hy-search/hy-search.vue +8 -6
  54. package/components/hy-signature/hy-signature.vue +6 -5
  55. package/components/hy-slider/hy-slider.vue +8 -7
  56. package/components/hy-steps/hy-steps.vue +10 -17
  57. package/components/hy-submit-bar/hy-submit-bar.vue +6 -6
  58. package/components/hy-subsection/hy-subsection.vue +16 -19
  59. package/components/hy-swipe-action/hy-swipe-action.vue +18 -19
  60. package/components/hy-swiper/hy-swiper.vue +15 -15
  61. package/components/hy-swiper/typing.d.ts +13 -1
  62. package/components/hy-switch/hy-switch.vue +17 -10
  63. package/components/hy-tabBar/hy-tabBar.vue +35 -26
  64. package/components/hy-tabs/hy-tabs.vue +28 -21
  65. package/components/hy-tag/hy-tag.vue +13 -17
  66. package/components/hy-tag/typing.d.ts +1 -1
  67. package/components/hy-text/hy-text.vue +12 -14
  68. package/components/hy-textarea/hy-textarea.vue +7 -6
  69. package/components/hy-textarea/index.scss +7 -2
  70. package/components/hy-toast/hy-toast.vue +72 -75
  71. package/components/hy-tooltip/hy-tooltip.vue +8 -14
  72. package/components/hy-transition/hy-transition.vue +8 -6
  73. package/components/hy-upload/hy-upload.vue +6 -5
  74. package/components/hy-warn/hy-warn.vue +6 -6
  75. package/components/hy-waterfall/hy-waterfall.vue +8 -7
  76. package/components/hy-watermark/hy-watermark.vue +20 -10
  77. package/libs/css/common.scss +5 -0
  78. package/libs/css/vars.css +1 -1
  79. package/package.json +2 -2
  80. package/theme.scss +1 -1
  81. package/utils/inspect.ts +1 -1
  82. package/web-types.json +1 -1
@@ -91,11 +91,6 @@
91
91
  </view>
92
92
  </template>
93
93
  <script lang="ts">
94
- /**
95
- * 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
96
- * @displayName hy-action-sheet
97
- */
98
- defineOptions({})
99
94
  export default {
100
95
  name: 'hy-action-sheet',
101
96
  options: {
@@ -107,6 +102,11 @@ export default {
107
102
  </script>
108
103
 
109
104
  <script lang="ts" setup>
105
+ /**
106
+ * 本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。
107
+ * @displayName hy-action-sheet
108
+ */
109
+ defineOptions({})
110
110
  import { watch, ref, PropType, type CSSProperties } from 'vue'
111
111
  import { isArray } from '../../utils'
112
112
  import { IActionSheetPanel, IActionSheetEmits, IActionSheetAction } from './typing.d.ts'
@@ -24,7 +24,7 @@
24
24
  color: $hy-text-color;
25
25
  font-size: $hy-font-size-base;
26
26
  text-align: center;
27
- border: none;
27
+ border-radius: 0;
28
28
  background: transparent;
29
29
  outline: none;
30
30
  padding: 0;
@@ -121,3 +121,8 @@
121
121
  @include lineEllipsis;
122
122
  }
123
123
  }
124
+
125
+ /* 去除原生按钮边框 */
126
+ button:after {
127
+ border: none;
128
+ }
@@ -60,11 +60,6 @@
60
60
  </template>
61
61
 
62
62
  <script lang="ts">
63
- /**
64
- * 此选择器用于选择地址
65
- * @displayName hy-address-picker
66
- */
67
- defineOptions({})
68
63
  export default {
69
64
  name: 'hy-address-picker',
70
65
  options: {
@@ -76,6 +71,11 @@ export default {
76
71
  </script>
77
72
 
78
73
  <script setup lang="ts">
74
+ /**
75
+ * 此选择器用于选择地址
76
+ * @displayName hy-address-picker
77
+ */
78
+ defineOptions({})
79
79
  import { type CSSProperties, onMounted, PropType, ref, toRefs } from 'vue'
80
80
  import type { IAddressPickerEmits } from './typing'
81
81
  import address from '../../utils/address.json'
@@ -41,11 +41,6 @@
41
41
  </template>
42
42
 
43
43
  <script lang="ts">
44
- /**
45
- * 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所
46
- * @displayName hy-avatar
47
- */
48
- defineOptions({})
49
44
  export default {
50
45
  name: 'hy-avatar',
51
46
  options: {
@@ -57,6 +52,11 @@ export default {
57
52
  </script>
58
53
 
59
54
  <script setup lang="ts">
55
+ /**
56
+ * 本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所
57
+ * @displayName hy-avatar
58
+ */
59
+ defineOptions({})
60
60
  import { computed, type CSSProperties, toRefs, ref, watch } from 'vue'
61
61
  import type { IAvatarEmit } from './typing'
62
62
  import { addUnit, random } from '../../utils'
@@ -24,11 +24,6 @@
24
24
  </template>
25
25
 
26
26
  <script lang="ts">
27
- /**
28
- * 该组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
29
- * @displayName hy-back-top
30
- */
31
- defineOptions({})
32
27
  export default {
33
28
  name: 'hy-back-top',
34
29
  options: {
@@ -40,6 +35,11 @@ export default {
40
35
  </script>
41
36
 
42
37
  <script setup lang="ts">
38
+ /**
39
+ * 该组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
40
+ * @displayName hy-back-top
41
+ */
42
+ defineOptions({})
43
43
  import { computed, type CSSProperties, PropType, toRefs } from 'vue'
44
44
  import { addUnit, getPx } from '../../utils'
45
45
  import { IconConfig } from '../../config'
@@ -16,11 +16,6 @@
16
16
  </template>
17
17
 
18
18
  <script lang="ts">
19
- /**
20
- * 此选择器用于选择地址
21
- * @displayName hy-address-picker
22
- */
23
- defineOptions({})
24
19
  export default {
25
20
  name: 'hy-badge',
26
21
  options: {
@@ -32,6 +27,11 @@ export default {
32
27
  </script>
33
28
 
34
29
  <script setup lang="ts">
30
+ /**
31
+ * 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
32
+ * @displayName hy-badge
33
+ */
34
+ defineOptions({})
35
35
  import type { IBadgeEmit } from './typing'
36
36
  import defaultProps from './props'
37
37
  import { computed, type CSSProperties, PropType, toRefs } from 'vue'
@@ -115,11 +115,6 @@
115
115
  </template>
116
116
 
117
117
  <script lang="ts">
118
- /**
119
- * 该组件内部实现以uni-app的基础button组件为基础,进行二次封装
120
- * @displayName hy-button
121
- */
122
- defineOptions({})
123
118
  export default {
124
119
  name: 'hy-button',
125
120
  options: {
@@ -131,6 +126,11 @@ export default {
131
126
  </script>
132
127
 
133
128
  <script setup lang="ts">
129
+ /**
130
+ * 该组件内部实现以uni-app的基础button组件为基础,进行二次封装
131
+ * @displayName hy-button
132
+ */
133
+ defineOptions({})
134
134
  import { computed, toRefs } from 'vue'
135
135
  import type { CSSProperties, PropType } from 'vue'
136
136
  import { bem, throttle } from '../../utils'
@@ -65,11 +65,6 @@
65
65
  </template>
66
66
 
67
67
  <script lang="ts">
68
- /**
69
- * 用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。
70
- * @displayName hy-calendar
71
- */
72
- defineOptions({})
73
68
  export default {
74
69
  name: 'hy-calendar',
75
70
  options: {
@@ -78,19 +73,25 @@ export default {
78
73
  },
79
74
  }
80
75
  </script>
76
+
81
77
  <script setup lang="ts">
82
- import type { ICalendarEmit } from './typing'
78
+ import type { ICalendarEmits } from './typing'
83
79
  import { computed, nextTick, onMounted, type PropType, ref, toRefs, watch } from 'vue'
84
80
  import { addUnit, error, isNumericString, padZero, range } from '../../utils'
85
81
  import Calendar from '../../utils/calendar.js'
86
82
  import dayjs from 'dayjs/esm'
87
-
88
83
  // 组件
89
84
  import HyMount from './month.vue'
90
85
  import HyHeader from './header.vue'
91
86
  import HyPopup from '../hy-popup/hy-popup.vue'
92
87
  import HyButton from '../hy-button/hy-button.vue'
93
88
 
89
+ /**
90
+ * 用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。
91
+ * @displayName hy-calendar
92
+ */
93
+ defineOptions({})
94
+
94
95
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
95
96
  const props = defineProps({
96
97
  /** 是否显示日历弹窗 */
@@ -134,23 +135,26 @@ const props = defineProps({
134
135
  },
135
136
  /** 自定义列表 */
136
137
  customList: {
137
- type: Array as unknown as any[],
138
+ type: Array as unknown as PropType<any[]>,
138
139
  default: [],
139
140
  },
140
141
  /** 主题色,对底部按钮和选中日期有效 */
141
- color: String,
142
+ color: {
143
+ type: String,
144
+ default: '',
145
+ },
142
146
  /** 最小的可选日期 */
143
147
  minDate: {
144
- type: Number,
148
+ type: [String, Number],
145
149
  default: 0,
146
150
  },
147
151
  /** 最大可选日期 */
148
152
  maxDate: {
149
- type: Number,
153
+ type: [String, Number],
150
154
  default: 0,
151
155
  },
152
156
  /** 默认选中的日期,mode为multiple或range是必须为数组格式 */
153
- defaultDate: [Date, String, Array<string>],
157
+ defaultDate: [Date, String, Array],
154
158
  /** mode=multiple时,最多可选多少个日期 */
155
159
  maxCount: {
156
160
  type: Number,
@@ -219,7 +223,7 @@ const props = defineProps({
219
223
  },
220
224
  /** 圆角值,默认无圆角 */
221
225
  round: {
222
- type: Number,
226
+ type: [String, Number],
223
227
  default: 0,
224
228
  },
225
229
  /** 最多展示的月份数量 */
@@ -229,13 +233,13 @@ const props = defineProps({
229
233
  },
230
234
  /** 星期文案 */
231
235
  weekText: {
232
- type: Array as unknown as string[],
233
- default: ['一', '二', '三', '四', '五', '六', '日'],
236
+ type: Array as unknown as PropType<string[]>,
237
+ default: () => ['一', '二', '三', '四', '五', '六', '日'],
234
238
  },
235
239
  /** 单选与多选禁止选中的日期列表,mode!=range时有效。 */
236
240
  forbidDays: {
237
- type: Array as unknown as Date[],
238
- default: [],
241
+ type: Array as unknown as PropType<Date[]>,
242
+ default: () => [],
239
243
  },
240
244
  /** 单选与多选禁止选中的日期选择时提示 */
241
245
  forbidDaysToast: {
@@ -255,7 +259,7 @@ const {
255
259
  formatter,
256
260
  showLunar,
257
261
  } = toRefs(props)
258
- const emit = defineEmits<ICalendarEmit>(['confirm', 'close'])
262
+ const emit = defineEmits<ICalendarEmits>()
259
263
 
260
264
  // 需要显示的月份的数组
261
265
  const months = ref<any[]>([])
@@ -125,7 +125,7 @@ export default interface HyCalendarProps {
125
125
  forbidDaysToast?: string
126
126
  }
127
127
 
128
- export interface ICalendarEmit {
128
+ export interface ICalendarEmits {
129
129
  /** 日期选择完成后触发,则点击确认按钮后触发 */
130
130
  (e: 'confirm', selected: string[]): void
131
131
  /** 日历关闭时触发 */
@@ -71,11 +71,6 @@
71
71
  </template>
72
72
 
73
73
  <script lang="ts">
74
- /**
75
- * 卡片组件一般用于多个列表条目,且风格统一的场景。
76
- * @displayName hy-card
77
- */
78
- defineOptions({})
79
74
  export default {
80
75
  name: 'hy-card',
81
76
  options: {
@@ -87,6 +82,11 @@ export default {
87
82
  </script>
88
83
 
89
84
  <script setup lang="ts">
85
+ /**
86
+ * 卡片组件一般用于多个列表条目,且风格统一的场景。
87
+ * @displayName hy-card
88
+ */
89
+ defineOptions({})
90
90
  import type { ICardEmits } from './typing'
91
91
  import { addUnit } from '../../utils'
92
92
  import { computed, type CSSProperties, PropType, toRefs } from 'vue'
@@ -120,11 +120,6 @@
120
120
  </template>
121
121
 
122
122
  <script lang="ts">
123
- /**
124
- * cell单元格一般用于一组列表的情况,比如个人中心页,设置页等
125
- * @displayName hy-cell
126
- */
127
- defineOptions({})
128
123
  export default {
129
124
  name: 'hy-cell',
130
125
  options: {
@@ -146,12 +141,18 @@ import { addUnit } from '../../utils'
146
141
  import HyIcon from '../hy-icon/hy-icon.vue'
147
142
  import type HyIconProps from '../hy-icon/typing'
148
143
 
144
+ /**
145
+ * cell单元格一般用于一组列表的情况,比如个人中心页,设置页等
146
+ * @displayName hy-cell
147
+ */
148
+ defineOptions({})
149
+
149
150
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
150
151
  const props = defineProps({
151
152
  /** cell列表数据 */
152
153
  list: {
153
154
  type: Array as unknown as PropType<Array<CellContentVo>>,
154
- default: [],
155
+ default: () => [],
155
156
  required: true,
156
157
  },
157
158
  /** 头部标题 */
@@ -168,7 +169,7 @@ const props = defineProps({
168
169
  },
169
170
  /** 圆角 */
170
171
  borderRadius: {
171
- type: String,
172
+ type: [String, Number],
172
173
  default: '5px',
173
174
  },
174
175
  /** 是否禁用cell */
@@ -186,7 +187,7 @@ const props = defineProps({
186
187
  * @values large,medium,small
187
188
  * */
188
189
  size: {
189
- type: String,
190
+ type: [String, Number],
190
191
  default: 'medium',
191
192
  },
192
193
  /** 右侧的内容 */
@@ -212,9 +213,7 @@ const props = defineProps({
212
213
  default: 'right',
213
214
  },
214
215
  /** 定义需要用到的外部样式 */
215
- customStyle: {
216
- type: Object as PropType<CSSProperties>,
217
- },
216
+ customStyle: Object as PropType<CSSProperties>,
218
217
  })
219
218
  const { size, disabled, clickable, borderRadius } = toRefs(props)
220
219
  const emit = defineEmits<ICellEmits>()
@@ -16,11 +16,6 @@
16
16
  </template>
17
17
 
18
18
  <script lang="ts">
19
- /**
20
- * 该组件内部实现以tag二次封装按钮复选框和单选框
21
- * @displayName hy-check-button
22
- */
23
- defineOptions({})
24
19
  export default {
25
20
  name: 'hy-check-button',
26
21
  options: {
@@ -38,6 +33,12 @@ import type { CheckboxColumnsVo } from './typing'
38
33
  import HyTag from '../hy-tag/hy-tag.vue'
39
34
  import { isArray } from '../../utils'
40
35
 
36
+ /**
37
+ * 该组件内部实现以tag二次封装按钮复选框和单选框
38
+ * @displayName hy-check-button
39
+ */
40
+ defineOptions({})
41
+
41
42
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
42
43
  const props = defineProps({
43
44
  /** 选中得值,selectTypeW为radio是字符串,为checkbox是数组 */
@@ -71,7 +72,7 @@ const props = defineProps({
71
72
  /** 禁用 */
72
73
  disabled: {
73
74
  type: Boolean,
74
- default: true,
75
+ default: false,
75
76
  },
76
77
  /** 每行几列,每列等宽 */
77
78
  col: {
@@ -50,11 +50,6 @@
50
50
  </template>
51
51
 
52
52
  <script lang="ts">
53
- /**
54
- * 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
55
- * @displayName hy-checkbox
56
- */
57
- defineOptions({})
58
53
  export default {
59
54
  name: 'hy-checkbox',
60
55
  options: {
@@ -70,9 +65,16 @@ import { computed, toRefs, watch, ref, reactive } from 'vue'
70
65
  import type { CSSProperties, PropType } from 'vue'
71
66
  import { addUnit, bem, error } from '../../utils'
72
67
  import { IconConfig } from '../../config'
73
- import HyIcon from '../hy-icon/hy-icon.vue'
74
68
  import type { ICheckBoxEmits } from './typing'
75
69
  import type { CheckboxColumnsVo, IFieldNames } from '../hy-check-button/typing'
70
+ // 组件
71
+ import HyIcon from '../hy-icon/hy-icon.vue'
72
+
73
+ /**
74
+ * 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
75
+ * @displayName hy-checkbox
76
+ */
77
+ defineOptions({})
76
78
 
77
79
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
78
80
  const props = defineProps({
@@ -260,8 +262,8 @@ const iconWrapStyle = computed(() => {
260
262
  temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
261
263
  ? activeColor.value
262
264
  : !isDisabled(temp?.disabled)
263
- ? '#ffffff'
264
- : ''
265
+ ? '#ffffff'
266
+ : ''
265
267
  style.borderColor =
266
268
  temp[fieldNames.value.checked] && !isDisabled(temp?.disabled)
267
269
  ? activeColor.value
@@ -286,18 +288,16 @@ const iconClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
286
288
  * */
287
289
  const wrapperClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
288
290
  e.stopPropagation()
289
- if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
290
- setRadioCheckedStatus(temp)
291
- }
291
+ if (labelDisabled.value || isDisabled(temp?.disabled)) return
292
+ setRadioCheckedStatus(temp)
292
293
  }
293
294
  /**
294
295
  * @description 点击label
295
296
  * */
296
297
  const labelClickHandler = (e: Event, temp: CheckboxColumnsVo) => {
297
298
  e.stopPropagation()
298
- if (!isDisabled(temp?.disabled) || !labelDisabled.value) {
299
- setRadioCheckedStatus(temp)
300
- }
299
+ if (labelDisabled.value || isDisabled(temp?.disabled)) return
300
+ setRadioCheckedStatus(temp)
301
301
  }
302
302
 
303
303
  /**
@@ -42,11 +42,6 @@
42
42
  </template>
43
43
 
44
44
  <script lang="ts">
45
- /**
46
- * 一般用于验证用户短信验证码的场景,也可以结合华玥的键盘组件使用
47
- * @displayName hy-code-input
48
- */
49
- defineOptions({})
50
45
  export default {
51
46
  name: 'hy-code-input',
52
47
  options: {
@@ -58,19 +53,17 @@ export default {
58
53
  </script>
59
54
 
60
55
  <script setup lang="ts">
61
- import {
62
- computed,
63
- type CSSProperties,
64
- nextTick,
65
- onUnmounted,
66
- PropType,
67
- ref,
68
- toRefs,
69
- watch,
70
- } from 'vue'
56
+ import { computed, nextTick, onUnmounted, ref, toRefs, watch } from 'vue'
57
+ import type { CSSProperties, PropType } from 'vue'
71
58
  import type { ICodeInputEmits } from './typing'
72
59
  import { addUnit, getPx } from '../../utils'
73
60
 
61
+ /**
62
+ * 一般用于验证用户短信验证码的场景,也可以结合华玥的键盘组件使用
63
+ * @displayName hy-code-input
64
+ */
65
+ defineOptions({})
66
+
74
67
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
75
68
  const props = defineProps({
76
69
  /** 获取值 */
@@ -32,7 +32,7 @@
32
32
  &:before {
33
33
  content: "";
34
34
  background-color: $hy-text-color;
35
- width: 1.5px;
35
+ width: 2rpx;
36
36
  border-radius: 2px;
37
37
  height: 50%;
38
38
  animation: 1s hy-cursor-flicker--2 infinite;
@@ -6,11 +6,6 @@
6
6
  </template>
7
7
 
8
8
  <script lang="ts">
9
- /**
10
- * 将 ConfigProvider 组件的 theme 属性设置为 dark,可以开启深色模式。 深色模式会全局生效,使页面上的所有 Wot 组件变为深色风格。
11
- * @displayName hy-config-provider
12
- */
13
- defineOptions({})
14
9
  export default {
15
10
  name: 'hy-config-provider',
16
11
  options: {
@@ -22,10 +17,17 @@ export default {
22
17
  </script>
23
18
 
24
19
  <script setup lang="ts">
25
- import { computed, type CSSProperties, type PropType, toRefs } from 'vue'
20
+ import { computed, toRefs } from 'vue'
21
+ import type { CSSProperties, PropType } from 'vue'
26
22
  import { addUnit, colorGradient } from '../../utils'
27
23
  import { ColorConfig } from '../../config'
28
24
 
25
+ /**
26
+ * 将 ConfigProvider 组件的 theme 属性设置为 dark,可以开启深色模式。 深色模式会全局生效,使页面上的所有 Wot 组件变为深色风格。
27
+ * @displayName hy-config-provider
28
+ */
29
+ defineOptions({})
30
+
29
31
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
30
32
  const props = defineProps({
31
33
  /**
@@ -11,11 +11,6 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
- /**
15
- * 一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
16
- * @displayName hy-count-down
17
- */
18
- defineOptions({})
19
14
  export default {
20
15
  name: 'hy-count-down',
21
16
  options: {
@@ -30,7 +25,13 @@ export default {
30
25
  import { onMounted, onUnmounted, ref, toRefs, watch } from 'vue'
31
26
  import type { CSSProperties, PropType } from 'vue'
32
27
  import { isSameSecond, parseFormat, parseTimeData } from './index'
33
- import { ICountDownEmits } from './typing'
28
+ import type { ICountDownEmits } from './typing'
29
+
30
+ /**
31
+ * 一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。
32
+ * @displayName hy-count-down
33
+ */
34
+ defineOptions({})
34
35
 
35
36
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
36
37
  const props = defineProps({
@@ -15,11 +15,6 @@
15
15
  </template>
16
16
 
17
17
  <script lang="ts">
18
- /**
19
- * 一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
20
- * @displayName hy-count-to
21
- */
22
- defineOptions({})
23
18
  export default {
24
19
  name: 'hy-count-to',
25
20
  options: {
@@ -36,6 +31,12 @@ import { computed, onMounted, ref, toRefs, watch } from 'vue'
36
31
  import type { CSSProperties, PropType } from 'vue'
37
32
  import { addUnit, isNumber } from '../../utils'
38
33
 
34
+ /**
35
+ * 一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
36
+ * @displayName hy-count-to
37
+ */
38
+ defineOptions({})
39
+
39
40
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
40
41
  const props = defineProps({
41
42
  /** 开始的数值,默认从0增长到某一个数 */
@@ -56,11 +56,6 @@
56
56
  </template>
57
57
 
58
58
  <script lang="ts">
59
- /**
60
- * 此选择器用于时间日期选择
61
- * @displayName hy-datetime-picker
62
- */
63
- defineOptions({})
64
59
  export default {
65
60
  name: 'hy-datetime-picker',
66
61
  options: {
@@ -78,12 +73,17 @@ import dayjs from 'dayjs/esm'
78
73
  import { error, padZero } from '../../utils'
79
74
  import { DateModeEnum } from '../../typing'
80
75
  import type HyInputProps from '../hy-input/typing'
81
-
82
76
  // 组件
83
77
  import HyInput from '../hy-input/hy-input.vue'
84
78
  import HyPicker from '../hy-picker/hy-picker.vue'
85
79
  import { IDatetimePickerEmits } from '@/package/components/hy-datetime-picker/typing'
86
80
 
81
+ /**
82
+ * 此选择器用于时间日期选择
83
+ * @displayName hy-datetime-picker
84
+ */
85
+ defineOptions({})
86
+
87
87
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
88
88
  const props = defineProps({
89
89
  /** 用于控制选择器的弹出和收起 */
@@ -668,7 +668,7 @@ const getBoundary = (type: string, innerVal: string | number) => {
668
668
  }
669
669
  }
670
670
  const onShowByClickInput = () => {
671
- if (!input.value.disabled) {
671
+ if (!input.value?.disabled) {
672
672
  showByClickInput.value = !showByClickInput.value
673
673
  }
674
674
  }
@@ -21,11 +21,6 @@
21
21
  </template>
22
22
 
23
23
  <script lang="ts">
24
- /**
25
- * 区隔内容的分割线,一般用于页面底部"没有更多"的提示
26
- * @displayName hy-divider
27
- */
28
- defineOptions({})
29
24
  export default {
30
25
  name: 'hy-divider',
31
26
  options: {
@@ -40,12 +35,17 @@ export default {
40
35
  import { computed, toRefs } from 'vue'
41
36
  import type { CSSProperties, PropType } from 'vue'
42
37
  import { addUnit } from '../../utils'
43
-
44
38
  // 组件
45
39
  import HyLine from '../hy-line/hy-line.vue'
46
40
  import HyLoading from '../hy-loading/hy-loading.vue'
47
41
  import { IconConfig } from '../../config'
48
42
 
43
+ /**
44
+ * 区隔内容的分割线,一般用于页面底部"没有更多"的提示
45
+ * @displayName hy-divider
46
+ */
47
+ defineOptions({})
48
+
49
49
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
50
50
  const props = defineProps({
51
51
  /** 是否虚线 */
@@ -83,7 +83,10 @@ const props = defineProps({
83
83
  /** 线条颜色 */
84
84
  lineColor: String,
85
85
  /** 加载图标 */
86
- loadingIcon: IconConfig.LOADING,
86
+ loadingIcon: {
87
+ type: String,
88
+ default: IconConfig.LOADING,
89
+ },
87
90
  /** 加载前的提示语 */
88
91
  loadMoreText: {
89
92
  type: String,