Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b6cd12a3
authored
Jul 10, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】mall 客服会话置顶排序,右键菜单适配折叠菜单产生的位置偏移
parent
993d0705
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/views/mall/promotion/kefu/components/KeFuConversationList.vue
+7
-3
No files found.
src/views/mall/promotion/kefu/components/KeFuConversationList.vue
View file @
b6cd12a3
...
@@ -72,18 +72,22 @@ import { KeFuConversationApi, KeFuConversationRespVO } from '@/api/mall/promotio
...
@@ -72,18 +72,22 @@ import { KeFuConversationApi, KeFuConversationRespVO } from '@/api/mall/promotio
import
{
useEmoji
}
from
'./tools/emoji'
import
{
useEmoji
}
from
'./tools/emoji'
import
{
formatDate
}
from
'@/utils/formatTime'
import
{
formatDate
}
from
'@/utils/formatTime'
import
{
KeFuMessageContentTypeEnum
}
from
'./tools/constants'
import
{
KeFuMessageContentTypeEnum
}
from
'./tools/constants'
import
{
useAppStore
}
from
'@/store/modules/app'
defineOptions
({
name
:
'KeFuConversationList'
})
defineOptions
({
name
:
'KeFuConversationList'
})
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
appStore
=
useAppStore
()
const
{
replaceEmoji
}
=
useEmoji
()
const
{
replaceEmoji
}
=
useEmoji
()
const
conversationList
=
ref
<
KeFuConversationRespVO
[]
>
([])
// 会话列表
const
conversationList
=
ref
<
KeFuConversationRespVO
[]
>
([])
// 会话列表
const
activeConversationId
=
ref
(
-
1
)
// 选中的会话
const
activeConversationId
=
ref
(
-
1
)
// 选中的会话
const
collapse
=
computed
(()
=>
appStore
.
getCollapse
)
// 折叠菜单
/** 加载会话列表 */
/** 加载会话列表 */
const
getConversationList
=
async
()
=>
{
const
getConversationList
=
async
()
=>
{
conversationList
.
value
=
await
KeFuConversationApi
.
getConversationList
()
const
list
=
await
KeFuConversationApi
.
getConversationList
()
list
.
sort
((
a
:
KeFuConversationRespVO
,
_
)
=>
(
a
.
adminPinned
?
-
1
:
1
))
conversationList
.
value
=
list
}
}
defineExpose
({
getConversationList
})
defineExpose
({
getConversationList
})
...
@@ -132,7 +136,7 @@ const rightClick = (mouseEvent: PointerEvent, item: KeFuConversationRespVO) => {
...
@@ -132,7 +136,7 @@ const rightClick = (mouseEvent: PointerEvent, item: KeFuConversationRespVO) => {
showRightMenu
.
value
=
true
showRightMenu
.
value
=
true
rightMenuStyle
.
value
=
{
rightMenuStyle
.
value
=
{
top
:
mouseEvent
.
clientY
-
110
+
'px'
,
top
:
mouseEvent
.
clientY
-
110
+
'px'
,
left
:
mouseEvent
.
clientX
-
8
0
+
'px'
left
:
collapse
.
value
?
mouseEvent
.
clientX
-
80
+
'px'
:
mouseEvent
.
clientX
-
21
0
+
'px'
}
}
}
}
/** 关闭右键菜单 */
/** 关闭右键菜单 */
...
...
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