im-ui-mobile 0.1.0 → 0.1.1
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.
- package/components/im-avatar/im-avatar.vue +7 -7
- package/components/im-badge/im-badge.vue +326 -0
- package/components/im-button/im-button.vue +71 -34
- package/components/im-card/im-card.vue +563 -0
- package/components/im-chat-item/im-chat-item.vue +5 -4
- package/components/im-col/im-col.vue +191 -0
- package/components/im-dialog/im-dialog.vue +543 -0
- package/components/im-double-tap-view/im-double-tap-view.vue +93 -0
- package/components/im-emoji-picker/im-emoji-picker.vue +1143 -0
- package/components/im-friend-item/im-friend-item.vue +1 -1
- package/components/im-group-item/im-group-item.vue +1 -1
- package/components/im-group-member-selector/im-group-member-selector.vue +5 -5
- package/components/im-group-rtc-join/im-group-rtc-join.vue +8 -8
- package/components/im-icon/im-icon.vue +593 -0
- package/components/im-image-upload/im-image-upload.vue +0 -2
- package/components/im-link/im-link.vue +628 -0
- package/components/im-loading/im-loading.vue +13 -4
- package/components/im-mention-picker/im-mention-picker.vue +8 -7
- package/components/im-message-action/im-message-action.vue +678 -0
- package/components/im-message-item/im-message-item.vue +28 -26
- package/components/im-message-list/im-message-list.vue +1108 -0
- package/components/im-modal/im-modal.vue +373 -0
- package/components/im-nav-bar/im-nav-bar.vue +689 -75
- package/components/im-parse/im-parse.vue +1054 -0
- package/components/im-popup/im-popup.vue +467 -0
- package/components/im-read-receipt/im-read-receipt.vue +9 -9
- package/components/im-row/im-row.vue +189 -0
- package/components/im-search/im-search.vue +762 -0
- package/components/im-sku/im-sku.vue +720 -0
- package/components/im-sku/utils/helper.ts +182 -0
- package/components/im-stepper/im-stepper.vue +585 -0
- package/components/im-stepper/utils/helper.ts +167 -0
- package/components/im-upload/im-upload.vue +1236 -0
- package/components/im-voice-input/im-voice-input.vue +1 -1
- package/index.js +3 -1
- package/index.scss +19 -0
- package/libs/emoji-data.ts +229 -0
- package/libs/index.ts +16 -16
- package/package.json +1 -2
- package/styles/button.scss +33 -33
- package/theme.scss +2 -2
- package/types/components/badge.d.ts +42 -0
- package/types/components/button.d.ts +2 -1
- package/types/components/card.d.ts +122 -0
- package/types/components/col.d.ts +37 -0
- package/types/components/dialog.d.ts +125 -0
- package/types/components/double-tap-view.d.ts +31 -0
- package/types/components/emoji-picker.d.ts +121 -0
- package/types/components/group-rtc-join.d.ts +1 -1
- package/types/components/icon.d.ts +77 -0
- package/types/components/link.d.ts +55 -0
- package/types/components/loading.d.ts +1 -0
- package/types/components/message-action.d.ts +96 -0
- package/types/components/message-item.d.ts +2 -2
- package/types/components/message-list.d.ts +136 -0
- package/types/components/modal.d.ts +106 -0
- package/types/components/nav-bar.d.ts +125 -0
- package/types/components/parse.d.ts +90 -0
- package/types/components/popup.d.ts +58 -0
- package/types/components/row.d.ts +31 -0
- package/types/components/search.d.ts +54 -0
- package/types/components/sku.d.ts +195 -0
- package/types/components/stepper.d.ts +97 -0
- package/types/components/upload.d.ts +137 -0
- package/types/components.d.ts +17 -1
- package/types/index.d.ts +38 -1
- package/types/libs/index.d.ts +10 -10
- package/types/utils/base64.d.ts +5 -0
- package/types/utils/dom.d.ts +3 -0
- package/types/utils/enums.d.ts +4 -5
- package/types/utils/validator.d.ts +74 -0
- package/utils/base64.js +18 -0
- package/utils/dom.js +353 -1
- package/utils/enums.js +4 -5
- package/utils/validator.js +230 -0
- package/components/im-file-upload/im-file-upload.vue +0 -309
- package/types/components/arrow-bar.d.ts +0 -14
- package/types/components/file-upload.d.ts +0 -58
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
export interface _SkuAttr {
|
|
4
|
+
/** 属性名称 */
|
|
5
|
+
name: string;
|
|
6
|
+
/** 属性值列表 */
|
|
7
|
+
values: AttrValue[];
|
|
8
|
+
/** 属性ID */
|
|
9
|
+
id?: string | number;
|
|
10
|
+
/** 是否必选 */
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface _SkuAttrValue {
|
|
15
|
+
/** 属性值名称 */
|
|
16
|
+
name: string;
|
|
17
|
+
/** 属性值ID */
|
|
18
|
+
id?: string | number;
|
|
19
|
+
/** 是否禁用 */
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** 自定义样式 */
|
|
22
|
+
style?: Record<string, any>;
|
|
23
|
+
/** 图片URL(用于显示图片规格) */
|
|
24
|
+
imgUrl?: string;
|
|
25
|
+
/** 预览图片URL */
|
|
26
|
+
previewImgUrl?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface _SkuSpec {
|
|
30
|
+
/** 规格名称 */
|
|
31
|
+
name: string;
|
|
32
|
+
/** 规格值列表 */
|
|
33
|
+
values: SkuValue[];
|
|
34
|
+
/** 规格ID */
|
|
35
|
+
id?: string | number;
|
|
36
|
+
/** 是否必选 */
|
|
37
|
+
required?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface _SkuValue {
|
|
41
|
+
/** 规格值名称 */
|
|
42
|
+
name: string;
|
|
43
|
+
/** 规格值ID */
|
|
44
|
+
id?: string | number;
|
|
45
|
+
/** 是否禁用 */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
/** 自定义样式 */
|
|
48
|
+
style?: Record<string, any>;
|
|
49
|
+
/** 图片URL(用于显示图片规格) */
|
|
50
|
+
imgUrl?: string;
|
|
51
|
+
/** 预览图片URL */
|
|
52
|
+
previewImgUrl?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface _SkuItem {
|
|
56
|
+
/** SKU ID */
|
|
57
|
+
id: string | number;
|
|
58
|
+
/** 商品ID */
|
|
59
|
+
goodsId?: string | number;
|
|
60
|
+
/** 规格组合,如:{颜色: '红色', 尺寸: 'L'} */
|
|
61
|
+
specs: Record<string, string>;
|
|
62
|
+
/** 价格(分) */
|
|
63
|
+
price: number;
|
|
64
|
+
/** 原价(分) */
|
|
65
|
+
originPrice?: number;
|
|
66
|
+
/** 库存 */
|
|
67
|
+
stock: number;
|
|
68
|
+
/** 商品图片 */
|
|
69
|
+
imgUrl?: string;
|
|
70
|
+
/** 商品名称 */
|
|
71
|
+
name?: string;
|
|
72
|
+
/** 商品编码 */
|
|
73
|
+
code?: string;
|
|
74
|
+
/** 是否禁用 */
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface _SkuGoodsInfo {
|
|
79
|
+
/** 商品ID */
|
|
80
|
+
id: string | number;
|
|
81
|
+
/** 商品标题 */
|
|
82
|
+
title: string;
|
|
83
|
+
/** 商品副标题 */
|
|
84
|
+
subtitle?: string;
|
|
85
|
+
/** 商品图片 */
|
|
86
|
+
imgUrl: string;
|
|
87
|
+
/** 商品图片列表 */
|
|
88
|
+
imgUrls?: string[];
|
|
89
|
+
/** 商品描述 */
|
|
90
|
+
description?: string;
|
|
91
|
+
/** 默认价格(分) */
|
|
92
|
+
price: number;
|
|
93
|
+
/** 原价(分) */
|
|
94
|
+
originPrice?: number;
|
|
95
|
+
/** 库存 */
|
|
96
|
+
stock?: number;
|
|
97
|
+
/** 商品编码 */
|
|
98
|
+
code?: string;
|
|
99
|
+
/** 商品单位 */
|
|
100
|
+
unit?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface _SelectedSku {
|
|
104
|
+
/** 选中的属性组合 */
|
|
105
|
+
selectedAttrs: Record<string, string>;
|
|
106
|
+
/** 选中的规格组合 */
|
|
107
|
+
selectedSpecs: Record<string, string>;
|
|
108
|
+
/** 选中的SKU ID */
|
|
109
|
+
skuId?: string | number;
|
|
110
|
+
/** 数量 */
|
|
111
|
+
quantity: number;
|
|
112
|
+
/** 价格(分) */
|
|
113
|
+
price: number;
|
|
114
|
+
/** 原价(分) */
|
|
115
|
+
originPrice?: number;
|
|
116
|
+
/** 库存 */
|
|
117
|
+
stock: number;
|
|
118
|
+
/** 是否有效 */
|
|
119
|
+
valid: boolean;
|
|
120
|
+
/** 商品信息 */
|
|
121
|
+
goodsInfo?: SkuGoodsInfo;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare interface _SkuProps {
|
|
125
|
+
/** 是否显示SKU选择器 */
|
|
126
|
+
visible: boolean;
|
|
127
|
+
/** 商品信息 */
|
|
128
|
+
goods: SkuGoodsInfo;
|
|
129
|
+
/** 属性列表 */
|
|
130
|
+
attrs: SkuAttr[];
|
|
131
|
+
/** 规格列表 */
|
|
132
|
+
specs: SkuSpec[];
|
|
133
|
+
/** SKU列表 */
|
|
134
|
+
skus: SkuItem[];
|
|
135
|
+
/** 初始选中的规格 */
|
|
136
|
+
initialSku?: SelectedSku;
|
|
137
|
+
/** 购买数量限制 */
|
|
138
|
+
quantityLimit?: {
|
|
139
|
+
min?: number;
|
|
140
|
+
max?: number;
|
|
141
|
+
step?: number;
|
|
142
|
+
};
|
|
143
|
+
/** 自定义操作按钮 */
|
|
144
|
+
customActions?: Array<{
|
|
145
|
+
text: string;
|
|
146
|
+
type?: 'primary' | 'default' | 'warning' | 'danger';
|
|
147
|
+
style?: Record<string, any>;
|
|
148
|
+
onClick?: () => void;
|
|
149
|
+
}>;
|
|
150
|
+
/** 是否显示快速购买按钮 */
|
|
151
|
+
showQuickBuy?: boolean;
|
|
152
|
+
/** 是否显示加入购物车按钮 */
|
|
153
|
+
showAddToCart?: boolean;
|
|
154
|
+
/** 是否显示库存 */
|
|
155
|
+
showStock?: boolean;
|
|
156
|
+
/** 是否显示价格 */
|
|
157
|
+
showPrice?: boolean;
|
|
158
|
+
/** 是否禁用 */
|
|
159
|
+
disabled?: boolean;
|
|
160
|
+
/** 关闭时是否重置 */
|
|
161
|
+
resetOnClose?: boolean;
|
|
162
|
+
/** 自定义样式类名 */
|
|
163
|
+
customClass?: string;
|
|
164
|
+
showClose?: boolean
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
declare interface _SkuEmits {
|
|
168
|
+
(e: 'update:visible', visible: boolean): void;
|
|
169
|
+
(e: 'confirm', data: SelectedSku): void;
|
|
170
|
+
(e: 'add-to-cart', data: SelectedSku): void;
|
|
171
|
+
(e: 'buy-now', data: SelectedSku): void;
|
|
172
|
+
(e: 'spec-change', data: SelectedSku): void;
|
|
173
|
+
(e: 'quantity-change', quantity: number): void;
|
|
174
|
+
(e: 'close'): void;
|
|
175
|
+
(e: 'custom-action', index: number): void;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
declare interface _Sku {
|
|
179
|
+
new(): {
|
|
180
|
+
$props: AllowedComponentProps & VNodeProps & _SkuProps
|
|
181
|
+
$emit: _SkuEmits
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export declare const Sku: _Sku
|
|
186
|
+
export declare type SkuProps = _SkuProps
|
|
187
|
+
export declare type SkuEmits = _SkuEmits
|
|
188
|
+
export declare type SkuAttr = _SkuAttr
|
|
189
|
+
export declare type SkuAttrValue = _SkuAttrValue
|
|
190
|
+
export declare type SkuSpec = _SkuSpec
|
|
191
|
+
export declare type SkuValue = _SkuValue
|
|
192
|
+
export declare type SkuItem = _SkuItem
|
|
193
|
+
export declare type SkuGoodsInfo = _SkuGoodsInfo
|
|
194
|
+
export declare type SelectedSku = _SelectedSku
|
|
195
|
+
export declare type SkuCurrent = _SkuCurrent
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
declare interface _StepperProps {
|
|
2
|
+
/** 当前值 */
|
|
3
|
+
modelValue?: number;
|
|
4
|
+
/** 默认值 */
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
/** 最小值 */
|
|
7
|
+
min?: number;
|
|
8
|
+
/** 最大值 */
|
|
9
|
+
max?: number;
|
|
10
|
+
/** 步进值 */
|
|
11
|
+
step?: number;
|
|
12
|
+
/** 输入框宽度(单位px) */
|
|
13
|
+
inputWidth?: number | string;
|
|
14
|
+
/** 按钮大小(单位px) */
|
|
15
|
+
buttonSize?: number | string;
|
|
16
|
+
/** 是否禁用 */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** 是否禁用输入框 */
|
|
19
|
+
disableInput?: boolean;
|
|
20
|
+
/** 是否禁用减按钮 */
|
|
21
|
+
disableMinus?: boolean;
|
|
22
|
+
/** 是否禁用加按钮 */
|
|
23
|
+
disablePlus?: boolean;
|
|
24
|
+
/** 是否显示限制按钮(达到边界时禁用) */
|
|
25
|
+
showLimit?: boolean;
|
|
26
|
+
/** 是否显示输入框 */
|
|
27
|
+
showInput?: boolean;
|
|
28
|
+
/** 是否显示加号减号按钮 */
|
|
29
|
+
showPlus?: boolean;
|
|
30
|
+
/** 是否显示减号按钮 */
|
|
31
|
+
showMinus?: boolean;
|
|
32
|
+
/** 是否允许长按 */
|
|
33
|
+
longPress?: boolean;
|
|
34
|
+
/** 长按间隔时间(毫秒) */
|
|
35
|
+
longPressInterval?: number;
|
|
36
|
+
/** 是否自动聚焦 */
|
|
37
|
+
autofocus?: boolean;
|
|
38
|
+
/** 输入框占位符 */
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
/** 是否只能输入整数 */
|
|
41
|
+
integer?: boolean;
|
|
42
|
+
/** 自定义减按钮图标 */
|
|
43
|
+
minusIcon?: string;
|
|
44
|
+
/** 自定义加按钮图标 */
|
|
45
|
+
plusIcon?: string;
|
|
46
|
+
/** 自定义减按钮文字 */
|
|
47
|
+
minusText?: string;
|
|
48
|
+
/** 自定义加按钮文字 */
|
|
49
|
+
plusText?: string;
|
|
50
|
+
/** 自定义样式类名 */
|
|
51
|
+
customClass?: string;
|
|
52
|
+
/** 自定义减按钮类名 */
|
|
53
|
+
minusClass?: string;
|
|
54
|
+
/** 自定义加按钮类名 */
|
|
55
|
+
plusClass?: string;
|
|
56
|
+
/** 自定义输入框类名 */
|
|
57
|
+
inputClass?: string;
|
|
58
|
+
/** 主题样式 */
|
|
59
|
+
theme?: 'default' | 'round' | 'square';
|
|
60
|
+
/** 按钮形状 */
|
|
61
|
+
shape?: 'circle' | 'square';
|
|
62
|
+
/** 按钮背景色 */
|
|
63
|
+
buttonColor?: string;
|
|
64
|
+
/** 按钮激活背景色 */
|
|
65
|
+
buttonActiveColor?: string;
|
|
66
|
+
/** 按钮文字颜色 */
|
|
67
|
+
buttonTextColor?: string;
|
|
68
|
+
/** 输入框背景色 */
|
|
69
|
+
inputBgColor?: string;
|
|
70
|
+
/** 输入框文字颜色 */
|
|
71
|
+
inputTextColor?: string;
|
|
72
|
+
/** 禁用状态颜色 */
|
|
73
|
+
disabledColor?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare interface _StepperEmits {
|
|
77
|
+
(e: 'update:modelValue', value: number): void;
|
|
78
|
+
(e: 'change', value: number): void;
|
|
79
|
+
(e: 'overlimit', type: 'minus' | 'plus'): void;
|
|
80
|
+
(e: 'minus', value: number): void;
|
|
81
|
+
(e: 'plus', value: number): void;
|
|
82
|
+
(e: 'blur', value: number): void;
|
|
83
|
+
(e: 'focus', value: number): void;
|
|
84
|
+
(e: 'input', value: number): void;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
declare interface _Stepper {
|
|
89
|
+
new(): {
|
|
90
|
+
$props: AllowedComponentProps & VNodeProps & _StepperProps
|
|
91
|
+
$emit: _StepperEmits
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare const Stepper: _Stepper
|
|
96
|
+
export declare type StepperProps = _StepperProps
|
|
97
|
+
export declare type StepperEmits = _StepperEmits
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
// 上传文件状态
|
|
4
|
+
type UploadFileStatus = 'pending' | 'uploading' | 'done' | 'error'
|
|
5
|
+
|
|
6
|
+
// 上传文件接口
|
|
7
|
+
declare interface UploadFile {
|
|
8
|
+
uid: string
|
|
9
|
+
name: string
|
|
10
|
+
size: number
|
|
11
|
+
type?: string
|
|
12
|
+
url?: string
|
|
13
|
+
thumbUrl?: string
|
|
14
|
+
status: UploadFileStatus
|
|
15
|
+
progress?: number
|
|
16
|
+
response?: any
|
|
17
|
+
error?: Error
|
|
18
|
+
rawFile?: any
|
|
19
|
+
file?: File
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 上传组件 Props
|
|
23
|
+
declare interface UploadProps {
|
|
24
|
+
// 值
|
|
25
|
+
modelValue?: UploadFile[]
|
|
26
|
+
|
|
27
|
+
// 上传类型
|
|
28
|
+
type?: 'button' | 'card' | 'avatar' | 'drag'
|
|
29
|
+
|
|
30
|
+
// 按钮配置
|
|
31
|
+
buttonText?: string
|
|
32
|
+
buttonType?: 'primary' | 'default' | 'warning' | 'error'
|
|
33
|
+
buttonSize?: 'small' | 'medium' | 'large'
|
|
34
|
+
|
|
35
|
+
// 卡片配置
|
|
36
|
+
cardText?: string
|
|
37
|
+
|
|
38
|
+
// 头像配置
|
|
39
|
+
avatarText?: string
|
|
40
|
+
avatarSize?: number | string
|
|
41
|
+
avatarRadius?: string
|
|
42
|
+
|
|
43
|
+
// 拖拽配置
|
|
44
|
+
dragText?: string
|
|
45
|
+
|
|
46
|
+
// 通用配置
|
|
47
|
+
hint?: string
|
|
48
|
+
tip?: string
|
|
49
|
+
showTip?: boolean
|
|
50
|
+
showActions?: boolean
|
|
51
|
+
showUploadAll?: boolean
|
|
52
|
+
showClear?: boolean
|
|
53
|
+
|
|
54
|
+
// 文件配置
|
|
55
|
+
accept?: string
|
|
56
|
+
multiple?: boolean
|
|
57
|
+
maxCount?: number
|
|
58
|
+
maxSize?: number
|
|
59
|
+
|
|
60
|
+
// 上传配置
|
|
61
|
+
action?: string
|
|
62
|
+
headers?: Record<string, string>
|
|
63
|
+
data?: Record<string, any>
|
|
64
|
+
name?: string
|
|
65
|
+
withCredentials?: boolean
|
|
66
|
+
timeout?: number
|
|
67
|
+
autoUpload?: boolean
|
|
68
|
+
beforeUpload?: (file: File) => boolean | Promise<boolean> // // 上传前钩子
|
|
69
|
+
|
|
70
|
+
// 响应格式化
|
|
71
|
+
responseFormatter?: (response: any) => { url: string;[key: string]: any }
|
|
72
|
+
|
|
73
|
+
// 列表配置
|
|
74
|
+
showList?: boolean
|
|
75
|
+
listType?: 'text' | 'picture'
|
|
76
|
+
removable?: boolean
|
|
77
|
+
previewable?: boolean
|
|
78
|
+
|
|
79
|
+
// 状态
|
|
80
|
+
disabled?: boolean
|
|
81
|
+
readonly?: boolean
|
|
82
|
+
|
|
83
|
+
// 自定义上传
|
|
84
|
+
customRequest?: (file: File, onProgress: (percent: number) => void) => Promise<any>
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// 上传组件方法
|
|
88
|
+
declare interface UploadMethods {
|
|
89
|
+
// 手动上传文件
|
|
90
|
+
upload: (file: File) => Promise<void>
|
|
91
|
+
|
|
92
|
+
// 清空文件列表
|
|
93
|
+
clearFiles: () => void
|
|
94
|
+
|
|
95
|
+
// 取消指定上传
|
|
96
|
+
abortUpload: (uid: string) => void
|
|
97
|
+
|
|
98
|
+
// 上传所有文件
|
|
99
|
+
uploadAll: () => Promise<void>
|
|
100
|
+
|
|
101
|
+
// 获取文件列表
|
|
102
|
+
getFiles: () => UploadFile[]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare interface _Upload {
|
|
106
|
+
new(): {
|
|
107
|
+
$props: AllowedComponentProps & VNodeProps & UploadProps
|
|
108
|
+
|
|
109
|
+
$emit: {
|
|
110
|
+
'update:modelValue': (files: UploadFile[]) => void
|
|
111
|
+
'change': (files: UploadFile[]) => void
|
|
112
|
+
'select': (file: File) => void
|
|
113
|
+
'upload': (file: UploadFile) => void
|
|
114
|
+
'success': (response: any, file: UploadFile) => void
|
|
115
|
+
'error': (error: Error, file: UploadFile) => void
|
|
116
|
+
'progress': (percent: number, file: UploadFile) => void
|
|
117
|
+
'remove': (file: UploadFile, index: number) => void
|
|
118
|
+
'preview': (file: UploadFile) => void
|
|
119
|
+
'exceed': (files: File[]) => void
|
|
120
|
+
'before-upload': (file: UploadFile) => void
|
|
121
|
+
'after-upload': (file: UploadFile) => void
|
|
122
|
+
}
|
|
123
|
+
} & UploadMethods
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare const Upload: _Upload
|
|
127
|
+
|
|
128
|
+
// 导出类型
|
|
129
|
+
export type {
|
|
130
|
+
UploadFile,
|
|
131
|
+
UploadFileStatus,
|
|
132
|
+
UploadProps,
|
|
133
|
+
UploadMethods
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 默认导出
|
|
137
|
+
export default Upload
|
package/types/components.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ declare module 'vue' {
|
|
|
3
3
|
['im-cell']: typeof import('./components/cell')['Cell']
|
|
4
4
|
['im-cell-group']: typeof import('./components/cell-group')['CellGroup']
|
|
5
5
|
['im-button']: typeof import('./components/button')['Button']
|
|
6
|
+
['im-badge']: typeof import('./components/badge')['Badge']
|
|
6
7
|
['im-mention-picker']: typeof import('./components/mention-picker')['MentionPicker']
|
|
7
8
|
['im-read-receipt']: typeof import('./components/read-receipt')['ReadReceipt']
|
|
8
9
|
['im-chat-item']: typeof import('./components/chat-item')['ChatItem']
|
|
9
10
|
['im-message-item']: typeof import('./components/message-item')['MessageItem']
|
|
10
11
|
['im-voice-input']: typeof import('./components/voice-input')['VoiceInput']
|
|
11
|
-
['im-file-upload']: typeof import('./components/file-upload')['FileUpload']
|
|
12
12
|
['im-friend-item']: typeof import('./components/friend-item')['FriendItem']
|
|
13
13
|
['im-group-item']: typeof import('./components/group-item')['GroupItem']
|
|
14
14
|
['im-group-member-selector']: typeof import('./components/group-member-selector')['GroupMemberSelector']
|
|
@@ -17,6 +17,22 @@ declare module 'vue' {
|
|
|
17
17
|
['im-loading']: typeof import('./components/loading')['Loading']
|
|
18
18
|
['im-context-menu']: typeof import('./components/context-menu')['ContextMenu']
|
|
19
19
|
['im-virtual-list']: typeof import('./components/virtual-list')['VirtualList']
|
|
20
|
+
['im-double-tap-view']: typeof import('./components/double-tap-view')['DoubleTapView']
|
|
21
|
+
['im-icon']: typeof import('./components/icon')['Icon']
|
|
22
|
+
['im-nav-bar']: typeof import('./components/nav-bar')['NavBar']
|
|
23
|
+
['im-card']: typeof import('./components/card')['Card']
|
|
24
|
+
['im-message-list']: typeof import('./components/message-list')['MessageList']
|
|
25
|
+
['im-message-action']: typeof import('./components/message-action')['MessageAction']
|
|
26
|
+
['im-emoji-picker']: typeof import('./components/emoji-picker')['EmojiPicker']
|
|
27
|
+
['im-popup']: typeof import('./components/popup')['Popup']
|
|
28
|
+
['im-modal']: typeof import('./components/modal')['Modal']
|
|
29
|
+
['im-dialog']: typeof import('./components/dialog')['Dialog']
|
|
30
|
+
['im-upload']: typeof import('./components/upload')['Upload']
|
|
31
|
+
['im-search']: typeof import('./components/search')['Search']
|
|
32
|
+
['im-parse']: typeof import('./components/parse')['Parse']
|
|
33
|
+
['im-link']: typeof import('./components/link')['Link']
|
|
34
|
+
['im-sku']: typeof import('./components/sku')['Sku']
|
|
35
|
+
['im-stepper']: typeof import('./components/stepper')['Stepper']
|
|
20
36
|
}
|
|
21
37
|
}
|
|
22
38
|
|
package/types/index.d.ts
CHANGED
|
@@ -36,6 +36,20 @@ import type {
|
|
|
36
36
|
UserInfo,
|
|
37
37
|
Response
|
|
38
38
|
} from './libs';
|
|
39
|
+
import validator, {
|
|
40
|
+
PasswordValidationOptions,
|
|
41
|
+
PasswordValidationResult,
|
|
42
|
+
ValidatorModule,
|
|
43
|
+
ValidationResult,
|
|
44
|
+
isNumber,
|
|
45
|
+
isInteger,
|
|
46
|
+
isMobilePhone,
|
|
47
|
+
isEmail,
|
|
48
|
+
isChineseIDCard,
|
|
49
|
+
validatePassword
|
|
50
|
+
} from './utils/validator.d.ts'
|
|
51
|
+
import { EmojiType, EmojiCategoryType } from './components/emoji-picker'
|
|
52
|
+
import * as base64 from "./utils/base64.d.ts";
|
|
39
53
|
|
|
40
54
|
declare module 'im-ui-mobile' {
|
|
41
55
|
export function install(): void
|
|
@@ -47,6 +61,27 @@ declare module 'im-ui-mobile' {
|
|
|
47
61
|
|
|
48
62
|
function getConfig(): Config;
|
|
49
63
|
|
|
64
|
+
// 导出类型
|
|
65
|
+
export type {
|
|
66
|
+
PasswordValidationOptions,
|
|
67
|
+
PasswordValidationResult,
|
|
68
|
+
ValidatorModule,
|
|
69
|
+
ValidationResult,
|
|
70
|
+
EmojiType,
|
|
71
|
+
EmojiCategoryType,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 导出常用函数
|
|
75
|
+
export {
|
|
76
|
+
isNumber,
|
|
77
|
+
isInteger,
|
|
78
|
+
isMobilePhone,
|
|
79
|
+
isEmail,
|
|
80
|
+
isChineseIDCard,
|
|
81
|
+
validatePassword
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// 导出类型/函数
|
|
50
85
|
export {
|
|
51
86
|
getConfig,
|
|
52
87
|
eventBus,
|
|
@@ -60,6 +95,8 @@ declare module 'im-ui-mobile' {
|
|
|
60
95
|
WebSocket,
|
|
61
96
|
RecorderApp,
|
|
62
97
|
RecorderH5,
|
|
98
|
+
validator,
|
|
99
|
+
base64,
|
|
63
100
|
|
|
64
101
|
// 枚举类型
|
|
65
102
|
RTC_STATE,
|
|
@@ -92,4 +129,4 @@ declare module 'im-ui-mobile' {
|
|
|
92
129
|
}
|
|
93
130
|
}
|
|
94
131
|
|
|
95
|
-
export { MESSAGE_TYPE, RTC_STATE, TERMINAL_TYPE, MESSAGE_STATUS }
|
|
132
|
+
// export { MESSAGE_TYPE, RTC_STATE, TERMINAL_TYPE, MESSAGE_STATUS }
|
package/types/libs/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export interface Chat {
|
|
|
19
19
|
id?: string | number;
|
|
20
20
|
targetId: number;
|
|
21
21
|
type: 'PRIVATE' | 'GROUP';
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
displayName: string;
|
|
23
|
+
avatar: string;
|
|
24
24
|
isDnd: boolean;
|
|
25
25
|
lastContent: string;
|
|
26
26
|
lastSendTime?: number;
|
|
@@ -49,11 +49,11 @@ export interface Message {
|
|
|
49
49
|
sendNickName?: string;
|
|
50
50
|
atUserIds?: number[];
|
|
51
51
|
sendId?: number;
|
|
52
|
-
|
|
52
|
+
receiveId?: number;
|
|
53
53
|
groupId?: number;
|
|
54
54
|
receipt?: boolean;
|
|
55
55
|
receiptOk?: boolean;
|
|
56
|
-
|
|
56
|
+
readCount?: number;
|
|
57
57
|
quoteMessage?: Message;
|
|
58
58
|
fileId?: string;
|
|
59
59
|
}
|
|
@@ -63,7 +63,7 @@ export interface Message {
|
|
|
63
63
|
export interface Friend {
|
|
64
64
|
id: number;
|
|
65
65
|
nickName: string;
|
|
66
|
-
|
|
66
|
+
avatar?: string;
|
|
67
67
|
online: boolean;
|
|
68
68
|
onlineWeb: boolean;
|
|
69
69
|
onlineApp: boolean;
|
|
@@ -103,7 +103,7 @@ export interface GroupMember {
|
|
|
103
103
|
id?: number;
|
|
104
104
|
userId: number;
|
|
105
105
|
showNickName: string;
|
|
106
|
-
|
|
106
|
+
avatar?: string;
|
|
107
107
|
quit?: boolean;
|
|
108
108
|
[key: string]: any;
|
|
109
109
|
}
|
|
@@ -116,14 +116,14 @@ export interface Group {
|
|
|
116
116
|
isBanned?: boolean;
|
|
117
117
|
reason?: string;
|
|
118
118
|
name: string;
|
|
119
|
-
|
|
119
|
+
avatar: string;
|
|
120
120
|
isDnd: boolean;
|
|
121
121
|
quit?: boolean;
|
|
122
122
|
topMessage?: string;
|
|
123
123
|
memberCount?: number;
|
|
124
124
|
createTime?: number;
|
|
125
125
|
showGroupName: string;
|
|
126
|
-
|
|
126
|
+
avatarThumb?: string;
|
|
127
127
|
remarkGroupName?: string;
|
|
128
128
|
remarkNickName?: string;
|
|
129
129
|
notice?: string;
|
|
@@ -183,8 +183,8 @@ export interface RecorderFile {
|
|
|
183
183
|
export interface UserInfo {
|
|
184
184
|
id: number;
|
|
185
185
|
nickName: string;
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
avatar: string;
|
|
187
|
+
avatarThumb?: string;
|
|
188
188
|
email?: string;
|
|
189
189
|
phone?: string;
|
|
190
190
|
gender?: number;
|
package/types/utils/dom.d.ts
CHANGED
|
@@ -7,5 +7,8 @@ declare const _default: {
|
|
|
7
7
|
hasHtmlSpecialChars: (text: string) => boolean;
|
|
8
8
|
setSafeHTML: (element: HTMLElement, html: string) => void;
|
|
9
9
|
safeHTML: (strings: TemplateStringsArray, ...values: any[]) => string;
|
|
10
|
+
nodesToHtml: (nodes: any[], options: any) => string;
|
|
11
|
+
extractPlainText: (nodes: any[]) => string;
|
|
12
|
+
escapeHtml: (text: string) => string;
|
|
10
13
|
};
|
|
11
14
|
export default _default;
|
package/types/utils/enums.d.ts
CHANGED
|
@@ -8,9 +8,8 @@ export declare enum MESSAGE_TYPE {
|
|
|
8
8
|
AUDIO = 3,
|
|
9
9
|
VIDEO = 4,
|
|
10
10
|
RECALL = 10,
|
|
11
|
-
|
|
11
|
+
READ = 11,
|
|
12
12
|
RECEIPT = 12,
|
|
13
|
-
TIP_TIME = 20,
|
|
14
13
|
TIP_TEXT = 21,
|
|
15
14
|
LOADING = 30,
|
|
16
15
|
ACT_RT_VOICE = 40,
|
|
@@ -66,8 +65,8 @@ export declare enum TERMINAL_TYPE {
|
|
|
66
65
|
export declare enum MESSAGE_STATUS {
|
|
67
66
|
FAILED = -2,// 发送失败
|
|
68
67
|
SENDING = -1,// 发送中(消息没到服务器)
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
SENT = 0,// 未送达(消息已到服务器,但对方没收到)
|
|
69
|
+
RECEIVED = 1,// 已送达(对方已收到,但是未读消息)
|
|
71
70
|
RECALL = 2,// 已撤回
|
|
72
|
-
|
|
71
|
+
READ = 3 // 已读
|
|
73
72
|
}
|