hy-app 0.5.4 → 0.5.6

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 (115) hide show
  1. package/components/hy-action-sheet/typing.d.ts +1 -63
  2. package/components/hy-address-picker/hy-address-picker.vue +7 -6
  3. package/components/hy-address-picker/typing.d.ts +0 -84
  4. package/components/hy-avatar/typing.d.ts +0 -66
  5. package/components/hy-back-top/props.ts +2 -3
  6. package/components/hy-back-top/typing.d.ts +0 -47
  7. package/components/hy-badge/props.ts +1 -1
  8. package/components/hy-badge/typing.d.ts +3 -60
  9. package/components/hy-button/props.ts +1 -1
  10. package/components/hy-button/typing.d.ts +28 -162
  11. package/components/hy-calendar/hy-calendar.vue +2 -2
  12. package/components/hy-calendar/typing.d.ts +0 -128
  13. package/components/hy-card/hy-card.vue +14 -13
  14. package/components/hy-card/props.ts +4 -6
  15. package/components/hy-card/typing.d.ts +1 -114
  16. package/components/hy-cell/hy-cell.vue +9 -190
  17. package/components/hy-cell/props.ts +7 -26
  18. package/components/hy-cell/typing.d.ts +2 -96
  19. package/components/hy-cell-item/hy-cell-item.vue +160 -0
  20. package/components/hy-cell-item/index.scss +100 -0
  21. package/components/hy-cell-item/props.ts +66 -0
  22. package/components/hy-cell-item/typing.d.ts +7 -0
  23. package/components/hy-check-button/typing.d.ts +0 -43
  24. package/components/hy-checkbox/typing.d.ts +1 -73
  25. package/components/hy-checkbox-group/props.ts +1 -1
  26. package/components/hy-checkbox-group/typing.d.ts +0 -65
  27. package/components/hy-checkbox-item/typing.d.ts +3 -3
  28. package/components/hy-code-input/typing.d.ts +0 -70
  29. package/components/hy-count-down/typing.d.ts +1 -20
  30. package/components/hy-count-to/typing.d.ts +0 -47
  31. package/components/hy-coupon/typing.d.ts +0 -133
  32. package/components/hy-datetime-picker/typing.d.ts +0 -119
  33. package/components/hy-dropdown-item/typing.d.ts +12 -31
  34. package/components/hy-empty/typing.d.ts +1 -59
  35. package/components/hy-float-button/typing.d.ts +24 -113
  36. package/components/hy-form/typing.d.ts +0 -27
  37. package/components/hy-form-item/hy-form-item.vue +7 -5
  38. package/components/hy-form-item/typing.d.ts +0 -19
  39. package/components/hy-grid/props.ts +1 -1
  40. package/components/hy-grid/typing.d.ts +1 -45
  41. package/components/hy-icon/props.ts +1 -1
  42. package/components/hy-icon/typing.d.ts +3 -84
  43. package/components/hy-image/typing.d.ts +0 -80
  44. package/components/hy-input/hy-input.vue +19 -22
  45. package/components/hy-input/props.ts +1 -1
  46. package/components/hy-input/typing.d.ts +0 -149
  47. package/components/hy-list/typing.d.ts +0 -51
  48. package/components/hy-menu/props.ts +2 -2
  49. package/components/hy-menu/typing.d.ts +0 -35
  50. package/components/hy-modal/typing.d.ts +9 -84
  51. package/components/hy-navbar/typing.d.ts +0 -81
  52. package/components/hy-notice-bar/typing.d.ts +0 -65
  53. package/components/hy-number-step/props.ts +1 -1
  54. package/components/hy-number-step/typing.d.ts +0 -110
  55. package/components/hy-overlay/typing.d.ts +2 -27
  56. package/components/hy-pagination/typing.d.ts +6 -49
  57. package/components/hy-picker/typing.d.ts +27 -124
  58. package/components/hy-popover/typing.d.ts +25 -66
  59. package/components/hy-popup/typing.d.ts +8 -77
  60. package/components/hy-price/hy-price.vue +9 -2
  61. package/components/hy-price/typing.d.ts +0 -41
  62. package/components/hy-qrcode/hy-qrcode.vue +3 -4
  63. package/components/hy-qrcode/index.scss +3 -3
  64. package/components/hy-qrcode/qrcode.js +0 -138
  65. package/components/hy-qrcode/typing.d.ts +0 -66
  66. package/components/hy-radio/typing.d.ts +1 -86
  67. package/components/hy-rate/typing.d.ts +0 -62
  68. package/components/hy-read-more/typing.d.ts +4 -49
  69. package/components/hy-scroll-list/typing.d.ts +4 -33
  70. package/components/hy-search/props.ts +1 -2
  71. package/components/hy-search/typing.d.ts +19 -120
  72. package/components/hy-signature/typing.d.ts +0 -101
  73. package/components/hy-slider/typing.d.ts +8 -77
  74. package/components/hy-steps/typing.d.ts +16 -60
  75. package/components/hy-submit-bar/typing.d.ts +0 -72
  76. package/components/hy-subsection/typing.d.ts +0 -49
  77. package/components/hy-swipe-action/index.ts +13 -22
  78. package/components/hy-swipe-action/typing.d.ts +1 -38
  79. package/components/hy-swiper/typing.d.ts +0 -101
  80. package/components/hy-switch/props.ts +1 -1
  81. package/components/hy-switch/typing.d.ts +0 -62
  82. package/components/hy-tabbar/index.scss +1 -1
  83. package/components/hy-tabbar/props.ts +1 -1
  84. package/components/hy-tabbar/typing.d.ts +0 -40
  85. package/components/hy-tabbar-group/props.ts +1 -1
  86. package/components/hy-tabbar-item/typing.ts +0 -12
  87. package/components/hy-tabs/props.ts +1 -1
  88. package/components/hy-tabs/typing.d.ts +25 -92
  89. package/components/hy-tag/props.ts +1 -1
  90. package/components/hy-tag/typing.d.ts +9 -78
  91. package/components/hy-text/typing.d.ts +3 -100
  92. package/components/hy-textarea/typing.d.ts +0 -27
  93. package/components/hy-tooltip/props.ts +0 -1
  94. package/components/hy-tooltip/typing.d.ts +2 -55
  95. package/components/hy-transition/typing.d.ts +14 -43
  96. package/components/hy-upload/typing.d.ts +56 -164
  97. package/components/hy-warn/typing.d.ts +4 -45
  98. package/global.d.ts +1 -0
  99. package/libs/css/theme.scss +1 -1
  100. package/package.json +2 -2
  101. package/web-types.json +1 -1
  102. package/components/hy-card/index.scss +0 -57
  103. package/components/hy-cell/index.scss +0 -136
  104. package/components/hy-config-provider/typing.d.ts +0 -24
  105. package/components/hy-divider/typing.d.ts +0 -64
  106. package/components/hy-dropdown/typing.d.ts +0 -48
  107. package/components/hy-form-group/typing.d.ts +0 -0
  108. package/components/hy-line/typing.d.ts +0 -32
  109. package/components/hy-line-progress/typing.d.ts +0 -32
  110. package/components/hy-loading/typing.d.ts +0 -52
  111. package/components/hy-notify/typing.d.ts +0 -48
  112. package/components/hy-status-bar/typing.d.ts +0 -12
  113. package/components/hy-tabbar-group/README.md +0 -326
  114. package/components/hy-waterfall/typing.d.ts +0 -14
  115. package/components/hy-watermark/typing.d.ts +0 -76
