Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d8a2b061
authored
Oct 09, 2021
by
zhousil
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
有头像时样式
parent
57e47740
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
17 deletions
components/message.vue
components/message.vue
View file @
d8a2b061
...
@@ -9,16 +9,22 @@
...
@@ -9,16 +9,22 @@
>
>
<div
class=
"msg-content"
:class=
"
{ 'algin-left': !isMyMessage }">
<div
class=
"msg-content"
:class=
"
{ 'algin-left': !isMyMessage }">
<div
<div
class=
"msg-name no-selection d-flex align-items-center"
class=
"msg-name no-selection"
:class=
"
{
:class=
"
{ 'algin-left': !isMyMessage }"
'flex-row-reverse justify-content-end': !isMyMessage,
}"
v-if="!isWithdrawMessage"
v-if="!isWithdrawMessage"
>
>
{{
userName
}}
{{
userName
}}
<avatar
v-if=
"avatar"
:src=
"avatar"
shape=
"circle"
/>
</div>
</div>
<div
class=
"content-avatar d-flex align-items-start"
:class=
"
{ 'justify-content-end': isMyMessage }"
>
<img
src=
"@/assets/default-host-avatar.svg"
style=
"width: 42px"
v-if=
"!avatar && messageComponent && showHostAvatar"
class=
"host-avatar"
/>
<component
<component
:is=
"messageComponent"
:is=
"messageComponent"
:user-name=
"userName"
:user-name=
"userName"
...
@@ -29,6 +35,8 @@
...
@@ -29,6 +35,8 @@
v-model="data"
v-model="data"
@open="openFile"
@open="openFile"
/>
/>
<avatar
v-if=
"avatar"
:src=
"avatar"
shape=
"circle"
/>
</div>
</div>
</div>
<i
<i
...
@@ -195,6 +203,7 @@
...
@@ -195,6 +203,7 @@
private
readerListOffset
=
false
;
private
readerListOffset
=
false
;
private
defaultMessageHandledStatus
=
dto
.
MessageHandled
.
Default
;
private
defaultMessageHandledStatus
=
dto
.
MessageHandled
.
Default
;
private
showHostAvatar
:
boolean
=
false
;
private
get
canWithdraw
()
{
private
get
canWithdraw
()
{
if
(
this
.
backend
&&
this
.
data
)
{
if
(
this
.
backend
&&
this
.
data
)
{
...
@@ -261,6 +270,11 @@
...
@@ -261,6 +270,11 @@
if
(
this
.
isSendingMessage
)
{
if
(
this
.
isSendingMessage
)
{
if
(
avatar
&&
this
.
chatMyId
)
{
if
(
avatar
&&
this
.
chatMyId
)
{
if
(
Object
.
getOwnPropertyNames
(
avatar
).
length
>
0
)
{
this
.
showHostAvatar
=
true
;
}
else
{
this
.
showHostAvatar
=
false
;
}
const
user
=
avatar
[
this
.
chatMyId
];
const
user
=
avatar
[
this
.
chatMyId
];
if
(
user
&&
user
.
avatar
)
{
if
(
user
&&
user
.
avatar
)
{
return
user
.
avatar
;
return
user
.
avatar
;
...
@@ -269,6 +283,11 @@
...
@@ -269,6 +283,11 @@
}
}
if
(
avatar
&&
this
.
data
)
{
if
(
avatar
&&
this
.
data
)
{
if
(
Object
.
getOwnPropertyNames
(
avatar
).
length
>
0
)
{
this
.
showHostAvatar
=
true
;
}
else
{
this
.
showHostAvatar
=
false
;
}
const
value
=
avatar
[
this
.
data
.
eid
];
const
value
=
avatar
[
this
.
data
.
eid
];
if
(
value
&&
value
.
avatar
)
{
if
(
value
&&
value
.
avatar
)
{
return
value
.
avatar
;
return
value
.
avatar
;
...
@@ -430,24 +449,16 @@
...
@@ -430,24 +449,16 @@
}
}
}
}
.msg-name
{
.msg-name
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#888
;
color
:
#888
;
text-align
:
right
;
text-align
:
right
;
margin-bottom
:
3px
;
margin-bottom
:
3px
;
min-height
:
16px
;
min-height
:
16px
;
&.algin-left
{
.el-avatar
{
text-align
:
left
;
margin-left
:
10px
;
}
&
.flex-row-reverse
{
.el-avatar
{
margin-left
:
0
;
margin-right
:
10px
;
}
}
}
}
}
.msg-content
{
.msg-content
{
text-align
:
right
;
text-align
:
right
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment