hy-app 0.5.3 → 0.5.5

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 (121) 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/hy-avatar.vue +4 -3
  5. package/components/hy-avatar/typing.d.ts +0 -66
  6. package/components/hy-back-top/typing.d.ts +0 -47
  7. package/components/hy-badge/hy-badge.vue +3 -3
  8. package/components/hy-badge/index.scss +0 -1
  9. package/components/hy-badge/props.ts +6 -1
  10. package/components/hy-badge/typing.d.ts +0 -62
  11. package/components/hy-button/typing.d.ts +28 -162
  12. package/components/hy-calendar/hy-calendar.vue +2 -2
  13. package/components/hy-calendar/typing.d.ts +0 -128
  14. package/components/hy-card/hy-card.vue +12 -12
  15. package/components/hy-card/index.scss +17 -5
  16. package/components/hy-card/props.ts +1 -2
  17. package/components/hy-card/typing.d.ts +1 -114
  18. package/components/hy-cell/props.ts +1 -1
  19. package/components/hy-cell/typing.d.ts +0 -55
  20. package/components/hy-check-button/typing.d.ts +0 -43
  21. package/components/hy-checkbox/typing.d.ts +1 -73
  22. package/components/hy-checkbox-group/typing.d.ts +0 -65
  23. package/components/hy-code-input/typing.d.ts +0 -70
  24. package/components/hy-count-down/typing.d.ts +1 -20
  25. package/components/hy-count-to/typing.d.ts +0 -47
  26. package/components/hy-coupon/index.scss +7 -2
  27. package/components/hy-coupon/props.ts +7 -4
  28. package/components/hy-coupon/typing.d.ts +1 -134
  29. package/components/hy-datetime-picker/props.ts +1 -3
  30. package/components/hy-datetime-picker/typing.d.ts +0 -119
  31. package/components/hy-dropdown-item/typing.d.ts +12 -31
  32. package/components/hy-empty/typing.d.ts +1 -59
  33. package/components/hy-float-button/typing.d.ts +24 -113
  34. package/components/hy-folding-panel/props.ts +1 -1
  35. package/components/hy-folding-panel/typing.d.ts +0 -38
  36. package/components/hy-folding-panel-item/hy-folding-panel-item.vue +2 -3
  37. package/components/hy-folding-panel-item/typing.d.ts +14 -0
  38. package/components/hy-form/typing.d.ts +0 -27
  39. package/components/hy-form-item/hy-form-item.vue +7 -5
  40. package/components/hy-form-item/typing.d.ts +0 -19
  41. package/components/hy-grid/typing.d.ts +0 -43
  42. package/components/hy-icon/hy-icon.vue +3 -8
  43. package/components/hy-icon/typing.d.ts +0 -86
  44. package/components/hy-image/typing.d.ts +0 -80
  45. package/components/hy-input/typing.d.ts +0 -149
  46. package/components/hy-list/props.ts +1 -1
  47. package/components/hy-list/typing.d.ts +0 -51
  48. package/components/hy-menu/typing.d.ts +0 -35
  49. package/components/hy-modal/typing.d.ts +9 -84
  50. package/components/hy-navbar/typing.d.ts +0 -81
  51. package/components/hy-notice-bar/typing.d.ts +2 -65
  52. package/components/hy-number-step/typing.d.ts +0 -110
  53. package/components/hy-overlay/typing.d.ts +2 -27
  54. package/components/hy-pagination/typing.d.ts +6 -49
  55. package/components/hy-picker/typing.d.ts +27 -124
  56. package/components/hy-popover/typing.d.ts +25 -66
  57. package/components/hy-popup/hy-popup.vue +0 -1
  58. package/components/hy-popup/typing.d.ts +8 -77
  59. package/components/hy-price/typing.d.ts +0 -41
  60. package/components/hy-qrcode/hy-qrcode.vue +67 -2
  61. package/components/hy-qrcode/index.scss +3 -4
  62. package/components/hy-qrcode/typing.d.ts +0 -66
  63. package/components/hy-radio/typing.d.ts +1 -86
  64. package/components/hy-rate/typing.d.ts +0 -62
  65. package/components/hy-read-more/typing.d.ts +4 -49
  66. package/components/hy-scroll-list/typing.d.ts +4 -33
  67. package/components/hy-search/typing.d.ts +19 -120
  68. package/components/hy-signature/hy-signature.vue +25 -22
  69. package/components/hy-signature/index.scss +0 -4
  70. package/components/hy-signature/typing.d.ts +0 -101
  71. package/components/hy-slider/typing.d.ts +8 -77
  72. package/components/hy-steps/typing.d.ts +16 -60
  73. package/components/hy-submit-bar/typing.d.ts +0 -72
  74. package/components/hy-subsection/typing.d.ts +0 -49
  75. package/components/hy-swipe-action/index.ts +13 -22
  76. package/components/hy-swipe-action/typing.d.ts +1 -38
  77. package/components/hy-swiper/typing.d.ts +0 -101
  78. package/components/hy-switch/typing.d.ts +0 -62
  79. package/components/hy-tabbar/hy-tabbar.vue +137 -0
  80. package/components/{hy-tabBar → hy-tabbar}/index.scss +31 -31
  81. package/components/hy-tabbar/props.ts +59 -0
  82. package/components/hy-tabbar/typing.d.ts +21 -0
  83. package/components/hy-tabbar-group/hy-tabbar-group.vue +87 -0
  84. package/components/hy-tabbar-group/index.scss +57 -0
  85. package/components/hy-tabbar-group/props.ts +78 -0
  86. package/components/hy-tabbar-group/typing.ts +16 -0
  87. package/components/hy-tabbar-item/hy-tabbar-item.vue +103 -0
  88. package/components/hy-tabbar-item/index.scss +43 -0
  89. package/components/hy-tabbar-item/props.ts +24 -0
  90. package/components/hy-tabbar-item/typing.ts +10 -0
  91. package/components/hy-tabs/typing.d.ts +25 -92
  92. package/components/hy-tag/props.ts +8 -2
  93. package/components/hy-tag/typing.d.ts +9 -78
  94. package/components/hy-text/props.ts +8 -2
  95. package/components/hy-text/typing.d.ts +3 -100
  96. package/components/hy-textarea/props.ts +4 -1
  97. package/components/hy-textarea/typing.d.ts +0 -27
  98. package/components/hy-tooltip/props.ts +1 -4
  99. package/components/hy-tooltip/typing.d.ts +2 -55
  100. package/components/hy-transition/typing.d.ts +14 -43
  101. package/components/hy-upload/props.ts +1 -1
  102. package/components/hy-upload/typing.d.ts +56 -164
  103. package/components/hy-warn/typing.d.ts +4 -45
  104. package/components/index.ts +177 -177
  105. package/global.d.ts +87 -85
  106. package/package.json +2 -2
  107. package/web-types.json +1 -1
  108. package/components/hy-config-provider/typing.d.ts +0 -24
  109. package/components/hy-divider/typing.d.ts +0 -64
  110. package/components/hy-dropdown/typing.d.ts +0 -48
  111. package/components/hy-form-group/typing.d.ts +0 -0
  112. package/components/hy-line/typing.d.ts +0 -32
  113. package/components/hy-line-progress/typing.d.ts +0 -32
  114. package/components/hy-loading/typing.d.ts +0 -52
  115. package/components/hy-notify/typing.d.ts +0 -48
  116. package/components/hy-status-bar/typing.d.ts +0 -12
  117. package/components/hy-tabBar/hy-tabBar.vue +0 -109
  118. package/components/hy-tabBar/props.ts +0 -13
  119. package/components/hy-tabBar/typing.d.ts +0 -54
  120. package/components/hy-waterfall/typing.d.ts +0 -14
  121. package/components/hy-watermark/typing.d.ts +0 -76
