im-ui-mobile 0.1.0 → 0.1.2

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 (85) hide show
  1. package/components/im-avatar/im-avatar.vue +7 -7
  2. package/components/im-badge/im-badge.vue +326 -0
  3. package/components/im-button/im-button.vue +71 -34
  4. package/components/im-card/im-card.vue +563 -0
  5. package/components/im-chat-item/im-chat-item.vue +5 -4
  6. package/components/im-col/im-col.vue +191 -0
  7. package/components/im-dialog/im-dialog.vue +543 -0
  8. package/components/im-double-tap-view/im-double-tap-view.vue +93 -0
  9. package/components/im-emoji-picker/im-emoji-picker.vue +1143 -0
  10. package/components/im-friend-item/im-friend-item.vue +1 -1
  11. package/components/im-group-item/im-group-item.vue +1 -1
  12. package/components/im-group-member-selector/im-group-member-selector.vue +5 -5
  13. package/components/im-group-rtc-join/im-group-rtc-join.vue +8 -8
  14. package/components/im-icon/im-icon.vue +593 -0
  15. package/components/im-image-upload/im-image-upload.vue +0 -2
  16. package/components/im-link/im-link.vue +628 -0
  17. package/components/im-loading/im-loading.vue +13 -4
  18. package/components/im-mention-picker/im-mention-picker.vue +8 -7
  19. package/components/im-message-action/im-message-action.vue +678 -0
  20. package/components/im-message-item/im-message-item.vue +28 -26
  21. package/components/im-message-list/im-message-list.vue +1108 -0
  22. package/components/im-modal/im-modal.vue +373 -0
  23. package/components/im-nav-bar/im-nav-bar.vue +689 -75
  24. package/components/im-parse/im-parse.vue +1054 -0
  25. package/components/im-popup/im-popup.vue +467 -0
  26. package/components/im-read-receipt/im-read-receipt.vue +10 -10
  27. package/components/im-row/im-row.vue +189 -0
  28. package/components/im-search/im-search.vue +762 -0
  29. package/components/im-sku/im-sku.vue +720 -0
  30. package/components/im-sku/utils/helper.ts +182 -0
  31. package/components/im-stepper/im-stepper.vue +585 -0
  32. package/components/im-stepper/utils/helper.ts +167 -0
  33. package/components/im-tabs/im-tabs.vue +1022 -0
  34. package/components/im-tabs/tabs-navigation.vue +489 -0
  35. package/components/im-tabs/utils/helper.ts +181 -0
  36. package/components/im-tabs-tab-pane/im-tabs-tab-pane.vue +145 -0
  37. package/components/im-upload/im-upload.vue +1236 -0
  38. package/components/im-voice-input/im-voice-input.vue +1 -1
  39. package/index.js +3 -5
  40. package/index.scss +19 -0
  41. package/libs/emoji-data.ts +229 -0
  42. package/libs/index.ts +16 -16
  43. package/package.json +1 -2
  44. package/styles/button.scss +33 -33
  45. package/theme.scss +2 -2
  46. package/types/components/badge.d.ts +42 -0
  47. package/types/components/button.d.ts +2 -1
  48. package/types/components/card.d.ts +122 -0
  49. package/types/components/col.d.ts +37 -0
  50. package/types/components/dialog.d.ts +125 -0
  51. package/types/components/double-tap-view.d.ts +31 -0
  52. package/types/components/emoji-picker.d.ts +121 -0
  53. package/types/components/group-rtc-join.d.ts +1 -1
  54. package/types/components/icon.d.ts +77 -0
  55. package/types/components/link.d.ts +55 -0
  56. package/types/components/loading.d.ts +1 -0
  57. package/types/components/message-action.d.ts +96 -0
  58. package/types/components/message-item.d.ts +2 -2
  59. package/types/components/message-list.d.ts +136 -0
  60. package/types/components/modal.d.ts +106 -0
  61. package/types/components/nav-bar.d.ts +125 -0
  62. package/types/components/parse.d.ts +90 -0
  63. package/types/components/popup.d.ts +58 -0
  64. package/types/components/row.d.ts +31 -0
  65. package/types/components/search.d.ts +54 -0
  66. package/types/components/sku.d.ts +195 -0
  67. package/types/components/stepper.d.ts +99 -0
  68. package/types/components/tabs-tab-pane.d.ts +27 -0
  69. package/types/components/tabs.d.ts +117 -0
  70. package/types/components/upload.d.ts +137 -0
  71. package/types/components.d.ts +19 -1
  72. package/types/index.d.ts +38 -1
  73. package/types/libs/index.d.ts +10 -10
  74. package/types/utils/base64.d.ts +5 -0
  75. package/types/utils/dom.d.ts +3 -0
  76. package/types/utils/enums.d.ts +4 -5
  77. package/types/utils/validator.d.ts +74 -0
  78. package/utils/base64.js +18 -0
  79. package/utils/dom.js +353 -1
  80. package/utils/enums.js +4 -5
  81. package/utils/validator.js +230 -0
  82. package/components/im-file-upload/im-file-upload.vue +0 -309
  83. package/plugins/uview-plus.js +0 -29
  84. package/types/components/arrow-bar.d.ts +0 -14
  85. package/types/components/file-upload.d.ts +0 -58
