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
@@ -5,11 +5,6 @@
5
5
  </template>
6
6
 
7
7
  <script lang="ts">
8
- /**
9
- * 主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项。
10
- * @displayName hy-dropdown
11
- */
12
- defineOptions({})
13
8
  export default {
14
9
  name: 'hy-dropdown',
15
10
  options: {
@@ -24,6 +19,12 @@ export default {
24
19
  import { provide, ref, computed, type CSSProperties, toRefs, PropType } from 'vue'
25
20
  import { addUnit, IconConfig } from '@/package'
26
21
 
22
+ /**
23
+ * 主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项。
24
+ * @displayName hy-dropdown
25
+ */
26
+ defineOptions({})
27
+
27
28
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
28
29
  const props = defineProps({
29
30
  /** 标题菜单的高度,单位px */
@@ -58,10 +58,6 @@
58
58
  </template>
59
59
 
60
60
  <script lang="ts">
61
- /**
62
- * 主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项。和hy-dropdown组合用法
63
- * @displayName hy-dropdown-item
64
- */
65
61
  export default {
66
62
  name: 'hy-dropdown-item',
67
63
  options: {
@@ -87,10 +83,16 @@ import type FatherIProps from '../hy-dropdown/typing'
87
83
  import type { DropdownMenuItem } from './typing'
88
84
  import { addUnit, getRect, throttle } from '../../utils'
89
85
  import { IconConfig } from '../../config'
90
-
86
+ // 组件
91
87
  import HyOverlay from '../hy-overlay/hy-overlay.vue'
92
88
  import HyIcon from '../hy-icon/hy-icon.vue'
93
89
 
90
+ /**
91
+ * 主要提供筛选下拉筛选框,内置基础筛选功能,可以根据自己的需求自定义筛选项。和hy-dropdown组合用法
92
+ * @displayName hy-dropdown-item
93
+ */
94
+ defineOptions({})
95
+
94
96
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
95
97
  const props = defineProps({
96
98
  /** 获取值 */
@@ -30,11 +30,6 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts">
33
- /**
34
- * 加载的第一页数据就为空
35
- * @displayName hy-empty
36
- */
37
- defineOptions({})
38
33
  export default {
39
34
  name: 'hy-empty',
40
35
  options: {
@@ -57,6 +52,12 @@ import type { IEmptyEmits } from './typing'
57
52
  import HyButton from '../hy-button/hy-button.vue'
58
53
  import HyIcon from '../hy-icon/hy-icon.vue'
59
54
 
55
+ /**
56
+ * 加载的第一页数据就为空
57
+ * @displayName hy-empty
58
+ */
59
+ defineOptions({})
60
+
60
61
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
61
62
  const props = defineProps({
62
63
  /** 是否显示空状态 */
@@ -61,11 +61,6 @@
61
61
  </template>
62
62
 
63
63
  <script lang="ts">
64
- /**
65
- * 悬浮动作按钮组件,按下可显示一组动作按钮。
66
- * @displayName hy-float-button
67
- */
68
- defineOptions({})
69
64
  export default {
70
65
  name: 'hy-float-button',
71
66
  options: {
@@ -84,11 +79,16 @@ import type { MenusType } from './typing'
84
79
  import { addUnit, getPx, getRect, guid, isH5 } from '../../utils'
85
80
  import { HyApp } from '../../typing/modules/common'
86
81
  import { IconConfig } from '../../config'
87
-
88
82
  // 组件
89
83
  import HyIcon from '../hy-icon/hy-icon.vue'
90
84
  import HyLine from '../hy-line/hy-line.vue'
91
85
 
86
+ /**
87
+ * 悬浮动作按钮组件,按下可显示一组动作按钮。
88
+ * @displayName hy-float-button
89
+ */
90
+ defineOptions({})
91
+
92
92
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
93
93
  const props = defineProps({
94
94
  /** 菜单栏集合 */
@@ -39,11 +39,6 @@
39
39
  </template>
40
40
 
41
41
  <script lang="ts">
42
- /**
43
- * 通过折叠面板收纳内容区域。
44
- * @displayName hy-folding-panel
45
- */
46
- defineOptions({})
47
42
  export default {
48
43
  name: 'hy-folding-panel',
49
44
  options: {
@@ -64,6 +59,12 @@ import { ColorConfig } from '../../config'
64
59
  import HyCell from '../hy-cell/hy-cell.vue'
65
60
  import HyLine from '../hy-line/hy-line.vue'
66
61
 
62
+ /**
63
+ * 通过折叠面板收纳内容区域。
64
+ * @displayName hy-folding-panel
65
+ */
66
+ defineOptions({})
67
+
67
68
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
68
69
  const props = defineProps({
69
70
  /** 数据集 */
@@ -33,11 +33,6 @@
33
33
  </template>
34
34
 
35
35
  <script lang="ts">
36
- /**
37
- * 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式
38
- * @displayName hy-grid
39
- */
40
- defineOptions({})
41
36
  export default {
42
37
  name: 'hy-grid',
43
38
  options: {
@@ -53,25 +48,30 @@ import { computed, toRefs } from 'vue'
53
48
  import type { CSSProperties, PropType } from 'vue'
54
49
  import type { CustomKeysVo, GridItemVo, IGridEmits } from './typing'
55
50
  import { addUnit } from '../../utils'
56
-
51
+ import type HyIconProps from '../hy-icon/typing'
57
52
  // 组件
58
53
  import HyIcon from '../hy-icon/hy-icon.vue'
59
- import type HyIconProps from '@/package/components/hy-icon/typing'
54
+
55
+ /**
56
+ * 宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式
57
+ * @displayName hy-grid
58
+ */
59
+ defineOptions({})
60
60
 
61
61
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
62
62
  const props = defineProps({
63
63
  /** 数据列表 */
64
64
  list: {
65
65
  type: Array as PropType<GridItemVo[]>,
66
- default: [],
66
+ default: () => [],
67
67
  },
68
68
  /** 自定义键值 */
69
69
  customKeys: {
70
70
  type: Object as PropType<CustomKeysVo>,
71
- default: {
71
+ default: () => ({
72
72
  name: 'name',
73
73
  icon: 'icon',
74
- },
74
+ }),
75
75
  },
76
76
  /** 宫格的列数 */
77
77
  col: {
@@ -109,9 +109,7 @@ const props = defineProps({
109
109
  /** 图标属性api配置集合 */
110
110
  iconConfig: Object as PropType<HyIconProps>,
111
111
  /** 定义需要用到的外部样式 */
112
- customStyle: {
113
- type: Object as PropType<CSSProperties>,
114
- },
112
+ customStyle: Object as PropType<CSSProperties>,
115
113
  /** 自定义外部类名 */
116
114
  customClass: String,
117
115
  })
@@ -75,5 +75,5 @@ export default interface HyGridProps {
75
75
 
76
76
  export interface IGridEmits {
77
77
  /** 点击小菜单触发 */
78
- (e: 'click', name: string | Record<string, any>)): void
78
+ (e: 'click', name: string | Record<string, any>): void
79
79
  }
@@ -10,7 +10,7 @@
10
10
  <text v-else class="hy-icon__icon" :class="uClasses" :style="[iconStyle, customStyle]"></text>
11
11
  <!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
12
12
  <text
13
- v-if="label !== ''"
13
+ v-if="label"
14
14
  class="hy-icon__label"
15
15
  :style="{
16
16
  color: labelColor,
@@ -25,11 +25,6 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- /**
29
- * 基于字体的图标集,包含了大多数常见场景的图标,使用简单,开箱即用,无需自己再写每个图标的样式,直接简单配置即可。支持自定义图标。
30
- * @displayName hy-icon
31
- */
32
- defineOptions({})
33
28
  export default {
34
29
  name: 'hy-icon',
35
30
  options: {
@@ -41,10 +36,17 @@ export default {
41
36
  </script>
42
37
 
43
38
  <script setup lang="ts">
44
- import { computed, type CSSProperties, type PropType, toRefs } from 'vue'
39
+ import { computed, toRefs } from 'vue'
40
+ import type { PropType, CSSProperties } from 'vue'
45
41
  import { addUnit } from '../../utils'
46
42
  import type { IIconEmits } from './typing'
47
43
 
44
+ /**
45
+ * 基于字体的图标集,包含了大多数常见场景的图标,使用简单,开箱即用,无需自己再写每个图标的样式,直接简单配置即可。支持自定义图标。
46
+ * @displayName hy-icon
47
+ */
48
+ defineOptions({})
49
+
48
50
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
49
51
  const props = defineProps({
50
52
  /** 图标名称 */
@@ -90,12 +92,12 @@ const props = defineProps({
90
92
  /** 图片的mode */
91
93
  imgMode: String,
92
94
  /** 显示图片小图标时的宽度 */
93
- width: String,
95
+ width: [String, Number],
94
96
  /** 显示图片小图标时的高度 */
95
- height: String,
97
+ height: [String, Number],
96
98
  /** 图标在垂直方向上的定位 用于解决某些情况下,让图标垂直居中的用途 */
97
99
  top: {
98
- type: Number,
100
+ type: [String, Number],
99
101
  default: 0,
100
102
  },
101
103
  /** 是否阻止事件传播 */
@@ -110,13 +112,11 @@ const props = defineProps({
110
112
  },
111
113
  /** 图标圆角 */
112
114
  round: {
113
- type: Number,
115
+ type: [String, Number],
114
116
  default: 0,
115
117
  },
116
118
  /** 定义需要用到的外部样式 */
117
- customStyle: {
118
- type: Object as PropType<CSSProperties>,
119
- },
119
+ customStyle: Object as PropType<CSSProperties>,
120
120
  /** 自定义外部类名 */
121
121
  customClass: String,
122
122
  })
@@ -174,7 +174,7 @@ const iconStyle = computed<CSSProperties>(() => {
174
174
  * @description 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
175
175
  * */
176
176
  const isImg = computed(() => {
177
- return name.value.indexOf('/') !== -1
177
+ return name.value?.indexOf('/') !== -1
178
178
  })
179
179
  const imgStyle = computed((): CSSProperties => {
180
180
  let style: CSSProperties = {}
@@ -50,11 +50,6 @@
50
50
  </template>
51
51
 
52
52
  <script lang="ts">
53
- /**
54
- * uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
55
- * @displayName hy-image
56
- */
57
- defineOptions({})
58
53
  export default {
59
54
  name: 'hy-image',
60
55
  options: {
@@ -70,12 +65,17 @@ import { computed, onMounted, ref, toRefs, watch } from 'vue'
70
65
  import type { PropType, CSSProperties } from 'vue'
71
66
  import type { IImageEmits } from './typing'
72
67
  import { addUnit, getPx } from '../../utils'
73
-
68
+ import { IconConfig } from '../../config'
74
69
  // 组件
75
70
  import HyIcon from '../hy-icon/hy-icon.vue'
76
71
  import HyTransition from '../hy-transition/hy-transition.vue'
77
72
  import HyLoading from '../hy-loading/hy-loading.vue'
78
- import { IconConfig } from '@/package'
73
+
74
+ /**
75
+ * uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
76
+ * @displayName hy-image
77
+ */
78
+ defineOptions({})
79
79
 
80
80
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
81
81
  const props = defineProps({
@@ -87,9 +87,15 @@ const props = defineProps({
87
87
  default: 'aspectFill',
88
88
  },
89
89
  /** 宽度,单位任意,如果为数值,则为px单位 */
90
- width: String,
90
+ width: {
91
+ type: [String, Number],
92
+ default: '',
93
+ },
91
94
  /** 高度,单位任意,如果为数值,则为px单位 */
92
- height: String,
95
+ height: {
96
+ type: [String, Number],
97
+ default: '',
98
+ },
93
99
  /**
94
100
  * 图片形状
95
101
  * @values circle,square
@@ -92,11 +92,6 @@
92
92
  </template>
93
93
 
94
94
  <script lang="ts">
95
- /**
96
- * 为一个输入框,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
97
- * @displayName hy-input
98
- */
99
- defineOptions({})
100
95
  export default {
101
96
  name: 'hy-input',
102
97
  options: {
@@ -116,6 +111,12 @@ import { IconConfig } from '../../config'
116
111
  import type { IInputEmits } from './typing'
117
112
  import HyIconProps from '@/package/components/hy-icon/typing'
118
113
 
114
+ /**
115
+ * 为一个输入框,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
116
+ * @displayName hy-input
117
+ */
118
+ defineOptions({})
119
+
119
120
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
120
121
  const props = defineProps({
121
122
  /** 输入的值 */
@@ -278,7 +279,7 @@ const props = defineProps({
278
279
  },
279
280
  /** 是否忽略组件内对文本合成系统事件的处理 */
280
281
  ignoreCompositionEvent: {
281
- type: String,
282
+ type: Boolean,
282
283
  default: false,
283
284
  },
284
285
  /** 内容式化函数 */
@@ -3,11 +3,6 @@
3
3
  </template>
4
4
 
5
5
  <script lang="ts">
6
- /**
7
- * 一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单。
8
- * @displayName hy-line
9
- */
10
- defineOptions({})
11
6
  export default {
12
7
  name: 'hy-line',
13
8
  options: {
@@ -19,9 +14,16 @@ export default {
19
14
  </script>
20
15
 
21
16
  <script setup lang="ts">
22
- import { computed, type CSSProperties, type PropType, toRefs } from 'vue'
17
+ import { computed, toRefs } from 'vue'
18
+ import type { CSSProperties, PropType } from 'vue'
23
19
  import { addUnit } from '../../utils'
24
20
 
21
+ /**
22
+ * 一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单。
23
+ * @displayName hy-line
24
+ */
25
+ defineOptions({})
26
+
25
27
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
26
28
  const props = defineProps({
27
29
  /** 线条的颜色 */
@@ -25,11 +25,6 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- /**
29
- * 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
30
- * @displayName hy-line-progress
31
- */
32
- defineOptions({})
33
28
  export default {
34
29
  name: 'hy-line-progress',
35
30
  options: {
@@ -41,18 +36,16 @@ export default {
41
36
  </script>
42
37
 
43
38
  <script setup lang="ts">
44
- import {
45
- computed,
46
- type CSSProperties,
47
- getCurrentInstance,
48
- onMounted,
49
- type PropType,
50
- ref,
51
- toRefs,
52
- watch,
53
- } from 'vue'
39
+ import { computed, getCurrentInstance, onMounted, ref, toRefs, watch } from 'vue'
40
+ import type { CSSProperties, PropType } from 'vue'
54
41
  import { addUnit, getPx, getRect, range, sleep } from '../../utils'
55
42
 
43
+ /**
44
+ * 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
45
+ * @displayName hy-line-progress
46
+ */
47
+ defineOptions({})
48
+
56
49
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
57
50
  const props = defineProps({
58
51
  /** 激活部分的颜色 */
@@ -67,7 +60,7 @@ const props = defineProps({
67
60
  /** 是否在进度条内部显示百分比的值 */
68
61
  showText: {
69
62
  type: Boolean,
70
- default: false,
63
+ default: true,
71
64
  },
72
65
  /** 进度条的高度,单位px */
73
66
  height: {
@@ -62,11 +62,6 @@
62
62
  </template>
63
63
 
64
64
  <script lang="ts">
65
- /**
66
- * 实现只展示可视内容的dom,减少dom创建,优化滚动性能
67
- * @displayName hy-list
68
- */
69
- defineOptions({})
70
65
  export default {
71
66
  name: 'hy-list',
72
67
  options: {
@@ -93,6 +88,12 @@ import {
93
88
  import { addUnit, getPx, getRect } from '../../utils'
94
89
  import type { IListEmits } from './typing'
95
90
 
91
+ /**
92
+ * 实现只展示可视内容的dom,减少dom创建,优化滚动性能
93
+ * @displayName hy-list
94
+ */
95
+ defineOptions({})
96
+
96
97
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
97
98
  const props = defineProps({
98
99
  /** 数据列表 */
@@ -43,11 +43,6 @@
43
43
  </template>
44
44
 
45
45
  <script lang="ts">
46
- /**
47
- * 目前用在华玥的loadMore加载更多等组件的正在加载状态场景。
48
- * @displayName hy-loading
49
- */
50
- defineOptions({})
51
46
  export default {
52
47
  name: 'hy-loading',
53
48
  options: {
@@ -63,6 +58,12 @@ import { toRefs, ref, computed } from 'vue'
63
58
  import type { CSSProperties, PropType } from 'vue'
64
59
  import { addUnit, colorGradient } from '../../utils'
65
60
 
61
+ /**
62
+ * 目前用在华玥的loadMore加载更多等组件的正在加载状态场景。
63
+ * @displayName hy-loading
64
+ */
65
+ defineOptions({})
66
+
66
67
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
67
68
  const props = defineProps({
68
69
  /** 是否显示组件 */
@@ -92,12 +93,12 @@ const props = defineProps({
92
93
  },
93
94
  /** 加载图标的大小,单位px */
94
95
  size: {
95
- type: Number,
96
+ type: [String, Number],
96
97
  default: 24,
97
98
  },
98
99
  /** 文字大小 */
99
100
  textSize: {
100
- type: Number,
101
+ type: [String, Number],
101
102
  default: 15,
102
103
  },
103
104
  /** 文字内容 */
@@ -115,9 +116,7 @@ const props = defineProps({
115
116
  /** mode=circle时的暗边颜色 */
116
117
  inactiveColor: String,
117
118
  /** 定义需要用到的外部样式 */
118
- customStyle: {
119
- type: Object as PropType<CSSProperties>,
120
- },
119
+ customStyle: Object as PropType<CSSProperties>,
121
120
  })
122
121
  const { show, size, color, mode, inactiveColor } = toRefs(props)
123
122
 
@@ -43,11 +43,6 @@
43
43
  </template>
44
44
 
45
45
  <script lang="ts">
46
- /**
47
- * 垂直展示的导航栏,用于在不同的内容区域之间进行切换。
48
- * @displayName hy-menu
49
- */
50
- defineOptions({})
51
46
  export default {
52
47
  name: 'hy-menu',
53
48
  options: {
@@ -59,21 +54,27 @@ export default {
59
54
  </script>
60
55
 
61
56
  <script lang="ts" setup>
62
- import { computed, PropType, ref, toRefs, watch } from 'vue'
57
+ import { computed, ref, toRefs, watch } from 'vue'
58
+ import type { CSSProperties, PropType } from 'vue'
63
59
  import type { IMenuEmits, MenusType } from './typing'
64
60
  import { addUnit } from '../../utils'
65
61
 
66
62
  import type HyBadgeProps from '../hy-badge/typing'
67
63
  import type HyIconProps from '../hy-icon/typing'
68
-
69
64
  // 组件
70
65
  import HyIcon from '../hy-icon/hy-icon.vue'
71
66
  import HyBadge from '../hy-badge/hy-badge.vue'
72
67
 
68
+ /**
69
+ * 垂直展示的导航栏,用于在不同的内容区域之间进行切换。
70
+ * @displayName hy-menu
71
+ */
72
+ defineOptions({})
73
+
73
74
  // const props = withDefaults(defineProps<IProps>(), defaultProps);
74
75
  const props = defineProps({
75
76
  /** 当前值 */
76
- modelValue: String,
77
+ modelValue: [String, Number],
77
78
  /** 菜单数据集 */
78
79
  list: {
79
80
  type: Array as PropType<Array<MenusType>>,
@@ -96,6 +97,8 @@ const props = defineProps({
96
97
  type: Object as PropType<HyBadgeProps>,
97
98
  default: {},
98
99
  },
100
+ /** 定义需要用到的外部样式 */
101
+ customStyle: Object as PropType<CSSProperties>,
99
102
  })
100
103
  const { modelValue, list, color } = toRefs(props)
101
104
  const emit = defineEmits<IMenuEmits>()
@@ -88,11 +88,6 @@
88
88
  </template>
89
89
 
90
90
  <script lang="ts">
91
- /**
92
- * 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作。
93
- * @displayName hy-modal
94
- */
95
- defineOptions({})
96
91
  export default {
97
92
  name: 'hy-modal',
98
93
  options: {
@@ -107,11 +102,16 @@ export default {
107
102
  import { ref, toRefs, watch } from 'vue'
108
103
  import type { IModalEmits } from './typing'
109
104
  import { addUnit } from '../../utils'
110
-
111
105
  // 组件
112
106
  import HyPopup from '../hy-popup/hy-popup.vue'
113
107
  import HyLoading from '../hy-loading/hy-loading.vue'
114
108
 
109
+ /**
110
+ * 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作。
111
+ * @displayName hy-modal
112
+ */
113
+ defineOptions({})
114
+
115
115
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
116
116
  const props = defineProps({
117
117
  /** 是否显示模态框 */
@@ -78,7 +78,7 @@
78
78
  /* 取消 */
79
79
  &--cancel {
80
80
  //background-color: $hy-background--empty;
81
- background-color: #323233;
81
+ background-color: $hy-background--empty;
82
82
 
83
83
  &-text {
84
84
  color: $hy-text-color;
@@ -84,11 +84,6 @@
84
84
  </template>
85
85
 
86
86
  <script lang="ts">
87
- /**
88
- * 一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uni-app带的导航栏。
89
- * @displayName hy-navbar
90
- */
91
- defineOptions({})
92
87
  export default {
93
88
  name: 'hy-navbar',
94
89
  options: {
@@ -105,11 +100,16 @@ import type { CSSProperties, PropType } from 'vue'
105
100
  import type { INavbarEmits } from './typing'
106
101
  import { addUnit, getPx, getWindowInfo } from '../../utils'
107
102
  import { IconConfig } from '../../config'
108
-
109
103
  // 组件
110
104
  import HyIcon from '../hy-icon/hy-icon.vue'
111
105
  import HyStatusBar from '../hy-status-bar/hy-status-bar.vue'
112
106
 
107
+ /**
108
+ * 一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uni-app带的导航栏。
109
+ * @displayName hy-navbar
110
+ */
111
+ defineOptions({})
112
+
113
113
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
114
114
  const props = defineProps({
115
115
  /** 是否开启顶部安全区适配 */