@@ -1,98 +1,4 @@
1
- import type { CSSProperties } from 'vue'
2
- import { HyApp } from '../../typing'
3
- import type HyIconProps from '../hy-icon/typing'
4
-
5
- export interface CellContentVo extends AnyObject {
6
- /**
7
- * @description 单元格左图标
8
- * */
9
- icon?: Partial<HyIconProps>
10
-
11
- /**
12
- * @description 单元格标题
13
- * */
14
- title?: string
15
- /**
16
- * @description 单元格副标题
17
- * */
18
- subhead?: string
19
- /**
20
- * @description 是否禁用单元格
21
- * */
22
- disabled?: boolean
23
- /**
24
- * @description 单元格右图标集合
25
- * */
26
- rightIcon?: Partial<HyIconProps>
27
- /**
28
- * @description 单元格值
29
- * */
30
- value?: string | number | boolean
31
- /**
32
- * @description 跳转页面地址
33
- * */
34
- url?: string
35
- /**
36
- * @description 单元格右侧箭头的方向,可选值为:left,up,down,right
37
- * */
38
- arrowDirection?: HyApp.RotateType
39
- }
40
- export default interface HyCellProps {
41
- /**
42
- * @description cell列表数据
43
- * */
44
- list: CellContentVo[]
45
- /**
46
- * @description 头部标题
47
- * */
48
- title?: string
49
- /**
50
- * @description 是否显示标题前缀竖线
51
- * */
52
- showVertical?: boolean
53
- /**
54
- * @description 是否显示cell下边框 (默认 true )
55
- * */
56
- border?: boolean
57
- /**
58
- * @description 圆角
59
- * */
60
- borderRadius?: string | number
61
- /**
62
- * @description 是否禁用cell(默认false)
63
- * */
64
- disabled?: boolean
65
- /**
66
- * @description 是否开启点击反馈(表现为点击时加上灰色背景) (默认 false )
67
- * */
68
- clickable?: boolean
69
- /**
70
- * @description 单元的大小,可选值为 large,medium,small
71
- * */
72
- size?: HyApp.SizeType
73
- /**
74
- * @description 右侧的内容
75
- * */
76
- value?: string
77
- /**
78
- * @description 内容是否垂直居中(主要是针对右侧的value部分) (默认 false )
79
- * */
80
- arrange?: HyApp.LeftRightType | 'center'
81
- /**
82
- * @description 右侧的图标箭头icon集合
83
- * */
84
- rightIcon?: Partial<HyIconProps>
85
- /**
86
- * @description 右侧箭头的方向,可选值为:left,up,down
87
- * */
88
- arrowDirection?: 'left' | 'up' | 'down' | 'right'
89
- /**
90
- * @description 定义需要用到的外部样式
91
- * */
92
- customStyle?: CSSProperties
93
- }
94
-
95
1
  export interface ICellEmits {
96
- /** 点击行触发 */
97
- (e: 'click', temp: CellContentVo, index: number): void
2
+ /** 点击单元格触发 */
3
+ (e: 'click', name: string | number): void
98
4
  }