@@ -0,0 +1,122 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ // 卡片操作按钮类型
4
+ declare interface CardAction {
5
+ text: string
6
+ type?: 'primary' | 'success' | 'warning' | 'danger' | 'default'
7
+ plain?: boolean
8
+ disabled?: boolean
9
+ loading?: boolean
10
+ data?: any
11
+ }
12
+
13
+ // 卡片属性接口
14
+ declare interface CardProps {
15
+ // 基础属性
16
+ title?: string
17
+ subtitle?: string
18
+ description?: string
19
+ extra?: string
20
+
21
+ // 显示控制
22
+ size?: 'small' | 'medium' | 'large'
23
+ shadow?: 'none' | 'sm' | 'md' | 'lg' | 'hover'
24
+ border?: 'none' | 'solid' | 'dashed'
25
+ full?: boolean
26
+ hoverable?: boolean
27
+ disabled?: boolean
28
+
29
+ // 加载状态
30
+ loading?: boolean
31
+ loadingText?: string
32
+ loadingIcon?: string
33
+
34
+ // 角标
35
+ badge?: string | number
36
+ badgeContent?: string | number
37
+ badgeType?: 'primary' | 'success' | 'warning' | 'danger' | 'info'
38
+ badgeMax?: number
39
+ badgeDot?: boolean
40
+ badgePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
41
+ badgeStyle?: Record<string, any>
42
+
43
+ // 标题区域
44
+ titleIcon?: string
45
+ titleIconSize?: string | number
46
+ titleIconColor?: string
47
+ titleStyle?: Record<string, any>
48
+ subtitleStyle?: Record<string, any>
49
+ descriptionStyle?: Record<string, any>
50
+
51
+ // 封面图片
52
+ coverImage?: string
53
+ coverMode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right'
54
+ coverTag?: string
55
+ lazyLoad?: boolean
56
+ showMenuByLongpress?: boolean
57
+
58
+ // 底部区域
59
+ footer?: string
60
+ actions?: CardAction[]
61
+ actionSize?: 'mini' | 'small' | 'medium' | 'large'
62
+
63
+ // 自定义样式
64
+ customStyle?: Record<string, any>
65
+ radius?: string | number
66
+ padding?: string | number
67
+ margin?: string | number
68
+ }
69
+
70
+ // 卡片事件接口
71
+ declare interface CardEvents {
72
+ // 点击事件
73
+ onClick?: (event: MouseEvent) => void
74
+ onLongpress?: (event: TouchEvent) => void
75
+ onCoverClick?: (event: MouseEvent) => void
76
+ onActionClick?: (action: CardAction, index: number) => void
77
+ onImageLoad?: (event: any) => void
78
+ onImageError?: (event: any) => void
79
+
80
+ // Vue 原生事件
81
+ onTouchstart?: (event: TouchEvent) => void
82
+ onTouchmove?: (event: TouchEvent) => void
83
+ onTouchend?: (event: TouchEvent) => void
84
+ onTouchcancel?: (event: TouchEvent) => void
85
+ }
86
+
87
+ // 卡片插槽接口
88
+ declare interface CardSlots {
89
+ // 默认插槽
90
+ default?: () => any
91
+
92
+ // 命名插槽
93
+ header?: () => any
94
+ title?: () => any
95
+ cover?: () => any
96
+ 'cover-tag'?: () => any
97
+ extra?: () => any
98
+ footer?: () => any
99
+ }
100
+
101
+ // 卡片组件实例
102
+ declare interface _Card {
103
+ new(): {
104
+ // 属性
105
+ $props: AllowedComponentProps & VNodeProps & CardProps
106
+
107
+ // 事件
108
+ $emit: CardEvents
109
+
110
+ // 插槽
111
+ $slots: CardSlots
112
+ }
113
+ }
114
+
115
+ // 导出卡片组件
116
+ export declare const Card: _Card
117
+
118
+ // 导出类型(用于单独使用)
119
+ export declare type CardPropsType = CardProps
120
+ export declare type CardActionType = CardAction
121
+ export declare type CardEventsType = CardEvents
122
+ export declare type CardSlotsType = CardSlots
@@ -0,0 +1,37 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare interface ColProps {
4
+ // 布局配置
5
+ span?: number | string
6
+ offset?: number | string
7
+ order?: number | string
8
+ alignSelf?: 'auto' | 'start' | 'end' | 'center' | 'stretch'
9
+ flex?: string
10
+
11
+ // 响应式配置
12
+ xs?: number | string
13
+ sm?: number | string
14
+ md?: number | string
15
+ lg?: number | string
16
+ xl?: number | string
17
+
18
+ // 样式配置
19
+ width?: string
20
+ height?: string
21
+ margin?: string
22
+ padding?: string
23
+ bgColor?: string
24
+ borderColor?: string
25
+ borderRadius?: string
26
+
27
+ // 点击事件
28
+ clickable?: boolean
29
+ }
30
+
31
+ declare interface _Col {
32
+ new(): {
33
+ $props: AllowedComponentProps & VNodeProps & ColProps
34
+ }
35
+ }
36
+
37
+ export declare const Col: _Col
@@ -0,0 +1,125 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ // 对话框类型
4
+ type DialogType = 'alert' | 'confirm' | 'prompt' | 'success' | 'error' | 'warning' | 'info' | 'html' | 'custom'
5
+
6
+ // 对话框组件 Props
7
+ declare interface DialogProps {
8
+ // 显示控制
9
+ show?: boolean
10
+ modelValue?: boolean
11
+
12
+ // 对话框类型
13
+ type?: DialogType
14
+
15
+ // 标题和内容
16
+ title?: string
17
+ subtitle?: string
18
+ content?: string
19
+
20
+ // 头部配置
21
+ showHeader?: boolean
22
+ showSubtitle?: boolean
23
+ showIcon?: boolean
24
+
25
+ // 内容样式
26
+ contentStyle?: Record<string, string>
27
+
28
+ // Prompt 类型配置
29
+ promptLabel?: string
30
+ promptPlaceholder?: string
31
+ inputType?: 'text' | 'number' | 'password' | 'textarea'
32
+ maxlength?: number
33
+ showCharCount?: boolean
34
+ inputDisabled?: boolean
35
+
36
+ // 按钮配置
37
+ showFooter?: boolean
38
+ showCancel?: boolean
39
+ showConfirm?: boolean
40
+ cancelText?: string
41
+ confirmText?: string
42
+ cancelType?: 'default' | 'primary' | 'warning' | 'error'
43
+ confirmType?: 'default' | 'primary' | 'warning' | 'error'
44
+ cancelDisabled?: boolean
45
+ confirmDisabled?: boolean
46
+ cancelLoading?: boolean
47
+ confirmLoading?: boolean
48
+ buttonSize?: 'small' | 'medium' | 'large'
49
+
50
+ // 弹窗配置
51
+ position?: 'center' | 'top' | 'bottom' | 'left' | 'right'
52
+ animation?: 'fade' | 'slide' | 'zoom' | 'none'
53
+ duration?: number
54
+ showOverlay?: boolean
55
+ overlayColor?: string
56
+ overlayOpacity?: number
57
+ closeOnClickOverlay?: boolean
58
+ lockScroll?: boolean
59
+ width?: string
60
+ borderRadius?: string
61
+ backgroundColor?: string
62
+ zIndex?: number
63
+ showClose?: boolean
64
+ safeAreaInsetBottom?: boolean
65
+ customClass?: string
66
+ closeOnClickAction?: boolean
67
+
68
+ // 验证函数
69
+ validator?: (value: string) => string | boolean
70
+
71
+ // 自动关闭
72
+ autoClose?: boolean
73
+ autoCloseDelay?: number
74
+
75
+ // 输入框初始值
76
+ defaultValue?: string
77
+ }
78
+
79
+ // 对话框组件方法
80
+ declare interface DialogMethods {
81
+ // 打开对话框
82
+ open: (options?: Partial<DialogProps>) => void
83
+
84
+ // 关闭对话框
85
+ close: () => void
86
+
87
+ // 切换显示状态
88
+ toggle: () => void
89
+
90
+ // 清空输入
91
+ clearInput: () => void
92
+ }
93
+
94
+ declare interface _Dialog {
95
+ new(): {
96
+ $props: AllowedComponentProps & VNodeProps & DialogProps
97
+
98
+ $emit: {
99
+ 'update:show': (value: boolean) => void
100
+ 'update:modelValue': (value: boolean) => void
101
+ 'open': () => void
102
+ 'opened': () => void
103
+ 'close': () => void
104
+ 'closed': () => void
105
+ 'click-overlay': () => void
106
+ 'confirm': (value?: string) => void
107
+ 'cancel': () => void
108
+ 'input': (value: string) => void
109
+ 'focus': () => void
110
+ 'blur': () => void
111
+ }
112
+ } & DialogMethods
113
+ }
114
+
115
+ export declare const Dialog: _Dialog
116
+
117
+ // 导出类型
118
+ export type {
119
+ DialogType,
120
+ DialogProps,
121
+ DialogMethods
122
+ }
123
+
124
+ // 默认导出
125
+ export default Dialog
@@ -0,0 +1,31 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare interface DoubleTapViewProps {
4
+ /** 双击间隔时间(毫秒)默认 300ms */
5
+ delay?: number
6
+ /** 是否阻止事件冒泡 */
7
+ stopPropagation?: boolean,
8
+ /** CSS样式类 **/
9
+ class?: string,
10
+ /** CSS样式 **/
11
+ style?: string
12
+ }
13
+
14
+ declare interface DoubleTapViewExpose {
15
+ /** 重置组件状态 */
16
+ reset: () => void
17
+ }
18
+
19
+ declare interface _DoubleTapView {
20
+ new(): {
21
+ $props: AllowedComponentProps & VNodeProps & DoubleTapViewProps
22
+ $emit: {
23
+ /** 单击事件 */
24
+ 'single-tap': (event: any) => void
25
+ /** 双击事件 */
26
+ 'double-tap': (event: any) => void
27
+ }
28
+ } & DoubleTapViewExpose
29
+ }
30
+
31
+ export declare const DoubleTapView: _DoubleTapView
@@ -0,0 +1,121 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare interface Emoji {
4
+ key: string
5
+ char: string
6
+ name: string
7
+ category: string
8
+ url?: string
9
+ type: 'unicode' | 'image'
10
+ code?: string
11
+ keywords?: string[]
12
+ }
13
+
14
+ declare interface EmojiCategory {
15
+ id: string
16
+ name: string
17
+ icon: string
18
+ order: number
19
+ }
20
+
21
+ declare interface EmojiPickerProps {
22
+ // 显示控制
23
+ visible?: boolean
24
+ theme?: 'light' | 'dark' | 'card'
25
+ size?: 'small' | 'medium' | 'large'
26
+
27
+ // 数据源
28
+ emojis?: Emoji[]
29
+ categories?: EmojiCategory[]
30
+ recentEmojis?: Emoji[]
31
+
32
+ // 配置选项
33
+ showRecent?: boolean
34
+ showTabs?: boolean
35
+ showTabText?: boolean
36
+ showFooter?: boolean
37
+ showPreview?: boolean
38
+ showEmojiName?: boolean
39
+ showCategoryCount?: boolean
40
+ showRecentClear?: boolean
41
+ showDeleteButton?: boolean
42
+ showSendButton?: boolean
43
+ showScrollbar?: boolean
44
+
45
+ // 搜索功能
46
+ enableSearch?: boolean
47
+ searchPlaceholder?: string
48
+ searchIconSize?: number
49
+ searchIconColor?: string
50
+ autoFocus?: boolean
51
+
52
+ // 布局配置
53
+ columns?: number
54
+ emojiSize?: string | number
55
+ spacing?: string | number
56
+ borderRadius?: string | number
57
+
58
+ // 样式控制
59
+ height?: string | number
60
+ backgroundColor?: string
61
+ categoryColor?: string
62
+
63
+ // 交互配置
64
+ maxRecentCount?: number
65
+ allowMultiple?: boolean
66
+ selectedEmojis?: Emoji[]
67
+
68
+ // 空状态
69
+ emptyIconSize?: number
70
+ emptyIconColor?: string
71
+ emptyText?: string
72
+ }
73
+
74
+ declare interface EmojiPickerEvents {
75
+ // 基础事件
76
+ 'update:visible': [visible: boolean]
77
+ 'open': []
78
+ 'close': []
79
+
80
+ // 表情事件
81
+ 'select': [emoji: Emoji]
82
+ 'delete': [emoji: Emoji]
83
+ 'send': [emoji: Emoji]
84
+ 'longpress': [emoji: Emoji]
85
+
86
+ // 搜索事件
87
+ 'search': [keyword: string]
88
+ 'search-clear': []
89
+
90
+ // 最近使用
91
+ 'recent-clear': []
92
+
93
+ // 分类切换
94
+ 'tab-change': [tabId: string]
95
+ }
96
+
97
+ declare interface EmojiPickerSlots {
98
+ // 底部自定义插槽
99
+ footer?: () => any
100
+ }
101
+
102
+ declare interface _EmojiPicker {
103
+ new(): {
104
+ $props: AllowedComponentProps & VNodeProps & EmojiPickerProps
105
+ $emit: EmojiPickerEvents
106
+ $slots: EmojiPickerSlots
107
+ $exposed?: {
108
+ open: () => void
109
+ close: () => void
110
+ insertEmoji: (emoji: Emoji) => void
111
+ clearRecentEmojis: () => void
112
+ getRecentEmojis: () => Emoji[]
113
+ searchEmoji: (keyword: string) => Emoji[]
114
+ }
115
+ }
116
+ }
117
+
118
+ export declare const EmojiPicker: _EmojiPicker
119
+ export declare type EmojiPickerPropsType = EmojiPickerProps
120
+ export declare type EmojiType = Emoji
121
+ export declare type EmojiCategoryType = EmojiCategory
@@ -5,7 +5,7 @@ declare interface RtcInfo {
5
5
  userInfos: Array<{
6
6
  id: number
7
7
  nickName: string
8
- headImage: string
8
+ avatar: string
9
9
  isCamera?: boolean
10
10
  isMicroPhone?: boolean
11
11
  }>
@@ -0,0 +1,77 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare type IconType = 'font' | 'image' | 'svg' | 'custom'
4
+ declare type IconSize = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | string
5
+ declare type RotateDirection = 'clockwise' | 'counterclockwise'
6
+
7
+ declare interface IconProps {
8
+ /** 图标名称或标识 */
9
+ name?: string
10
+ /** 图标类型 */
11
+ type?: IconType
12
+ /** 图标大小 */
13
+ size?: IconSize | number
14
+ /** 图标颜色(仅对字体图标和SVG有效) */
15
+ color?: string
16
+ /** 旋转角度(0-360) */
17
+ rotate?: number
18
+ /** 旋转方向 */
19
+ rotateDirection?: RotateDirection
20
+ /** 是否旋转动画 */
21
+ spin?: boolean
22
+ /** 旋转动画速度(秒) */
23
+ spinSpeed?: number
24
+ /** 是否禁用 */
25
+ disabled?: boolean
26
+ /** 点击时的波纹效果 */
27
+ ripple?: boolean
28
+ /** 波纹颜色 */
29
+ rippleColor?: string
30
+ /** 自定义类名 */
31
+ customClass?: string
32
+ /** 自定义样式 */
33
+ customStyle?: Record<string, string | number>
34
+ /** 图片模式(仅type='image'时有效) */
35
+ imageMode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right'
36
+ /** 图片地址(仅type='image'时有效) */
37
+ src?: string
38
+ /** 是否懒加载图片(仅type='image'时有效) */
39
+ lazyLoad?: boolean
40
+ /** 是否长按显示菜单(仅type='image'时有效) */
41
+ showMenuByLongpress?: boolean
42
+ /** SVG内容(仅type='svg'时有效) */
43
+ svgContent?: string
44
+ /** 使用SVG内容而不是内置图标(仅type='svg'时有效) */
45
+ useSvgContent?: boolean
46
+ }
47
+
48
+ declare interface IconExpose {
49
+ /** 重新加载图标 */
50
+ reload: () => void
51
+ /** 获取图标状态 */
52
+ getStatus: () => {
53
+ isLoaded: boolean
54
+ loadError: boolean
55
+ type: IconType
56
+ name: string
57
+ }
58
+ }
59
+
60
+ declare interface _Icon {
61
+ new(): {
62
+ $props: AllowedComponentProps & VNodeProps & IconProps
63
+ $emit: {
64
+ /** 点击事件 */
65
+ click: (event: MouseEvent) => void
66
+ /** 图片加载成功 */
67
+ load: (event: any) => void
68
+ /** 图片加载失败 */
69
+ error: (event: any) => void
70
+ }
71
+ $slots: {
72
+ default?: any
73
+ }
74
+ } & IconExpose
75
+ }
76
+
77
+ export declare const Icon: _Icon
@@ -0,0 +1,55 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare interface LinkProps {
4
+ // 链接配置
5
+ href?: string
6
+ text?: string
7
+ target?: '_self' | '_blank' | '_parent' | '_top'
8
+ rel?: string
9
+ download?: boolean
10
+
11
+ // 导航配置
12
+ openType?: 'navigate' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack'
13
+ delta?: number
14
+ hoverClass?: string
15
+ hoverStartTime?: number
16
+ hoverStayTime?: number
17
+
18
+ // 样式配置
19
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info'
20
+ size?: 'small' | 'medium' | 'large'
21
+ underline?: 'none' | 'hover' | 'always'
22
+ disabled?: boolean
23
+ loading?: boolean
24
+
25
+ // 图标配置
26
+ icon?: string
27
+ showArrow?: boolean
28
+
29
+ // 角标配置
30
+ badge?: boolean
31
+ badgeType?: 'primary' | 'success' | 'warning' | 'danger' | 'info' //'primary' | 'success' | 'warning' | 'error' | 'info'
32
+ badgeValue?: string | number
33
+ badgeMax?: number
34
+ badgeDot?: boolean
35
+ badgePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
36
+
37
+ // 自定义样式
38
+ customClass?: string
39
+ customStyle?: string | Record<string, string>
40
+ color?: string
41
+ hoverColor?: string
42
+ activeColor?: string
43
+ fontSize?: string | number
44
+
45
+ // 事件配置
46
+ beforeNavigate?: (url: string) => boolean | Promise<boolean>
47
+ }
48
+
49
+ declare interface _Link {
50
+ new(): {
51
+ $props: AllowedComponentProps & VNodeProps & LinkProps
52
+ }
53
+ }
54
+
55
+ export declare const Link: _Link
@@ -4,6 +4,7 @@ declare interface LoadingProps {
4
4
  size?: number
5
5
  iconColor?: string
6
6
  mask?: boolean
7
+ text?: string
7
8
  }
8
9
 
9
10
  declare interface LoadingSlots {
@@ -0,0 +1,96 @@
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
+
3
+ declare interface MessageAction {
4
+ key: string
5
+ text: string
6
+ icon?: string
7
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'
8
+ disabled?: boolean
9
+ danger?: boolean
10
+ loading?: boolean
11
+ hidden?: boolean
12
+ divider?: boolean
13
+ badge?: string | number
14
+ badgeType?: 'primary' | 'success' | 'warning' | 'danger' | 'info'
15
+ hint?: string
16
+ data?: any
17
+ handler?: () => void | Promise<void>
18
+ }
19
+
20
+ declare interface MessageActionProps {
21
+ // 显示控制
22
+ visible?: boolean
23
+ position?: 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
24
+ theme?: 'light' | 'dark' | 'card'
25
+
26
+ // 数据
27
+ actions?: MessageAction[]
28
+ message?: any
29
+
30
+ // 配置
31
+ showCancel?: boolean
32
+ cancelText?: string
33
+ maxHeight?: string | number
34
+ width?: string | number
35
+ borderRadius?: string | number
36
+ showArrow?: boolean
37
+ arrowSize?: number
38
+ iconSize?: number
39
+
40
+ // 位置控制
41
+ x?: number
42
+ y?: number
43
+ offsetX?: number
44
+ offsetY?: number
45
+ fitViewport?: boolean
46
+
47
+ // 动画
48
+ animation?: boolean
49
+ animationDuration?: number
50
+
51
+ // 遮罩
52
+ showMask?: boolean
53
+ maskClosable?: boolean
54
+ maskColor?: string
55
+ }
56
+
57
+ declare interface MessageActionEvents {
58
+ // 基础事件
59
+ 'update:visible': [visible: boolean]
60
+ 'open': []
61
+ 'close': []
62
+ 'cancel': []
63
+
64
+ // 操作事件
65
+ 'select': [action: MessageAction, message?: any]
66
+ 'click': [actionKey: string, message?: any]
67
+
68
+ // 生命周期
69
+ 'before-open': []
70
+ 'after-open': []
71
+ 'before-close': []
72
+ 'after-close': []
73
+ }
74
+
75
+ declare interface MessageActionSlots {
76
+ // 默认插槽(自定义内容)
77
+ default?: () => any
78
+ }
79
+
80
+ declare interface _MessageAction {
81
+ new(): {
82
+ $props: AllowedComponentProps & VNodeProps & MessageActionProps
83
+ $emit: MessageActionEvents
84
+ $slots: MessageActionSlots
85
+ $exposed?: {
86
+ open: () => void
87
+ close: () => void
88
+ updatePosition: (x: number, y: number) => void
89
+ updateActions: (newActions: MessageAction[]) => void
90
+ }
91
+ }
92
+ }
93
+
94
+ export declare const MessageAction: _MessageAction
95
+ export declare type MessageActionPropsType = MessageActionProps
96
+ export declare type MessageActionType = MessageAction
@@ -2,14 +2,14 @@ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface MessageItemProps {
4
4
  avatar?: string
5
- showName: string
5
+ displayName: string
6
6
  msgInfo: any
7
7
  groupMembers?: any[]
8
8
  }
9
9
 
10
10
  declare interface MessageItemEmits {
11
11
  (e: 'call'): void
12
- (e: 'longPressHead'): void
12
+ (e: 'longpressAvatar'): void
13
13
  (e: 'resend', msgInfo: any): void
14
14
  (e: 'audioStateChange', state: string, msgInfo: any): void
15
15
  (e: 'copy', msgInfo: any): void