@aochuang/client-sdk 1.0.293 → 1.0.295
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="sdk-account-select">
|
|
2
|
+
<div class="sdk-account-select" :class="['is-' + direction]">
|
|
3
3
|
<template v-if="loading">
|
|
4
4
|
<account-select-skeleton></account-select-skeleton>
|
|
5
5
|
</template>
|
|
@@ -84,6 +84,13 @@ export default {
|
|
|
84
84
|
},
|
|
85
85
|
queryMethod: {
|
|
86
86
|
type: Function
|
|
87
|
+
},
|
|
88
|
+
direction: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: 'horizontal',
|
|
91
|
+
validator (value) {
|
|
92
|
+
return ['vertical', 'horizontal'].indexOf(value) >= 0
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
},
|
|
89
96
|
data () {
|
|
@@ -126,6 +133,9 @@ export default {
|
|
|
126
133
|
box-sizing: border-box;
|
|
127
134
|
word-break: break-all;
|
|
128
135
|
}
|
|
136
|
+
.sdk-account-select.is-horizontal{
|
|
137
|
+
word-break: normal;
|
|
138
|
+
}
|
|
129
139
|
.sdk-account-select__item{
|
|
130
140
|
display: flex;
|
|
131
141
|
flex-direction: row;
|
|
@@ -184,6 +194,19 @@ export default {
|
|
|
184
194
|
height: 100%;
|
|
185
195
|
border-radius: 3px;
|
|
186
196
|
}
|
|
197
|
+
.sdk-account-select.is-vertical .sdk-account-select__item{
|
|
198
|
+
flex-direction: column;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
text-align: center;
|
|
201
|
+
}
|
|
202
|
+
.sdk-account-select.is-vertical .sdk-account-select__item-avatar{
|
|
203
|
+
margin-right: 0;
|
|
204
|
+
margin-bottom: 4px;
|
|
205
|
+
}
|
|
206
|
+
.sdk-account-select.is-vertical .sdk-account-select__item-main{
|
|
207
|
+
width: 100%;
|
|
208
|
+
min-width: 0;
|
|
209
|
+
}
|
|
187
210
|
.sdk-account-select__empty{
|
|
188
211
|
color: #999;
|
|
189
212
|
font-size: 12px;
|
|
@@ -202,4 +225,7 @@ export default {
|
|
|
202
225
|
overflow: hidden;
|
|
203
226
|
text-overflow: ellipsis;
|
|
204
227
|
}
|
|
205
|
-
|
|
228
|
+
.sdk-account-select.is-horizontal .sdk-account-select__item-name{
|
|
229
|
+
word-break: break-all;
|
|
230
|
+
}
|
|
231
|
+
</style>
|
package/package.json
CHANGED
|
@@ -42,9 +42,17 @@ export default class Websocket {
|
|
|
42
42
|
this.socket = options.socket
|
|
43
43
|
this.socket.log.onBeforeAdd(({ data }) => {
|
|
44
44
|
// 收消息需要拦截一些,因为下面有了
|
|
45
|
-
if (data && ['socket:sendMessage'
|
|
45
|
+
if (data && ['socket:sendMessage'].includes(data.group)) {
|
|
46
46
|
return false
|
|
47
47
|
}
|
|
48
|
+
if (data && ['socket:receiveMessage'].includes(data.group)) {
|
|
49
|
+
if (!data.content || !data.content.message || !data.content.message.cmdType) {
|
|
50
|
+
return false
|
|
51
|
+
}
|
|
52
|
+
if (data.content.message.cmdType === 'CmdNewMessage') {
|
|
53
|
+
return false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
48
56
|
})
|
|
49
57
|
this.socket.event.on('onCmdNewMessage', (evt) => {
|
|
50
58
|
if (!options.checkSocketEventNotifyMethod || options.checkSocketEventNotifyMethod(evt) !== false) {
|