@@ -0,0 +1,160 @@
1
+ <template>
2
+ <view
3
+ :class="cellClass"
4
+ :hover-class="hoverClass"
5
+ :style="customStyle"
6
+ :hover-stay-time="250"
7
+ @tap="clickHandler"
8
+ >
9
+ <view class="hy-cell-item__left">
10
+ <view v-if="icon || $slots.icon" class="hy-cell-item__left--icon">
11
+ <!-- @slot 图标插槽 -->
12
+ <slot v-if="$slots.icon" name="icon" :icon="item?.icon"></slot>
13
+ <hy-icon
14
+ v-else
15
+ :size="iconSize"
16
+ :name="icon?.name"
17
+ :color="!!(disabled || cellConfig?.disabled.value) ? '#FFFFFF3F' : icon?.color"
18
+ :bold="icon?.bold"
19
+ :customPrefix="icon?.customPrefix"
20
+ :imgMode="icon?.imgMode"
21
+ :width="icon?.width"
22
+ :height="icon?.height"
23
+ :top="icon?.top"
24
+ :stop="icon?.stop"
25
+ :round="icon?.round"
26
+ :customStyle="icon?.customStyle"
27
+ ></hy-icon>
28
+ </view>
29
+ <view class="hy-cell-item__left--title">
30
+ <!-- @slot 列表标题插槽 -->
31
+ <slot v-if="$slots.title" name="title" :title="title"></slot>
32
+ <text v-else class="hy-cell-item__left--title__text">
33
+ {{ title }}
34
+ </text>
35
+ <!-- @slot 列表小标题插槽 -->
36
+ <slot v-if="$slots.sub" name="sub" :sub="sub"></slot>
37
+ <text v-else-if="sub" class="hy-cell-item__left--title__sub">
38
+ {{ sub }}
39
+ </text>
40
+ </view>
41
+ </view>
42
+ <view
43
+ class="hy-cell-item__center"
44
+ :style="{
45
+ justifyContent:
46
+ cellConfig?.arrange.value === 'left'
47
+ ? 'flex-start'
48
+ : cellConfig?.arrange.value === 'right'
49
+ ? 'flex-end'
50
+ : 'center'
51
+ }"
52
+ >
53
+ <!-- @slot 值内容插槽 -->
54
+ <slot v-if="$slots.value" name="value" :record="item"></slot>
55
+ <text v-else-if="value" class="hy-cell-item__center--value">
56
+ {{ value }}
57
+ </text>
58
+ </view>
59
+ <view
60
+ :class="[
61
+ 'hy-cell-item__right',
62
+ `hy-cell-item__right--${cellConfig?.arrowDirection.value}`
63
+ ]"
64
+ v-if="cellConfig?.isRightIcon.value"
65
+ >
66
+ <!-- @slot 右边按钮插槽 -->
67
+ <slot v-if="$slots['right-icon']" name="right-icon" :icon="rightIcon"></slot>
68
+ <hy-icon
69
+ v-else
70
+ :name="rightIcon?.name || IconConfig.RIGHT"
71
+ :color="!!(disabled || cellConfig?.disabled.value) ? '#FFFFFF3F' : rightIcon?.color"
72
+ :bold="rightIcon?.bold"
73
+ :customPrefix="rightIcon?.customPrefix"
74
+ :imgMode="rightIcon?.imgMode"
75
+ :width="rightIcon?.width"
76
+ :height="rightIcon?.height"
77
+ :stop="rightIcon?.stop"
78
+ :round="rightIcon?.round"
79
+ :customStyle="rightIcon?.customStyle"
80
+ :customClass="rightIcon?.customClass"
81
+ ></hy-icon>
82
+ </view>
83
+ </view>
84
+ </template>
85
+
86
+ <script lang="ts">
87
+ export default {
88
+ name: 'hy-cell-item',
89
+ options: {
90
+ virtualHost: true,
91
+ styleIsolation: 'shared'
92
+ }
93
+ }
94
+ </script>
95
+
96
+ <script setup lang="ts">
97
+ import { computed, inject } from 'vue'
98
+ import cellItemProps from './props'
99
+ import type { ICellContext } from './typing'
100
+ import { IconConfig } from '../../libs'
101
+ import type { ICellEmits } from '../hy-cell/typing'
102
+ // 组件
103
+ import HyIcon from '../hy-icon/hy-icon.vue'
104
+
105
+ const props = defineProps(cellItemProps)
106
+ const emit = defineEmits<ICellEmits>()
107
+ const cellConfig = inject<ICellContext>('hy-cell')
108
+
109
+ // 单元格类名
110
+ const cellClass = computed(() => {
111
+ return [
112
+ 'hy-cell-item',
113
+ `hy-cell-item--${cellConfig?.size.value}`,
114
+ cellConfig?.border.value && 'hy-border__bottom',
115
+ (props.disabled || cellConfig?.disabled.value) && 'hy-cell-item__disabled',
116
+ props.customClass
117
+ ]
118
+ })
119
+
120
+ // 计算什么时候出现点击状态
121
+ const hoverClass = computed(() => {
122
+ if (!(props.disabled || cellConfig?.disabled.value) && cellConfig?.clickable.value) {
123
+ return 'hy-cell-item__clickable'
124
+ } else {
125
+ return ''
126
+ }
127
+ })
128
+
129
+ // 图标大小
130
+ const iconSize = computed(() => {
131
+ switch (cellConfig?.size.value) {
132
+ case 'large':
133
+ return 25
134
+ case 'medium':
135
+ return 20
136
+ case 'small':
137
+ return 15
138
+ }
139
+ })
140
+
141
+ /**
142
+ * 点击cell
143
+ * */
144
+ const clickHandler = (e: Event) => {
145
+ if (cellConfig?.disabled.value || props.disabled) return
146
+ if (props.stop) e.stopPropagation()
147
+
148
+ emit('click', props.name)
149
+ cellConfig?.onClick(props.name)
150
+ if (props.url) {
151
+ ;(uni as any)[props.linkType]({
152
+ url: props.url
153
+ })
154
+ }
155
+ }
156
+ </script>
157
+
158
+ <style lang="scss" scoped>
159
+ @import './index.scss';
160
+ </style>
@@ -0,0 +1,100 @@
1
+ @use "../../libs/css/mixin.scss" as *;
2
+ @use "../../libs/css/theme" as *;
3
+
4
+
5
+ @include b(cell-item) {
6
+ @include flex(row);
7
+ align-items: center;
8
+ justify-content: space-between;
9
+ flex: 1;
10
+ background-color: $hy-background--container;
11
+
12
+ /* 大 */
13
+ @include m(large) {
14
+ font-size: $hy-font-size-lg;
15
+ padding: 35rpx;
16
+ line-height: 25px;
17
+ }
18
+
19
+ /* 默认 */
20
+ @include m(medium) {
21
+ font-size: $hy-font-size-base;
22
+ padding: 30rpx;
23
+ line-height: 20px;
24
+ }
25
+
26
+ /* 小 */
27
+ @include m(small) {
28
+ font-size: $hy-font-size-sm;
29
+ padding: 25rpx;
30
+ line-height: 15px;
31
+ }
32
+
33
+ /*点击状态*/
34
+ @include e(clickable) {
35
+ background-color: $hy-background--hover;
36
+ }
37
+
38
+ @include e(left) {
39
+ @include flex(row);
40
+ /*左边icon*/
41
+ @include m(icon) {
42
+ @include flex;
43
+ align-items: center;
44
+ margin-right: 10px;
45
+ }
46
+ /*行头部*/
47
+ @include m(title) {
48
+ margin-right: $hy-border-margin-padding-sm;
49
+ display: flex;
50
+ flex-direction: column;
51
+
52
+ /*sub值*/
53
+ @include e(sub) {
54
+ margin-top: $hy-border-margin-padding-sm;
55
+ color: $hy-text-color--grey;
56
+ font-size: 24rpx;
57
+ }
58
+ }
59
+ }
60
+
61
+ /*cell值*/
62
+ @include e(center) {
63
+ @include flex;
64
+ max-width: 90%;
65
+ flex: 1;
66
+ @include m(value) {
67
+ line-height: 24px;
68
+ color: $hy-text-color--grey;
69
+ margin-right: $hy-border-margin-padding-sm;
70
+ }
71
+ }
72
+
73
+ /*右边icon*/
74
+ @include e(right) {
75
+ transition: transform 0.3s;
76
+ :deep(.hy-icon) {
77
+ color: $hy-text-color--3;
78
+ }
79
+
80
+ @include m(up) {
81
+ transform: rotate(-90deg);
82
+ }
83
+
84
+ @include m(left) {
85
+ transform: rotate(180deg);
86
+ }
87
+
88
+ @include m(down) {
89
+ transform: rotate(90deg);
90
+ }
91
+ }
92
+
93
+ @include e(disabled) {
94
+ color: $hy-text-color--disabled;
95
+ background: $hy-background--disabled;
96
+ /* #ifndef APP-NVUE */
97
+ cursor: not-allowed;
98
+ /* #endif */
99
+ }
100
+ }
@@ -0,0 +1,66 @@
1
+ import type { CSSProperties, PropType } from 'vue'
2
+ import type { HyIconProps } from '../hy-icon/typing'
3
+
4
+ const cellItemProps = {
5
+ /** 头部标题 */
6
+ title: String,
7
+ /** 标题下面小提示 */
8
+ sub: String,
9
+ /** 是否禁用cell */
10
+ disabled: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ /** 右侧的内容 */
15
+ value: String,
16
+ /** 图标,接收icon对象 */
17
+ icon: {
18
+ type: Object as PropType<HyIconProps>
19
+ },
20
+ /** 右边图标,默认是向左图标 */
21
+ rightIcon: {
22
+ type: Object as PropType<HyIconProps>
23
+ },
24
+ /**
25
+ * 右侧箭头的方向
26
+ * @values left,up,down
27
+ * */
28
+ arrowDirection: {
29
+ type: String,
30
+ default: 'right'
31
+ },
32
+ /**
33
+ * 点击后跳转的URL地址
34
+ * */
35
+ url: {
36
+ type: String,
37
+ default: ''
38
+ },
39
+ /**
40
+ * 链接跳转的方式,内部使用的是uview-plus封装的route方法,可能会进行拦截操作
41
+ * */
42
+ linkType: {
43
+ type: String,
44
+ default: 'navigateTo'
45
+ },
46
+ /**
47
+ * 点击cell是否阻止事件传播
48
+ * */
49
+ stop: {
50
+ type: Boolean,
51
+ default: true
52
+ },
53
+ /**
54
+ * 标识符,用于在click事件中进行返回
55
+ * */
56
+ name: {
57
+ type: [String, Number],
58
+ default: ''
59
+ },
60
+ /** 定义需要用到的外部样式 */
61
+ customStyle: Object as PropType<CSSProperties>,
62
+ /** 自定义外部类名 */
63
+ customClass: String
64
+ }
65
+
66
+ export default cellItemProps
@@ -0,0 +1,7 @@
1
+ import type { ExtractPropTypes, ToRefs } from 'vue'
2
+ import type cellProps from '../hy-cell/props'
3
+
4
+ export interface ICellContext extends ToRefs<ExtractPropTypes<typeof cellProps>> {
5
+ /** 点击事件 */
6
+ onClick: (name: string | number) => void
7
+ }
@@ -36,49 +36,6 @@ export type FieldNamesType = {
36
36
  [key in keyof IFieldNames as IFieldNames[key]]?: string | number | boolean
37
37
  }
38
38
 
39
- export default interface HyCheckButtonProps {
40
- /**
41
- * @description 选中得值,radio是字符串,checkbox是数组
42
- * */
43
- modelValue: (string | number) | (string | number)[]
44
- /**
45
- * @description 选择列表数据
46
- * */
47
- columns: CheckboxColumnsVo[]
48
- /**
49
- * @description columns对应得键
50
- * */
51
- fieldNames?: IFieldNames
52
- /**
53
- * @description 选择单选框还是复选框
54
- * */
55
- selectType?: 'checkbox' | 'radio'
56
- /**
57
- * @description 禁用
58
- * */
59
- disabled?: boolean
60
- /**
61
- * @description 每行几列,每列等宽
62
- * */
63
- col?: string
64
- /**
65
- * @description 设置每行间距,需要加单位
66
- * */
67
- gap?: string
68
- /**
69
- * @description 标签类型info、primary、success、warning、error (默认 'primary' )
70
- * */
71
- type?: HyApp.ThemeType
72
- /**
73
- * @description 标签的大小,large,medium,small (默认 'medium' )
74
- * */
75
- size?: HyApp.SizeType
76
- /**
77
- * @description tag的形状,circle(两边半圆形), square(方形,带圆角)(默认 'square' )
78
- * */
79
- shape?: HyApp.ShapeType
80
- }
81
-
82
39
  export interface ICheckButtonEmits {
83
40
  /** 选择触发 */
84
41
  (e: 'change', value: any): void
@@ -1,76 +1,4 @@
1
- import type { CSSProperties } from 'vue'
2
- import type { CheckboxColumnsVo, IFieldNames } from '../hy-check-button/typing'
3
-
4
- export default interface HyCheckboxProps {
5
- /**
6
- * @description 双向绑定值,数组类型
7
- * */
8
- modelValue: (string | number)[] | boolean
9
- /**
10
- * @description 接收数组值
11
- * */
12
- columns: CheckboxColumnsVo[]
13
- /**
14
- * @description 自定义接收columns的键
15
- * */
16
- fieldNames?: IFieldNames
17
- /**
18
- * @description 形状,square为方形,circle为圆型
19
- * */
20
- shape?: HyApp.ShapeType
21
- /**
22
- * @description 复选框大小
23
- * */
24
- size?: HyApp.SizeType | string | number
25
- /**
26
- * @description 是否禁用
27
- * */
28
- disabled?: boolean
29
- /**
30
- * @description 选中状态下的颜色
31
- * */
32
- activeColor?: string
33
- /**
34
- * @description 未选中的颜色
35
- * */
36
- inactiveColor?: string
37
- /**
38
- * @description 图标的大小,单位px
39
- * */
40
- iconSize?: string | number
41
- /**
42
- * @description 图标颜色
43
- * */
44
- iconColor?: string
45
- /**
46
- * @description label的字体大小,px单位
47
- * */
48
- labelSize?: string | number
49
- /**
50
- * @description label的颜色
51
- * */
52
- labelColor?: string
53
- /**
54
- * @description 勾选图标的对齐方式,left-左边,right-右边
55
- * */
56
- iconPlacement?: HyApp.LeftRightType
57
- /**
58
- * @description 竖向配列时,是否显示下划线
59
- * */
60
- borderBottom?: boolean
61
- /**
62
- * @description 是否禁止点击提示语选中复选框
63
- * */
64
- labelDisabled?: boolean
65
- /**
66
- * @description 定义需要用到的外部样式
67
- * */
68
- customStyle?: CSSProperties
69
- /**
70
- * @description 排列方式,row-横向,column-纵向
71
- * */
72
- placement?: HyApp.DirectionType
73
- }
1
+ import type { CheckboxColumnsVo } from '../hy-check-button/typing'
74
2
 
75
3
  export interface ICheckBoxEmits {
76
4
  /** 选择触发 */
@@ -75,6 +75,6 @@ const checkboxGroupProps = {
75
75
  customStyle: {
76
76
  type: Object as PropType<CSSProperties>
77
77
  }
78
- }
78
+ } as const
79
79
 
80
80
  export default checkboxGroupProps
@@ -1,68 +1,3 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
- export default interface HyCheckboxGroupProps {
4
- /**
5
- * @description 双向绑定值,数组类型
6
- * */
7
- modelValue: (string | number)[]
8
- /**
9
- * @description 形状,square为方形,circle为圆型
10
- * */
11
- shape?: HyApp.ShapeType
12
- /**
13
- * @description 复选框大小
14
- * */
15
- size?: HyApp.SizeType | string | number
16
- /**
17
- * @description 是否禁用
18
- * */
19
- disabled?: boolean
20
- /**
21
- * @description 选中状态下的颜色
22
- * */
23
- activeColor?: string
24
- /**
25
- * @description 未选中的颜色
26
- * */
27
- inactiveColor?: string
28
- /**
29
- * @description 图标的大小,单位px
30
- * */
31
- iconSize?: string | number
32
- /**
33
- * @description 图标颜色
34
- * */
35
- iconColor?: string
36
- /**
37
- * @description label的字体大小,px单位
38
- * */
39
- labelSize?: string | number
40
- /**
41
- * @description label的颜色
42
- * */
43
- labelColor?: string
44
- /**
45
- * @description 勾选图标的对齐方式,left-左边,right-右边
46
- * */
47
- iconPlacement?: HyApp.LeftRightType
48
- /**
49
- * @description 竖向配列时,是否显示下划线
50
- * */
51
- borderBottom?: boolean
52
- /**
53
- * @description 是否禁止点击提示语选中复选框
54
- * */
55
- labelDisabled?: boolean
56
- /**
57
- * @description 定义需要用到的外部样式
58
- * */
59
- customStyle?: CSSProperties
60
- /**
61
- * @description 排列方式,row-横向,column-纵向
62
- * */
63
- placement?: HyApp.DirectionType
64
- }
65
-
66
1
  export interface ICheckBoxGroupEmits {
67
2
  /** 选择触发 */
68
3
  (e: 'change', temp: CheckboxColumnsVo): void
@@ -1,7 +1,7 @@
1
- import type HyCheckboxGroupProps from '../hy-checkbox-group/typing'
2
- import type { ToRefs } from 'vue'
1
+ import type checkboxGroupProps from '../hy-checkbox-group/props'
2
+ import type { ExtractPropTypes, ToRefs } from 'vue'
3
3
 
4
- export interface ICheckboxGroupContext extends ToRefs<HyCheckboxGroupProps> {
4
+ export interface ICheckboxGroupContext extends ToRefs<ExtractPropTypes<typeof checkboxGroupProps>> {
5
5
  /** 设置check的状态 */
6
6
  setCheckedStatus: (name: string | number) => void
7
7
  }