im-ui-mobile 0.1.8 → 0.1.9
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-button/im-button.vue +1 -1
- package/components/im-card/im-card.vue +1 -2
- package/components/im-dialog/im-dialog.vue +1 -0
- package/components/im-emoji-picker/im-emoji-picker.vue +1 -0
- package/components/im-friend-item/im-friend-item.vue +2 -0
- package/components/im-group-member-selector/im-group-member-selector.vue +1 -0
- package/components/im-group-rtc-join/im-group-rtc-join.vue +2 -0
- package/components/im-link/im-link.vue +1 -0
- package/components/im-loading/im-loading.vue +1 -0
- package/components/im-mention-picker/im-mention-picker.vue +4 -0
- package/components/im-message-action/im-message-action.vue +2 -0
- package/components/im-message-list/im-message-list.vue +1 -1
- package/components/im-modal/im-modal.vue +38 -70
- package/components/im-nav-bar/im-nav-bar.vue +1 -0
- package/components/im-read-receipt/im-read-receipt.vue +3 -1
- package/components/im-search/im-search.vue +1 -0
- package/components/im-sku/im-sku.vue +2 -0
- package/components/im-stepper/im-stepper.vue +1 -0
- package/components/im-upload/im-upload.vue +1 -0
- package/components/im-virtual-list/im-virtual-list.vue +1 -0
- package/components/im-voice-input/im-voice-input.vue +1 -0
- package/package.json +1 -1
- package/types/components/button.d.ts +1 -1
|
@@ -93,8 +93,7 @@
|
|
|
93
93
|
<script setup lang="ts">
|
|
94
94
|
import { computed } from 'vue'
|
|
95
95
|
import type { CSSProperties } from 'vue'
|
|
96
|
-
import
|
|
97
|
-
import ImBadge from '../im-badge/im-badge.vue'
|
|
96
|
+
import ImButton from '../im-button/im-button.vue'
|
|
98
97
|
|
|
99
98
|
// 类型定义
|
|
100
99
|
interface CardAction {
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
<script setup lang="ts">
|
|
99
99
|
import { ref, computed, watch, nextTick } from 'vue'
|
|
100
100
|
import type { Modal as ModalType } from 'im-ui-mobile'
|
|
101
|
+
import ImModal from '../im-modal/im-modal.vue'
|
|
101
102
|
|
|
102
103
|
// 定义对话框类型
|
|
103
104
|
type DialogType = 'alert' | 'confirm' | 'prompt' | 'success' | 'error' | 'warning' | 'info' | 'html' | 'custom'
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
<script setup lang="ts">
|
|
38
38
|
import { ref, computed } from 'vue'
|
|
39
39
|
import { GroupMember } from '../../libs';
|
|
40
|
+
import ImPopup from '../im-popup/im-popup.vue'
|
|
41
|
+
import ImAvatar from '../im-avatar/im-avatar.vue'
|
|
42
|
+
import ImSearch from '../im-search/im-search.vue'
|
|
43
|
+
import ImVirtualList from '../im-virtual-list/im-virtual-list.vue'
|
|
40
44
|
|
|
41
45
|
interface Props {
|
|
42
46
|
ownerId?: number;
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
<script setup lang="ts">
|
|
118
118
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
|
119
119
|
import { useDynamicRefs, datetime } from 'im-ui-mobile'
|
|
120
|
-
import { MESSAGE_TYPE, MESSAGE_STATUS } from '
|
|
120
|
+
import type { MESSAGE_TYPE, MESSAGE_STATUS } from 'im-ui-mobile'
|
|
121
121
|
import { Message, GroupMember } from '../../libs'
|
|
122
122
|
|
|
123
123
|
// 使用动态引用
|
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<im-popup
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
:overlay-color="overlayColor"
|
|
10
|
-
:overlay-opacity="overlayOpacity"
|
|
11
|
-
:close-on-click-overlay="closeOnClickOverlay"
|
|
12
|
-
:lock-scroll="lockScroll"
|
|
13
|
-
:width="computedWidth"
|
|
14
|
-
:border-radius="borderRadius"
|
|
15
|
-
:background-color="backgroundColor"
|
|
16
|
-
:z-index="zIndex"
|
|
17
|
-
:show-close="showClose && showHeader"
|
|
18
|
-
:close-position="closePosition"
|
|
19
|
-
:safe-area-inset-bottom="safeAreaInsetBottom"
|
|
20
|
-
:custom-class="customClass"
|
|
21
|
-
@open="handleOpen"
|
|
22
|
-
@opened="handleOpened"
|
|
23
|
-
@close="handleClose"
|
|
24
|
-
@closed="handleClosed"
|
|
25
|
-
@click-overlay="handleClickOverlay"
|
|
26
|
-
>
|
|
2
|
+
<im-popup v-model:show="visible" ref="popupRef" :position="position" :animation="animation" :duration="duration"
|
|
3
|
+
:show-overlay="showOverlay" :overlay-color="overlayColor" :overlay-opacity="overlayOpacity"
|
|
4
|
+
:close-on-click-overlay="closeOnClickOverlay" :lock-scroll="lockScroll" :width="computedWidth"
|
|
5
|
+
:border-radius="borderRadius" :background-color="backgroundColor" :z-index="zIndex"
|
|
6
|
+
:show-close="showClose && showHeader" :close-position="closePosition" :safe-area-inset-bottom="safeAreaInsetBottom"
|
|
7
|
+
:custom-class="customClass" @open="handleOpen" @opened="handleOpened" @close="handleClose" @closed="handleClosed"
|
|
8
|
+
@click-overlay="handleClickOverlay">
|
|
27
9
|
<!-- 头部 -->
|
|
28
10
|
<view v-if="showHeader" class="im-modal__header">
|
|
29
11
|
<slot name="header">
|
|
@@ -48,30 +30,14 @@
|
|
|
48
30
|
<slot name="footer">
|
|
49
31
|
<view class="im-modal__footer-buttons">
|
|
50
32
|
<!-- 取消按钮 -->
|
|
51
|
-
<im-button
|
|
52
|
-
|
|
53
|
-
class="im-modal__button"
|
|
54
|
-
:type="cancelType"
|
|
55
|
-
:size="buttonSize"
|
|
56
|
-
:plain="cancelPlain"
|
|
57
|
-
:disabled="cancelDisabled"
|
|
58
|
-
:loading="cancelLoading"
|
|
59
|
-
@click="handleCancel"
|
|
60
|
-
>
|
|
33
|
+
<im-button v-if="showCancel" class="im-modal__button" :type="cancelType" :size="buttonSize"
|
|
34
|
+
:plain="cancelPlain" :disabled="cancelDisabled" :loading="cancelLoading" @click="handleCancel">
|
|
61
35
|
{{ cancelText }}
|
|
62
36
|
</im-button>
|
|
63
37
|
|
|
64
38
|
<!-- 确认按钮 -->
|
|
65
|
-
<im-button
|
|
66
|
-
|
|
67
|
-
class="im-modal__button"
|
|
68
|
-
:type="confirmType"
|
|
69
|
-
:size="buttonSize"
|
|
70
|
-
:plain="confirmPlain"
|
|
71
|
-
:disabled="confirmDisabled"
|
|
72
|
-
:loading="confirmLoading"
|
|
73
|
-
@click="handleConfirm"
|
|
74
|
-
>
|
|
39
|
+
<im-button v-if="showConfirm" class="im-modal__button" :type="confirmType" :size="buttonSize"
|
|
40
|
+
:plain="confirmPlain" :disabled="confirmDisabled" :loading="confirmLoading" @click="handleConfirm">
|
|
75
41
|
{{ confirmText }}
|
|
76
42
|
</im-button>
|
|
77
43
|
</view>
|
|
@@ -83,25 +49,27 @@
|
|
|
83
49
|
<script setup lang="ts">
|
|
84
50
|
import { ref, computed } from 'vue'
|
|
85
51
|
import type { Popup as PopupType } from 'im-ui-mobile'
|
|
52
|
+
import ImPopup from '../im-popup/im-popup.vue'
|
|
53
|
+
import ImButton from '../im-button/im-button.vue'
|
|
86
54
|
|
|
87
55
|
// 定义 Props
|
|
88
56
|
interface Props {
|
|
89
57
|
// 显示控制
|
|
90
58
|
show?: boolean
|
|
91
59
|
modelValue?: boolean
|
|
92
|
-
|
|
60
|
+
|
|
93
61
|
// 标题和内容
|
|
94
62
|
title?: string
|
|
95
63
|
subtitle?: string
|
|
96
64
|
content?: string
|
|
97
|
-
|
|
65
|
+
|
|
98
66
|
// 头部配置
|
|
99
67
|
showHeader?: boolean
|
|
100
68
|
showSubtitle?: boolean
|
|
101
|
-
|
|
69
|
+
|
|
102
70
|
// 内容配置
|
|
103
71
|
bodyStyle?: Record<string, string>
|
|
104
|
-
|
|
72
|
+
|
|
105
73
|
// 底部按钮配置
|
|
106
74
|
showFooter?: boolean
|
|
107
75
|
showCancel?: boolean
|
|
@@ -117,7 +85,7 @@ interface Props {
|
|
|
117
85
|
cancelLoading?: boolean
|
|
118
86
|
confirmLoading?: boolean
|
|
119
87
|
buttonSize?: 'small' | 'medium' | 'large'
|
|
120
|
-
|
|
88
|
+
|
|
121
89
|
// 弹窗配置(传递给 im-popup)
|
|
122
90
|
position?: 'center' | 'top' | 'bottom' | 'left' | 'right'
|
|
123
91
|
animation?: 'fade' | 'slide' | 'zoom' | 'none'
|
|
@@ -137,7 +105,7 @@ interface Props {
|
|
|
137
105
|
closePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
138
106
|
safeAreaInsetBottom?: boolean
|
|
139
107
|
customClass?: string
|
|
140
|
-
|
|
108
|
+
|
|
141
109
|
// 行为控制
|
|
142
110
|
closeOnClickAction?: boolean
|
|
143
111
|
showCloseAfterConfirm?: boolean
|
|
@@ -165,16 +133,16 @@ interface Emits {
|
|
|
165
133
|
const props = withDefaults(defineProps<Props>(), {
|
|
166
134
|
show: false,
|
|
167
135
|
modelValue: false,
|
|
168
|
-
|
|
136
|
+
|
|
169
137
|
title: '提示',
|
|
170
138
|
subtitle: '',
|
|
171
139
|
content: '',
|
|
172
|
-
|
|
140
|
+
|
|
173
141
|
showHeader: true,
|
|
174
142
|
showSubtitle: true,
|
|
175
|
-
|
|
143
|
+
|
|
176
144
|
bodyStyle: () => ({}),
|
|
177
|
-
|
|
145
|
+
|
|
178
146
|
showFooter: true,
|
|
179
147
|
showCancel: true,
|
|
180
148
|
showConfirm: true,
|
|
@@ -189,7 +157,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
189
157
|
cancelLoading: false,
|
|
190
158
|
confirmLoading: false,
|
|
191
159
|
buttonSize: 'medium',
|
|
192
|
-
|
|
160
|
+
|
|
193
161
|
position: 'center',
|
|
194
162
|
animation: 'zoom',
|
|
195
163
|
duration: 300,
|
|
@@ -208,7 +176,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
208
176
|
closePosition: 'top-right',
|
|
209
177
|
safeAreaInsetBottom: true,
|
|
210
178
|
customClass: '',
|
|
211
|
-
|
|
179
|
+
|
|
212
180
|
closeOnClickAction: true,
|
|
213
181
|
showCloseAfterConfirm: true,
|
|
214
182
|
showCloseAfterCancel: true
|
|
@@ -231,17 +199,17 @@ const visible = computed({
|
|
|
231
199
|
// 计算宽度
|
|
232
200
|
const computedWidth = computed(() => {
|
|
233
201
|
let width = props.width
|
|
234
|
-
|
|
202
|
+
|
|
235
203
|
// 添加最大宽度限制
|
|
236
204
|
if (props.maxWidth) {
|
|
237
205
|
width = `min(${props.width}, ${props.maxWidth})`
|
|
238
206
|
}
|
|
239
|
-
|
|
207
|
+
|
|
240
208
|
// 添加最小宽度限制
|
|
241
209
|
if (props.minWidth) {
|
|
242
210
|
width = `max(${width}, ${props.minWidth})`
|
|
243
211
|
}
|
|
244
|
-
|
|
212
|
+
|
|
245
213
|
return width
|
|
246
214
|
})
|
|
247
215
|
|
|
@@ -292,7 +260,7 @@ const handleCancel = () => {
|
|
|
292
260
|
|
|
293
261
|
// 打开模态框
|
|
294
262
|
const open = () => {
|
|
295
|
-
|
|
263
|
+
popupRef.value.open()
|
|
296
264
|
}
|
|
297
265
|
|
|
298
266
|
// 关闭模态框
|
|
@@ -318,12 +286,12 @@ defineExpose({
|
|
|
318
286
|
&__header {
|
|
319
287
|
padding: 40rpx 40rpx 20rpx;
|
|
320
288
|
border-bottom: 2rpx solid #f5f5f5;
|
|
321
|
-
|
|
289
|
+
|
|
322
290
|
&-content {
|
|
323
291
|
text-align: center;
|
|
324
292
|
}
|
|
325
293
|
}
|
|
326
|
-
|
|
294
|
+
|
|
327
295
|
&__title {
|
|
328
296
|
display: block;
|
|
329
297
|
font-size: 36rpx;
|
|
@@ -331,17 +299,17 @@ defineExpose({
|
|
|
331
299
|
color: #333;
|
|
332
300
|
line-height: 1.4;
|
|
333
301
|
}
|
|
334
|
-
|
|
302
|
+
|
|
335
303
|
&__subtitle {
|
|
336
304
|
margin-top: 12rpx;
|
|
337
|
-
|
|
305
|
+
|
|
338
306
|
text {
|
|
339
307
|
font-size: 28rpx;
|
|
340
308
|
color: #999;
|
|
341
309
|
line-height: 1.4;
|
|
342
310
|
}
|
|
343
311
|
}
|
|
344
|
-
|
|
312
|
+
|
|
345
313
|
&__body {
|
|
346
314
|
padding: 40rpx;
|
|
347
315
|
font-size: 30rpx;
|
|
@@ -350,22 +318,22 @@ defineExpose({
|
|
|
350
318
|
overflow-y: auto;
|
|
351
319
|
max-height: 60vh;
|
|
352
320
|
}
|
|
353
|
-
|
|
321
|
+
|
|
354
322
|
&__content {
|
|
355
323
|
display: block;
|
|
356
324
|
text-align: center;
|
|
357
325
|
}
|
|
358
|
-
|
|
326
|
+
|
|
359
327
|
&__footer {
|
|
360
328
|
padding: 20rpx 40rpx 40rpx;
|
|
361
|
-
|
|
329
|
+
|
|
362
330
|
&-buttons {
|
|
363
331
|
display: flex;
|
|
364
332
|
gap: 20rpx;
|
|
365
333
|
justify-content: center;
|
|
366
334
|
}
|
|
367
335
|
}
|
|
368
|
-
|
|
336
|
+
|
|
369
337
|
&__button {
|
|
370
338
|
flex: 1;
|
|
371
339
|
}
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
import { ref, computed, onMounted, watch } from 'vue'
|
|
100
100
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
|
101
101
|
import type { IconType } from '../../types/components/icon'
|
|
102
|
+
import ImIcon from '../im-icon/im-icon.vue'
|
|
102
103
|
|
|
103
104
|
// 类型定义
|
|
104
105
|
interface NavBarAction {
|
|
@@ -34,9 +34,11 @@
|
|
|
34
34
|
|
|
35
35
|
<script setup lang="ts">
|
|
36
36
|
import { ref } from 'vue'
|
|
37
|
+
import { Chat, Message } from '../../libs';
|
|
37
38
|
import ImAvatar from '../im-avatar/im-avatar.vue'
|
|
38
39
|
import ImVirtualList from '../im-virtual-list/im-virtual-list.vue'
|
|
39
|
-
import
|
|
40
|
+
import ImTabs from '../im-tabs/im-tabs.vue'
|
|
41
|
+
import ImPopup from '../im-popup/im-popup.vue'
|
|
40
42
|
|
|
41
43
|
interface Props {
|
|
42
44
|
msgInfo: {
|
|
@@ -147,6 +147,8 @@ import type {
|
|
|
147
147
|
SkuEmits,
|
|
148
148
|
SelectedSku
|
|
149
149
|
} from '../../types/components/sku'
|
|
150
|
+
import ImPopup from '../im-popup/im-popup.vue'
|
|
151
|
+
import ImIcon from '../im-icon/im-icon.vue'
|
|
150
152
|
|
|
151
153
|
const props = withDefaults(defineProps<SkuProps>(), {
|
|
152
154
|
current: undefined,
|
package/package.json
CHANGED