@@ -1,53 +1,10 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
- export default interface HyPaginationProps {
4
- /**
5
- * @description 当前页
6
- */
7
- modelValue: number
8
- /**
9
- * @description 总页数,如果有total,则优先使用total计算页数
10
- */
11
- totalPage?: number
12
- /**
13
- * @description 是否展示分页为Icon图标
14
- */
15
- showIcon?: boolean
16
- /**
17
- * @desc 是否展示总条数
18
- */
19
- showMessage?: boolean
20
- /**
21
- * @description 总条数
22
- */
23
- total?: number
24
- /**
25
- * @description 每页条数
26
- */
27
- pageSize?: number
28
- /**
29
- * @description 上一页文本
30
- */
31
- prevText?: string
32
- /**
33
- * @description 下一页文本
34
- */
35
- nextText?: string
36
- /**
37
- * @description 总页数只有一页时是否隐藏
38
- */
39
- hideIfOnePage?: boolean
40
- /**
41
- * @description 定义需要用到的外部样式
42
- * */
43
- customStyle?: CSSProperties
44
- }
45
1
  type PaginationVo = {
46
- value: number
2
+ value: number
47
3
  }
4
+
48
5
  export interface IPaginationEmits {
49
- /** 改变值触发 */
50
- (e: 'change', param: PaginationVo): void
51
- /** 改变值触发 */
52
- (e: 'update:modelValue', value: PaginationVo['value']): void
6
+ /** 改变值触发 */
7
+ (e: 'change', param: PaginationVo): void
8
+ /** 改变值触发 */
9
+ (e: 'update:modelValue', value: PaginationVo['value']): void
53
10
  }
