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.
- 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 +10 -10
- 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-tabs/im-tabs.vue +1022 -0
- package/components/im-tabs/tabs-navigation.vue +489 -0
- package/components/im-tabs/utils/helper.ts +181 -0
- package/components/im-tabs-tab-pane/im-tabs-tab-pane.vue +145 -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 -5
- 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 +99 -0
- package/types/components/tabs-tab-pane.d.ts +27 -0
- package/types/components/tabs.d.ts +117 -0
- package/types/components/upload.d.ts +137 -0
- package/types/components.d.ts +19 -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/plugins/uview-plus.js +0 -29
- package/types/components/arrow-bar.d.ts +0 -14
- package/types/components/file-upload.d.ts +0 -58
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
import type { Message, GroupMember } from 'im-ui-mobile'
|
|
3
|
+
|
|
4
|
+
declare interface TypingUser {
|
|
5
|
+
id: number
|
|
6
|
+
name: string
|
|
7
|
+
avatar?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare interface ActionMenuAction {
|
|
11
|
+
key: string
|
|
12
|
+
text: string
|
|
13
|
+
icon?: string
|
|
14
|
+
color?: string
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare interface MessageListProps {
|
|
19
|
+
// 数据相关
|
|
20
|
+
messages: Message[]
|
|
21
|
+
groupMembers?: GroupMember[]
|
|
22
|
+
typingUser?: TypingUser | null
|
|
23
|
+
|
|
24
|
+
// 显示控制
|
|
25
|
+
theme?: 'light' | 'dark'
|
|
26
|
+
mode?: 'normal' | 'compact'
|
|
27
|
+
loading?: boolean
|
|
28
|
+
loadingText?: string
|
|
29
|
+
loadingPosition?: 'top' | 'inside'
|
|
30
|
+
|
|
31
|
+
// 日期时间显示
|
|
32
|
+
showTimestamp?: boolean
|
|
33
|
+
timestampInterval?: number
|
|
34
|
+
showMessageTime?: boolean
|
|
35
|
+
dateFormat?: string
|
|
36
|
+
timeFormat?: string
|
|
37
|
+
|
|
38
|
+
// 消息显示
|
|
39
|
+
showMessageStatus?: boolean
|
|
40
|
+
showMessageMenu?: boolean
|
|
41
|
+
showMessageReceipt?: boolean
|
|
42
|
+
displayName?: boolean
|
|
43
|
+
showAvatar?: boolean
|
|
44
|
+
groupShowName?: boolean
|
|
45
|
+
|
|
46
|
+
// 滚动相关
|
|
47
|
+
autoScroll?: boolean
|
|
48
|
+
scrollAnimation?: boolean
|
|
49
|
+
showScrollbar?: boolean
|
|
50
|
+
enableBackToTop?: boolean
|
|
51
|
+
loadMoreThreshold?: number
|
|
52
|
+
scrollToBottomThreshold?: number
|
|
53
|
+
keepAtBottom?: boolean
|
|
54
|
+
|
|
55
|
+
// 交互提示
|
|
56
|
+
showScrollToBottom?: boolean
|
|
57
|
+
showUnreadTips?: boolean
|
|
58
|
+
unreadCount?: number
|
|
59
|
+
newMessageCount?: number
|
|
60
|
+
|
|
61
|
+
// 空状态
|
|
62
|
+
emptyText?: string
|
|
63
|
+
emptyIconColor?: string
|
|
64
|
+
|
|
65
|
+
// 样式控制
|
|
66
|
+
backgroundColor?: string
|
|
67
|
+
minHeight?: string | number
|
|
68
|
+
maxHeight?: string | number
|
|
69
|
+
padding?: string | number
|
|
70
|
+
margin?: string | number
|
|
71
|
+
|
|
72
|
+
// 自定义操作
|
|
73
|
+
actionMenuActions?: ActionMenuAction[]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare interface MessageListEvents {
|
|
77
|
+
// 数据事件
|
|
78
|
+
onLoadMore?: () => void
|
|
79
|
+
onMessageClick?: (message: Message, event: MouseEvent) => void
|
|
80
|
+
onMessageLongpress?: (message: Message, event: TouchEvent) => void
|
|
81
|
+
|
|
82
|
+
// 消息操作
|
|
83
|
+
onResend?: (message: Message) => void
|
|
84
|
+
onRecall?: (message: Message) => void
|
|
85
|
+
onDelete?: (message: Message) => void
|
|
86
|
+
onCopy?: (message: Message) => void
|
|
87
|
+
onForward?: (message: Message) => void
|
|
88
|
+
onReply?: (message: Message) => void
|
|
89
|
+
onDownload?: (message: Message) => void
|
|
90
|
+
|
|
91
|
+
// 交互事件
|
|
92
|
+
onAvatarClick?: (message: Message, event: MouseEvent) => void
|
|
93
|
+
onNameClick?: (message: Message, event: MouseEvent) => void
|
|
94
|
+
onScroll?: (event: any) => void
|
|
95
|
+
onScrollToBottom?: () => void
|
|
96
|
+
onScrollToTop?: () => void
|
|
97
|
+
|
|
98
|
+
// 音频事件
|
|
99
|
+
onAudioPlay?: (message: Message) => void
|
|
100
|
+
onAudioPause?: (message: Message) => void
|
|
101
|
+
|
|
102
|
+
// 动作菜单
|
|
103
|
+
onActionMenuSelect?: (action: ActionMenuAction, message: Message) => void
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare interface MessageListSlots {
|
|
107
|
+
// 默认插槽(消息项)
|
|
108
|
+
message?: (props: { message: Message, index: number }) => any
|
|
109
|
+
|
|
110
|
+
// 空状态插槽
|
|
111
|
+
empty?: () => any
|
|
112
|
+
|
|
113
|
+
// 正在输入插槽
|
|
114
|
+
typing?: () => any
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare interface _MessageList {
|
|
118
|
+
new(): {
|
|
119
|
+
$props: AllowedComponentProps & VNodeProps & MessageListProps
|
|
120
|
+
$emit: MessageListEvents
|
|
121
|
+
$slots: MessageListSlots
|
|
122
|
+
$exposed?: {
|
|
123
|
+
scrollToBottom: (animated?: boolean) => void
|
|
124
|
+
scrollToMessage: (messageId: number | string, animated?: boolean) => void
|
|
125
|
+
scrollToUnread: () => void
|
|
126
|
+
getScrollTop: () => number
|
|
127
|
+
setScrollTop: (top: number) => void
|
|
128
|
+
stopAllAudio: () => void
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export declare const MessageList: _MessageList
|
|
134
|
+
export declare type MessageListPropsType = MessageListProps
|
|
135
|
+
export declare type TypingUserType = TypingUser
|
|
136
|
+
export declare type ActionMenuActionType = ActionMenuAction
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
// 模态框组件 Props
|
|
4
|
+
declare interface ModalProps {
|
|
5
|
+
// 显示控制
|
|
6
|
+
show?: boolean
|
|
7
|
+
modelValue?: boolean
|
|
8
|
+
|
|
9
|
+
// 标题和内容
|
|
10
|
+
title?: string
|
|
11
|
+
subtitle?: string
|
|
12
|
+
content?: string
|
|
13
|
+
|
|
14
|
+
// 头部配置
|
|
15
|
+
showHeader?: boolean
|
|
16
|
+
showSubtitle?: boolean
|
|
17
|
+
|
|
18
|
+
// 内容配置
|
|
19
|
+
bodyStyle?: Record<string, string>
|
|
20
|
+
|
|
21
|
+
// 底部按钮配置
|
|
22
|
+
showFooter?: boolean
|
|
23
|
+
showCancel?: boolean
|
|
24
|
+
showConfirm?: boolean
|
|
25
|
+
cancelText?: string
|
|
26
|
+
confirmText?: string
|
|
27
|
+
cancelType?: 'default' | 'primary' | 'warning' | 'error'
|
|
28
|
+
confirmType?: 'default' | 'primary' | 'warning' | 'error'
|
|
29
|
+
cancelPlain?: boolean
|
|
30
|
+
confirmPlain?: boolean
|
|
31
|
+
cancelDisabled?: boolean
|
|
32
|
+
confirmDisabled?: boolean
|
|
33
|
+
cancelLoading?: boolean
|
|
34
|
+
confirmLoading?: boolean
|
|
35
|
+
buttonSize?: 'small' | 'medium' | 'large'
|
|
36
|
+
|
|
37
|
+
// 弹窗配置
|
|
38
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right'
|
|
39
|
+
animation?: 'fade' | 'slide' | 'zoom' | 'none'
|
|
40
|
+
duration?: number
|
|
41
|
+
showOverlay?: boolean
|
|
42
|
+
overlayColor?: string
|
|
43
|
+
overlayOpacity?: number
|
|
44
|
+
closeOnClickOverlay?: boolean
|
|
45
|
+
lockScroll?: boolean
|
|
46
|
+
width?: string
|
|
47
|
+
maxWidth?: string
|
|
48
|
+
minWidth?: string
|
|
49
|
+
borderRadius?: string
|
|
50
|
+
backgroundColor?: string
|
|
51
|
+
zIndex?: number
|
|
52
|
+
showClose?: boolean
|
|
53
|
+
closePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
54
|
+
safeAreaInsetBottom?: boolean
|
|
55
|
+
customClass?: string
|
|
56
|
+
|
|
57
|
+
// 行为控制
|
|
58
|
+
closeOnClickAction?: boolean
|
|
59
|
+
showCloseAfterConfirm?: boolean
|
|
60
|
+
showCloseAfterCancel?: boolean
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 模态框组件方法
|
|
64
|
+
declare interface ModalMethods {
|
|
65
|
+
// 打开模态框
|
|
66
|
+
open: () => void
|
|
67
|
+
|
|
68
|
+
// 关闭模态框
|
|
69
|
+
close: () => void
|
|
70
|
+
|
|
71
|
+
// 切换显示状态
|
|
72
|
+
toggle: () => void
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare interface _Modal {
|
|
76
|
+
new(): {
|
|
77
|
+
$props: AllowedComponentProps & VNodeProps & ModalProps
|
|
78
|
+
|
|
79
|
+
$emit: {
|
|
80
|
+
'update:show': (value: boolean) => void
|
|
81
|
+
'update:modelValue': (value: boolean) => void
|
|
82
|
+
'open': () => void
|
|
83
|
+
'opened': () => void
|
|
84
|
+
'close': () => void
|
|
85
|
+
'closed': () => void
|
|
86
|
+
'click-overlay': () => void
|
|
87
|
+
'confirm': () => void
|
|
88
|
+
'cancel': () => void
|
|
89
|
+
'before-enter': () => void
|
|
90
|
+
'after-enter': () => void
|
|
91
|
+
'before-leave': () => void
|
|
92
|
+
'after-leave': () => void
|
|
93
|
+
}
|
|
94
|
+
} & ModalMethods
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare const Modal: _Modal
|
|
98
|
+
|
|
99
|
+
// 导出类型
|
|
100
|
+
export type {
|
|
101
|
+
ModalProps,
|
|
102
|
+
ModalMethods
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 默认导出
|
|
106
|
+
export default Modal
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
declare interface NavBarAction {
|
|
4
|
+
text?: string
|
|
5
|
+
icon?: string
|
|
6
|
+
iconSize?: string | number
|
|
7
|
+
iconColor?: string
|
|
8
|
+
textColor?: string
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
badge?: string | number
|
|
11
|
+
data?: any
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare interface NavBarProps {
|
|
15
|
+
// 基础属性
|
|
16
|
+
title?: string
|
|
17
|
+
type?: 'default' | 'search' | 'home' | 'custom'
|
|
18
|
+
theme?: 'light' | 'dark' | 'primary' | 'transparent'
|
|
19
|
+
fixed?: boolean
|
|
20
|
+
border?: boolean
|
|
21
|
+
transparent?: boolean
|
|
22
|
+
shadow?: boolean
|
|
23
|
+
immersive?: boolean
|
|
24
|
+
safeArea?: boolean
|
|
25
|
+
|
|
26
|
+
// 标题相关
|
|
27
|
+
titleIcon?: string
|
|
28
|
+
titleIconSize?: string | number
|
|
29
|
+
titleIconColor?: string
|
|
30
|
+
titleRightIcon?: string
|
|
31
|
+
titleRightIconSize?: string | number
|
|
32
|
+
titleRightIconColor?: string
|
|
33
|
+
titleEllipsis?: boolean
|
|
34
|
+
titleStyle?: Record<string, any>
|
|
35
|
+
|
|
36
|
+
// 返回按钮
|
|
37
|
+
showBack?: boolean
|
|
38
|
+
backIcon?: string
|
|
39
|
+
backIconSize?: string | number
|
|
40
|
+
backIconColor?: string
|
|
41
|
+
backText?: string
|
|
42
|
+
delta?: number
|
|
43
|
+
|
|
44
|
+
// 左侧区域
|
|
45
|
+
showLeft?: boolean
|
|
46
|
+
leftIcon?: string
|
|
47
|
+
leftText?: string
|
|
48
|
+
|
|
49
|
+
// 右侧区域
|
|
50
|
+
rightIcon?: string
|
|
51
|
+
rightText?: string
|
|
52
|
+
actions?: NavBarAction[]
|
|
53
|
+
|
|
54
|
+
// 图标通用
|
|
55
|
+
iconSize?: string | number
|
|
56
|
+
iconColor?: string
|
|
57
|
+
|
|
58
|
+
// 搜索栏模式
|
|
59
|
+
searchValue?: string
|
|
60
|
+
placeholder?: string
|
|
61
|
+
placeholderStyle?: string
|
|
62
|
+
searchFocus?: boolean
|
|
63
|
+
searchDisabled?: boolean
|
|
64
|
+
showSearchButton?: boolean
|
|
65
|
+
searchButtonText?: string
|
|
66
|
+
|
|
67
|
+
// 样式控制
|
|
68
|
+
height?: string | number
|
|
69
|
+
backgroundColor?: string
|
|
70
|
+
color?: string
|
|
71
|
+
statusBarColor?: string
|
|
72
|
+
zIndex?: number
|
|
73
|
+
|
|
74
|
+
// 自定义样式
|
|
75
|
+
customStyle?: Record<string, any>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare interface NavBarEvents {
|
|
79
|
+
// 基础事件
|
|
80
|
+
onBack?: (event: MouseEvent) => void
|
|
81
|
+
onLeftClick?: (event: MouseEvent) => void
|
|
82
|
+
onRightClick?: (event: MouseEvent) => void
|
|
83
|
+
onTitleClick?: (event: MouseEvent) => void
|
|
84
|
+
|
|
85
|
+
// 搜索事件
|
|
86
|
+
onSearchInput?: (value: string, event: any) => void
|
|
87
|
+
onSearchFocus?: (event: any) => void
|
|
88
|
+
onSearchBlur?: (event: any) => void
|
|
89
|
+
onSearchConfirm?: (value: string, event: any) => void
|
|
90
|
+
onSearchClear?: () => void
|
|
91
|
+
onSearchButtonClick?: (value: string) => void
|
|
92
|
+
|
|
93
|
+
// 操作事件
|
|
94
|
+
onActionClick?: (action: NavBarAction, index: number) => void
|
|
95
|
+
|
|
96
|
+
// 生命周期
|
|
97
|
+
onInit?: () => void
|
|
98
|
+
onReady?: () => void
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare interface NavBarSlots {
|
|
102
|
+
// 命名插槽
|
|
103
|
+
left?: () => any
|
|
104
|
+
title?: () => any
|
|
105
|
+
right?: () => any
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare interface _NavBar {
|
|
109
|
+
new(): {
|
|
110
|
+
$props: AllowedComponentProps & VNodeProps & NavBarProps
|
|
111
|
+
$emit: NavBarEvents
|
|
112
|
+
$slots: NavBarSlots
|
|
113
|
+
$exposed?: {
|
|
114
|
+
focusSearch: () => void
|
|
115
|
+
blurSearch: () => void
|
|
116
|
+
clearSearch: () => void
|
|
117
|
+
getSearchValue: () => string
|
|
118
|
+
setSearchValue: (value: string) => void
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare const NavBar: _NavBar
|
|
124
|
+
export declare type NavBarPropsType = NavBarProps
|
|
125
|
+
export declare type NavBarActionType = NavBarAction
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
declare interface _LinkData {
|
|
4
|
+
url: string;
|
|
5
|
+
text: string;
|
|
6
|
+
isExternal?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface _ParseOptions {
|
|
10
|
+
/**
|
|
11
|
+
* 是否将链接转换为可点击元素
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
enableLinks?: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 是否在新窗口打开外部链接
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
openExternalInNewWindow?: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 链接点击事件处理
|
|
24
|
+
*/
|
|
25
|
+
onLinkClick?: (link: LinkData, event?: Event) => void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 是否解析并高亮邮箱地址
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
parseEmail?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 是否解析并高亮电话号码
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
parsePhone?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare interface ParseProps {
|
|
41
|
+
// 内容
|
|
42
|
+
content?: string
|
|
43
|
+
modelValue?: string
|
|
44
|
+
|
|
45
|
+
// 解析选项
|
|
46
|
+
options?: ParseOptions
|
|
47
|
+
|
|
48
|
+
// 解析模式
|
|
49
|
+
mode?: 'html' | 'text' | 'markdown' | 'json'
|
|
50
|
+
encoding?: 'utf-8' | 'base64' | 'url'
|
|
51
|
+
|
|
52
|
+
// 通用配置
|
|
53
|
+
maxLength?: number
|
|
54
|
+
ellipsis?: string
|
|
55
|
+
lines?: number
|
|
56
|
+
|
|
57
|
+
// HTML 配置
|
|
58
|
+
useRichText?: boolean
|
|
59
|
+
space?: 'ensp' | 'emsp' | 'nbsp'
|
|
60
|
+
filterTags?: string[]
|
|
61
|
+
allowTags?: string[]
|
|
62
|
+
allowAttributes?: Record<string, string[]>
|
|
63
|
+
allowDomains?: string[]
|
|
64
|
+
|
|
65
|
+
// 样式配置
|
|
66
|
+
customClass?: string
|
|
67
|
+
customStyle?: string | Record<string, string>
|
|
68
|
+
textStyle?: string | Record<string, string>
|
|
69
|
+
|
|
70
|
+
// 功能配置
|
|
71
|
+
autolink?: boolean
|
|
72
|
+
emoji?: boolean
|
|
73
|
+
highlight?: boolean
|
|
74
|
+
lazyLoad?: boolean
|
|
75
|
+
errorFallback?: string
|
|
76
|
+
|
|
77
|
+
// 事件配置
|
|
78
|
+
preventDefault?: boolean
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare interface _Parse {
|
|
82
|
+
new(): {
|
|
83
|
+
$props: AllowedComponentProps & VNodeProps & ParseProps
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare const Parse: _Parse
|
|
88
|
+
|
|
89
|
+
export declare type LinkData = _LinkData
|
|
90
|
+
export declare type ParseOptions = _ParseOptions
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
declare interface PopupProps {
|
|
4
|
+
// 显示控制
|
|
5
|
+
show?: boolean
|
|
6
|
+
modelValue?: boolean
|
|
7
|
+
|
|
8
|
+
// 位置和动画
|
|
9
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right'
|
|
10
|
+
animation?: 'fade' | 'slide' | 'zoom' | 'none'
|
|
11
|
+
duration?: number
|
|
12
|
+
|
|
13
|
+
// 遮罩层
|
|
14
|
+
showOverlay?: boolean
|
|
15
|
+
overlayColor?: string
|
|
16
|
+
overlayOpacity?: number
|
|
17
|
+
closeOnClickOverlay?: boolean
|
|
18
|
+
overlayClass?: string
|
|
19
|
+
|
|
20
|
+
// 样式
|
|
21
|
+
width?: string
|
|
22
|
+
height?: string
|
|
23
|
+
backgroundColor?: string
|
|
24
|
+
borderRadius?: string
|
|
25
|
+
zIndex?: number
|
|
26
|
+
|
|
27
|
+
// 行为
|
|
28
|
+
lockScroll?: boolean
|
|
29
|
+
showClose?: boolean
|
|
30
|
+
closePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
31
|
+
safeAreaInsetBottom?: boolean
|
|
32
|
+
|
|
33
|
+
// 自定义
|
|
34
|
+
customClass?: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare interface _Popup {
|
|
38
|
+
new(): {
|
|
39
|
+
$props: AllowedComponentProps & VNodeProps & PopupProps
|
|
40
|
+
|
|
41
|
+
// 事件定义
|
|
42
|
+
$emit: {
|
|
43
|
+
'update:show': (value: boolean) => void
|
|
44
|
+
'update:modelValue': (value: boolean) => void
|
|
45
|
+
'open': () => void
|
|
46
|
+
'opened': () => void
|
|
47
|
+
'close': () => void
|
|
48
|
+
'closed': () => void
|
|
49
|
+
'click-overlay': () => void
|
|
50
|
+
'before-enter': () => void
|
|
51
|
+
'after-enter': () => void
|
|
52
|
+
'before-leave': () => void
|
|
53
|
+
'after-leave': () => void
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare const Popup: _Popup
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
declare interface RowProps {
|
|
4
|
+
// 布局配置
|
|
5
|
+
gutter?: number | string
|
|
6
|
+
align?: 'top' | 'middle' | 'bottom' | 'stretch'
|
|
7
|
+
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between'
|
|
8
|
+
wrap?: boolean
|
|
9
|
+
|
|
10
|
+
// 样式配置
|
|
11
|
+
width?: string
|
|
12
|
+
height?: string
|
|
13
|
+
margin?: string
|
|
14
|
+
padding?: string
|
|
15
|
+
bgColor?: string
|
|
16
|
+
borderColor?: string
|
|
17
|
+
borderRadius?: string
|
|
18
|
+
shadow?: boolean
|
|
19
|
+
|
|
20
|
+
// 间距配置
|
|
21
|
+
rowGap?: number | string
|
|
22
|
+
columnGap?: number | string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare interface _Row {
|
|
26
|
+
new(): {
|
|
27
|
+
$props: AllowedComponentProps & VNodeProps & RowProps
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare const Row: _Row
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from '../common'
|
|
2
|
+
|
|
3
|
+
declare interface SearchProps {
|
|
4
|
+
// 值
|
|
5
|
+
modelValue?: string
|
|
6
|
+
|
|
7
|
+
// 样式配置
|
|
8
|
+
shape?: 'square' | 'round'
|
|
9
|
+
size?: 'small' | 'medium' | 'large'
|
|
10
|
+
bgColor?: string
|
|
11
|
+
borderColor?: string
|
|
12
|
+
textColor?: string
|
|
13
|
+
placeholderColor?: string
|
|
14
|
+
|
|
15
|
+
// 输入框配置
|
|
16
|
+
placeholder?: string
|
|
17
|
+
placeholderStyle?: string
|
|
18
|
+
inputType?: 'text' | 'number' | 'idcard' | 'digit' | 'textarea'
|
|
19
|
+
maxlength?: number
|
|
20
|
+
disabled?: boolean
|
|
21
|
+
autoFocus?: boolean
|
|
22
|
+
confirmType?: 'send' | 'search' | 'next' | 'go' | 'done'
|
|
23
|
+
adjustPosition?: boolean
|
|
24
|
+
cursorSpacing?: number
|
|
25
|
+
showConfirmBar?: boolean
|
|
26
|
+
|
|
27
|
+
// 功能配置
|
|
28
|
+
showClear?: boolean
|
|
29
|
+
showCancel?: boolean
|
|
30
|
+
alwaysShowCancel?: boolean
|
|
31
|
+
cancelText?: string
|
|
32
|
+
showHistory?: boolean
|
|
33
|
+
showSuggestions?: boolean
|
|
34
|
+
|
|
35
|
+
// 搜索相关
|
|
36
|
+
searchDelay?: number
|
|
37
|
+
minLength?: number
|
|
38
|
+
maxHistory?: number
|
|
39
|
+
suggestions?: any[]
|
|
40
|
+
suggestionFormatter?: (item: any) => string
|
|
41
|
+
|
|
42
|
+
// 自定义事件
|
|
43
|
+
onSearch?: (value: string) => void
|
|
44
|
+
onClear?: () => void
|
|
45
|
+
onCancel?: () => void
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare interface _Search {
|
|
49
|
+
new(): {
|
|
50
|
+
$props: AllowedComponentProps & VNodeProps & SearchProps
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare const Search: _Search
|