@aochuang/client-sdk 1.0.300 → 1.0.302
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/common/avatar/avatar.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<template v-else>
|
|
7
7
|
<template v-if="allowAllAccount">
|
|
8
8
|
<div
|
|
9
|
-
class="sdk-account-select__item is-all" :class="{'is-active': !value}"
|
|
9
|
+
class="sdk-account-select__item is-all" :class="{'is-active': !value, 'is-online': true}"
|
|
10
10
|
@click="handleAccountItemClick(null)"
|
|
11
11
|
>
|
|
12
12
|
<div class="sdk-account-select__item-avatar">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<template v-if="data && data.length">
|
|
24
24
|
<div
|
|
25
25
|
class="sdk-account-select__item"
|
|
26
|
-
:class="{'is-active': value === item.id}"
|
|
26
|
+
:class="{'is-active': value === item.id, 'is-online': item[aliveField]}"
|
|
27
27
|
v-for="item in data"
|
|
28
28
|
:key="item.id"
|
|
29
29
|
@click="handleAccountItemClick(item)"
|
|
@@ -147,6 +147,13 @@ export default {
|
|
|
147
147
|
transition: all .25s;
|
|
148
148
|
position: relative;
|
|
149
149
|
}
|
|
150
|
+
.sdk-account-select__item:not(.is-online) {
|
|
151
|
+
color: #666;
|
|
152
|
+
}
|
|
153
|
+
.sdk-account-select__item:not(.is-online) .sdk-account-select__item-avatar{
|
|
154
|
+
filter: grayscale(100%);
|
|
155
|
+
opacity: .8;
|
|
156
|
+
}
|
|
150
157
|
.sdk-account-select__item:not(:last-child) {
|
|
151
158
|
margin-bottom: 2px;
|
|
152
159
|
}
|
|
@@ -178,9 +185,9 @@ export default {
|
|
|
178
185
|
color: #666;
|
|
179
186
|
}
|
|
180
187
|
.sdk-account-select__item-avatar{
|
|
181
|
-
width:
|
|
182
|
-
height:
|
|
183
|
-
min-width:
|
|
188
|
+
width: 36px;
|
|
189
|
+
height: 36px;
|
|
190
|
+
min-width: 36px;
|
|
184
191
|
border-radius: 3px;
|
|
185
192
|
margin-right: 6px;
|
|
186
193
|
position: relative;
|
|
@@ -135,9 +135,9 @@ export default {
|
|
|
135
135
|
.sdk-session-item__avatar{
|
|
136
136
|
margin-right: 12px;
|
|
137
137
|
position: relative;
|
|
138
|
-
min-width:
|
|
139
|
-
width:
|
|
140
|
-
height:
|
|
138
|
+
min-width: 36px;
|
|
139
|
+
width: 36px;
|
|
140
|
+
height: 36px;
|
|
141
141
|
background-color: #eee;
|
|
142
142
|
border-radius: 3px;
|
|
143
143
|
}
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
}
|
|
150
150
|
&:not(.is-mute) {
|
|
151
151
|
left: calc(~'100% - 12px');
|
|
152
|
-
top: -
|
|
152
|
+
top: -8px;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
.sdk-session-item__main{
|
package/package.json
CHANGED
|
@@ -3,18 +3,20 @@ import { unique } from '../../../utils/string.js'
|
|
|
3
3
|
|
|
4
4
|
export default class ClientChatDraft {
|
|
5
5
|
data = Vue.observable({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 草稿消息
|
|
8
|
+
* [{
|
|
9
|
+
* id: 'xxx', // 本地唯一id
|
|
10
|
+
* targetId: 'xxx', // 群或者好友id
|
|
11
11
|
* targetType: null, // 草稿类型,0:好友,1:群
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
* msgType: null, // 消息类型
|
|
13
|
+
* content: null, // 消息内容
|
|
14
|
+
* mentions: [], // @成员信息
|
|
15
|
+
* quoteMessage: null, // 引用消息快照
|
|
16
|
+
* createTime: null // 创建时间
|
|
17
|
+
* }]
|
|
18
|
+
*/
|
|
19
|
+
draftData: []
|
|
18
20
|
})
|
|
19
21
|
|
|
20
22
|
constructor (options) {
|
|
@@ -46,7 +48,17 @@ export default class ClientChatDraft {
|
|
|
46
48
|
if (this.data.draftData.some(v => v.targetType === data.targetType && v.targetId === data.targetId)) {
|
|
47
49
|
return
|
|
48
50
|
}
|
|
49
|
-
const
|
|
51
|
+
const nextData = Object.assign({}, data)
|
|
52
|
+
if (data.quoteMessage) {
|
|
53
|
+
const { msgType, content, wechatTime, msgSvrId } = data.quoteMessage
|
|
54
|
+
nextData.quoteMessage = {
|
|
55
|
+
msgType,
|
|
56
|
+
content,
|
|
57
|
+
wechatTime,
|
|
58
|
+
msgSvrId
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const nextItem = Object.assign(nextData, {
|
|
50
62
|
id: unique(),
|
|
51
63
|
createTime: Date.now()
|
|
52
64
|
})
|
|
@@ -89,4 +101,4 @@ export default class ClientChatDraft {
|
|
|
89
101
|
})
|
|
90
102
|
})
|
|
91
103
|
}
|
|
92
|
-
}
|
|
104
|
+
}
|