@@ -1,131 +1,34 @@
1
- import type { CSSProperties } from "vue";
2
- import type HyInputProps from "../hy-input/typing";
3
-
4
1
  export interface PickerColumnVo extends AnyObject {
5
- /**
6
- * @description id必填
7
- * */
8
- id: string;
9
- /**
10
- * @description 显示文本
11
- * */
12
- text?: string;
2
+ /**
3
+ * @description id必填
4
+ * */
5
+ id: string
6
+ /**
7
+ * @description 显示文本
8
+ * */
9
+ text?: string
13
10
  }
14
11
 
15
- export default interface HyPickerProps {
16
- /**
17
- * @description 显示到输入框值
18
- * */
19
- modelValue?: string | string[];
20
- /**
21
- * @description 对象数组,设置每一列的数据
22
- * */
23
- columns: (string | PickerColumnVo)[][];
24
- /**
25
- * @description 是否显示弹窗(默认 false )
26
- * */
27
- show?: boolean;
28
- /**
29
- * @description 弹窗弹出模式
30
- * */
31
- popupMode?: HyApp.LayoutType;
32
- /**
33
- * @description 分割数组条件
34
- * */
35
- separator?: string;
36
- /**
37
- * @description 是否显示顶部的操作栏(默认 true )
38
- * */
39
- showToolbar?: boolean;
40
- /**
41
- * @description 顶部标题
42
- * */
43
- title?: string;
44
- /**
45
- * @description 是否显示加载中状态(默认 false )
46
- * */
47
- loading?: boolean;
48
- /**
49
- * @description 各列中,单个选项的高度(默认 44 )
50
- * */
51
- itemHeight?: number;
52
- /**
53
- * @description 取消按钮的文字(默认 '取消' )
54
- * */
55
- cancelText?: string;
56
- /**
57
- * @description 确认按钮的文字(默认 '确定' )
58
- * */
59
- confirmText?: string;
60
- /**
61
- * @description 取消按钮的颜色(默认 '#909193' )
62
- * */
63
- cancelColor?: string;
64
- /**
65
- * @description 确认按钮的颜色(默认 '#3c9cff' )
66
- * */
67
- confirmColor?: string;
68
- /**
69
- * @description 每列中可见选项的数量(默认 5 )
70
- * */
71
- visibleItemCount?: number;
72
- /**
73
- * @description 选项对象中,需要展示的属性键名(默认 'text' )
74
- * */
75
- keyName?: string;
76
- /**
77
- * @description 是否允许点击遮罩关闭选择器(默认 false )
78
- * */
79
- closeOnClickOverlay?: boolean;
80
- /**
81
- * @description 各列的默认索引
82
- * */
83
- defaultIndex?: number[];
84
- /**
85
- * @description 是否在手指松开时立即触发change事件(默认 true )
86
- * */
87
- immediateChange?: boolean;
88
- /**
89
- * @description 最高层级
90
- * */
91
- zIndex?: number;
92
- /**
93
- * @description 是否显示输入框(默认 false )
94
- * */
95
- hasInput?: boolean;
96
- /**
97
- * @description 输入框集合属性
98
- * */
99
- input?: Partial<HyInputProps>;
100
- /**
101
- * @description 是否自定义选择器nav左边内容
102
- * */
103
- toolbarRightSlot?: boolean;
104
- /**
105
- * @description 自定义输入框外部样式
106
- * */
107
- customStyle?: CSSProperties;
12
+ export type SelectValueVo = {
13
+ value: string[]
14
+ index?: number
15
+ indexs?: number[]
16
+ // values为当前变化列的数组内容
17
+ values?: Array<any>
18
+ columnIndex?: number
108
19
  }
109
20
 
110
- export type SelectValueVo = {
111
- value: string[];
112
- index?: number;
113
- indexs?: number[];
114
- // values为当前变化列的数组内容
115
- values?: Array<any>;
116
- columnIndex?: number;
117
- };
118
21
  export interface IPickerEmits {
119
- /** 关闭选择器时触发 */
120
- (e: "close"): void;
121
- /** 点击取消按钮 */
122
- (e: "cancel"): void;
123
- /** 点击确定按钮,返回当前选择的值 */
124
- (e: "confirm", params: SelectValueVo): void;
125
- /** 当选择值变化时触发 */
126
- (e: "change", params: SelectValueVo): void;
127
- /** 显示隐藏触发 */
128
- (e: "update:show", show: boolean): void;
129
- /** 选中值触发 */
130
- (e: "update:modelValue", value: any): void;
22
+ /** 关闭选择器时触发 */
23
+ (e: 'close'): void
24
+ /** 点击取消按钮 */
25
+ (e: 'cancel'): void
26
+ /** 点击确定按钮,返回当前选择的值 */
27
+ (e: 'confirm', params: SelectValueVo): void
28
+ /** 当选择值变化时触发 */
29
+ (e: 'change', params: SelectValueVo): void
30
+ /** 显示隐藏触发 */
31
+ (e: 'update:show', show: boolean): void
32
+ /** 选中值触发 */
33
+ (e: 'update:modelValue', value: any): void
131
34
  }
@@ -1,80 +1,39 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
1
  export type IPlacementVo =
4
- | 'top'
5
- | 'top-start'
6
- | 'top-end'
7
- | 'bottom'
8
- | 'bottom-start'
9
- | 'bottom-end'
10
- | 'left'
11
- | 'left-start'
12
- | 'left-end'
13
- | 'right'
14
- | 'right-start'
15
- | 'right-end'
2
+ | 'top'
3
+ | 'top-start'
4
+ | 'top-end'
5
+ | 'bottom'
6
+ | 'bottom-start'
7
+ | 'bottom-end'
8
+ | 'left'
9
+ | 'left-start'
10
+ | 'left-end'
11
+ | 'right'
12
+ | 'right-start'
13
+ | 'right-end'
16
14
  export type IOffset = number | number[] | Record<'x' | 'y', number>
17
15
 
18
16
  export type PopoverExpose = {
19
- open: () => void
20
- close: () => void
17
+ open: () => void
18
+ close: () => void
21
19
  }
22
20
  export interface PopoverContentVo {
23
- iconClass: string
24
- content: string
25
- icon: string
26
- }
27
-
28
- export default interface HyOverlayProps {
29
- /**
30
- * @description 控制 popover 的显示状态
31
- * */
32
- modelValue?: boolean
33
- /**
34
- * @description 显示的内容,也可以通过 slot#content 传入
35
- */
36
- content?: string | (string | PopoverContentVo)[]
37
- /**
38
- * @description 指定 popover 的放置位置:top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end
39
- */
40
- placement?: IPlacementVo
41
- /**
42
- * @description 控制 popover 的显示状态
43
- */
44
- offset?: IOffset
45
- /**
46
- * @description 是否禁用 popover
47
- */
48
- disabled?: boolean
49
- /**
50
- * @description 是否显示关闭按钮
51
- */
52
- showClose?: boolean
53
- /**
54
- * 当前显示的模式,决定内容的展现形式,可选值:normal(普通模式)/ menu(菜单模式)
55
- */
56
- mode?: 'normal' | 'menu'
57
- /**
58
- * @description 定义需要用到的外部样式
59
- * */
60
- customStyle?: CSSProperties
61
- /**
62
- * @description 定义需要用到的类名
63
- * */
64
- customClass?: string
21
+ iconClass: string
22
+ content: string
23
+ icon: string
65
24
  }
66
25
 
67
26
  export type PopoverParamsVo = {
68
- show: boolean
27
+ show: boolean
69
28
  }
70
29
  export type PopoverItemParamsVo = {
71
- item: Record<string, any>
72
- index: number
30
+ item: Record<string, any>
31
+ index: number
73
32
  }
74
33
  export interface IPopoverEmits {
75
- (e: 'menuClick', params: PopoverItemParamsVo): void
76
- (e: 'change', params: PopoverParamsVo): void
77
- (e: 'open'): void
78
- (e: 'close'): void
79
- (e: 'update:modelValue', value: boolean): void
34
+ (e: 'menuClick', params: PopoverItemParamsVo): void
35
+ (e: 'change', params: PopoverParamsVo): void
36
+ (e: 'open'): void
37
+ (e: 'close'): void
38
+ (e: 'update:modelValue', value: boolean): void
80
39
  }
@@ -19,7 +19,6 @@
19
19
  >
20
20
  <!-- @click.stop不能去除,去除会导致居中模式下点击内容区域触发关闭弹窗 -->
21
21
  <view class="hy-popup__content" :style="[contentStyle]">
22
- <!-- <u-status-bar v-if="safeAreaInsetTop"></u-status-bar>-->
23
22
  <slot></slot>
24
23
  <view
25
24
  v-if="closeable"
@@ -1,79 +1,10 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
- export default interface HyPopupProps {
4
- /**
5
- * @description 是否展示弹窗 (默认 false )
6
- * */
7
- show: boolean
8
- /**
9
- * @description 是否显示遮罩 (默认 true )
10
- * */
11
- overlay?: boolean
12
- /**
13
- * @description 弹出方向(默认 'bottom' )
14
- * */
15
- mode?: HyApp.LayoutType
16
- /**
17
- * @description 动画时长,单位ms (默认 300 )
18
- * */
19
- duration?: number
20
- /**
21
- * @description 是否显示关闭图标(默认 false )
22
- * */
23
- closeable?: boolean
24
- /**
25
- * @description 自定义遮罩的样式
26
- * */
27
- overlayStyle?: CSSProperties
28
- /**
29
- * @description 遮罩透明度,0-1之间(默认 0.5)
30
- * */
31
- overlayOpacity?: number
32
- /**
33
- * @description 点击遮罩是否关闭弹窗 (默认 true )
34
- * */
35
- closeOnClickOverlay?: boolean
36
- /**
37
- * @description 层级 (默认 10075 )
38
- * */
39
- zIndex?: number
40
- /**
41
- * @description 是否为iPhoneX留出底部安全距离 (默认 true )
42
- * */
43
- safeAreaInsetBottom?: boolean
44
- /**
45
- * @description 是否留出顶部安全距离(状态栏高度) (默认 false )
46
- * */
47
- safeAreaInsetTop?: boolean
48
- /**
49
- * @description 自定义关闭图标位置(默认 'top-right' )
50
- * */
51
- closeIconPos?: 'top-left' | 'top-right'
52
- /**
53
- * @description 圆角值(默认 0)
54
- * */
55
- round?: string | number
56
- /**
57
- * @description 当mode=center时 是否开启缩放(默认 true )
58
- * */
59
- zoom?: boolean
60
- /**
61
- * @description 背景颜色
62
- * */
63
- bgColor?: string
64
- /**
65
- * @description 自定义样式
66
- * */
67
- customStyle?: CSSProperties
68
- }
69
-
70
1
  export interface IPopupEmits {
71
- /** 弹出层打开触发 */
72
- (e: 'open'): void
73
- /** 弹出层关闭触发 */
74
- (e: 'close'): void
75
- /** 弹出层点击触发 */
76
- (e: 'click'): void
77
- /** 显示隐藏触发 */
78
- (e: 'update:show', visible: boolean): void
2
+ /** 弹出层打开触发 */
3
+ (e: 'open'): void
4
+ /** 弹出层关闭触发 */
5
+ (e: 'close'): void
6
+ /** 弹出层点击触发 */
7
+ (e: 'click'): void
8
+ /** 显示隐藏触发 */
9
+ (e: 'update:show', visible: boolean): void
79
10
  }
@@ -1,44 +1,3 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
- export default interface HyPriceProps {
4
- /**
5
- * @description 传入金额值
6
- * */
7
- text: string | number
8
- /**
9
- * @description 金额符号(默认:¥)
10
- * */
11
- symbol?: string
12
- /**
13
- * @description 比例大小(默认:1.4)
14
- * */
15
- ratio?: number
16
- /**
17
- * @description 保留小数点后几位数(默认:2)
18
- * */
19
- num?: number
20
- /**
21
- * @description 字体颜色(默认:#FE3232)
22
- * */
23
- color?: string
24
- /**
25
- * @description 字体大小(默认:12)
26
- * */
27
- size?: string | number
28
- /**
29
- * @description 字体粗细(默认:500)
30
- * */
31
- weight?: number
32
- /**
33
- * @description 是否倾斜(默认:false)
34
- * */
35
- slant?: boolean
36
- /**
37
- * @description 自定义样式
38
- * */
39
- customStyle?: CSSProperties
40
- }
41
-
42
1
  export interface IPriceEmits {
43
2
  /** 点击事件 */
44
3
  (e: 'click', text: string | number): void
@@ -37,7 +37,6 @@ import { getCurrentInstance, ref, watch, nextTick } from 'vue'
37
37
  import type { IQrcodeEmits } from './typing'
38
38
  import QRCode from './qrcode.js'
39
39
  import { addUnit, error } from '../../libs'
40
- import qrCodeProps from './props'
41
40
  // 组件
42
41
  import HyLoading from '../hy-loading/hy-loading.vue'
43
42
  import HyImage from '../hy-image/hy-image.vue'
@@ -48,7 +47,73 @@ import HyImage from '../hy-image/hy-image.vue'
48
47
  */
49
48
  defineOptions({})
50
49
 
51
- const props = defineProps(qrCodeProps)
50
+ // const props = withDefaults(defineProps<IProps>(), defaultProps)
51
+ const props = defineProps({
52
+ /** 实例ID字符串(如果有多个二维码组件必须设置不一样的cid) */
53
+ cid: {
54
+ type: String,
55
+ default: 'hy-qrcode-canvas' + Math.random().toString()
56
+ },
57
+ /** 二维码大小 */
58
+ size: {
59
+ type: Number,
60
+ default: 200
61
+ },
62
+ /** 二维码内容 */
63
+ text: String,
64
+ /** 是否显示二维码 */
65
+ show: {
66
+ type: Boolean,
67
+ default: true
68
+ },
69
+ /** 二维码背景色 */
70
+ background: {
71
+ type: String,
72
+ default: '#ffffff'
73
+ },
74
+ /** 二维码颜色 */
75
+ foreground: {
76
+ type: String,
77
+ default: '#000000'
78
+ },
79
+ /** 定位角点颜色 */
80
+ pdGround: {
81
+ type: String,
82
+ default: '#000000'
83
+ },
84
+ /** 是否是自定义组件 */
85
+ usingComponents: {
86
+ type: Boolean,
87
+ default: true
88
+ },
89
+ /** 容错级别 */
90
+ lv: {
91
+ type: Number,
92
+ default: 3
93
+ },
94
+ /** 二维码中间图标 */
95
+ icon: String,
96
+ /** 二维码中间图标大小 */
97
+ iconSize: {
98
+ type: Number,
99
+ default: 40
100
+ },
101
+ /** 显示加载状态 */
102
+ showLoading: {
103
+ type: Boolean,
104
+ default: true
105
+ },
106
+ /** 加载中提示语 */
107
+ loadingText: {
108
+ type: String,
109
+ default: '二维码生成中...'
110
+ },
111
+ /** 是否预览 */
112
+ allowPreview: {
113
+ type: Boolean,
114
+ default: false
115
+ }
116
+ })
52
117
  const emit = defineEmits<IQrcodeEmits>()
53
118
 
54
119
  const instance = getCurrentInstance()
@@ -6,11 +6,10 @@
6
6
  position: relative;
7
7
 
8
8
  @include m(canvas) {
9
- // 移除fixed定位,确保canvas在H5端能正确绘制
10
9
  position: fixed;
11
- top: -99999rpx;
12
- left: -99999rpx;
13
- z-index: -99999;
10
+ top: -99999rpx;
11
+ left: -99999rpx;
12
+ z-index: -99999;
14
13
  overflow: hidden;
15
14
  }
16
15
 
@@ -1,69 +1,3 @@
1
- import type { CSSProperties } from 'vue'
2
-
3
- export default interface HyQrcodeProps {
4
- /**
5
- * @description 实例ID字符串(如果有多个二维码组件必须设置不一样的cid)
6
- * */
7
- cid?: string
8
- /**
9
- * @description 二维码大小
10
- * */
11
- size?: string | number
12
-
13
- /**
14
- * @description 二维码内容
15
- * */
16
- text: string
17
- /**
18
- * @description 是否显示二维码
19
- * */
20
- show?: boolean
21
- /**
22
- * @description 二维码背景色
23
- * */
24
- background?: string
25
- /**
26
- * @description 二维码颜色
27
- * */
28
- foreground?: string
29
- /**
30
- * @description 定位角点颜色
31
- * */
32
- pdGround?: string
33
- /**
34
- * @description 容错级别
35
- * */
36
- lv?: number
37
- /**
38
- * @description 是否是自定义组件
39
- * */
40
- usingComponents?: boolean
41
- /**
42
- * @description 二维码中间图标
43
- * */
44
- icon?: string
45
- /**
46
- * @description 二维码中间图标大小
47
- * */
48
- iconSize?: string | number
49
- /**
50
- * @description 显示加载状态
51
- * */
52
- showLoading?: boolean
53
- /**
54
- * @description 加载中提示语
55
- * */
56
- loadingText?: string
57
- /**
58
- * @description 是否预览
59
- * */
60
- allowPreview?: boolean
61
- /**
62
- * @description 定义需要用到的外部样式
63
- * */
64
- customStyle?: CSSProperties
65
- }
66
-
67
1
  export interface IQrcodeEmits {
68
2
  /** 二维码生成成功 */
69
3
  (e: 'result', res: any): void