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
2d7bf845
authored
May 21, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【解决todo】AI 对话显示隐藏效果
parent
a8cf6b6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/views/ai/chat/Conversation.vue
+4
-2
No files found.
src/views/ai/chat/Conversation.vue
View file @
2d7bf845
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
v-for=
"conversation in conversationMap[conversationKey]"
v-for=
"conversation in conversationMap[conversationKey]"
:key=
"conversation.id"
:key=
"conversation.id"
@
click=
"handleConversationClick(conversation.id)"
@
click=
"handleConversationClick(conversation.id)"
@
mouseover=
"hoverConversationId = conversation.id"
@
mouseout=
"hoverConversationId = ''"
>
>
<div
<div
:class=
"conversation.id === activeConversationId ? 'conversation active' : 'conversation'"
:class=
"conversation.id === activeConversationId ? 'conversation active' : 'conversation'"
...
@@ -46,7 +48,7 @@
...
@@ -46,7 +48,7 @@
<span
class=
"title"
>
{{ conversation.title }}
</span>
<span
class=
"title"
>
{{ conversation.title }}
</span>
</div>
</div>
<!-- TODO done @fan:缺一个【置顶】按钮,效果改成 hover 上去展示 -->
<!-- TODO done @fan:缺一个【置顶】按钮,效果改成 hover 上去展示 -->
<div
class=
"button-wrapper"
>
<div
class=
"button-wrapper"
v-show=
"hoverConversationId === conversation.id"
>
<el-button
class=
"btn"
link
@
click
.
stop=
"handlerTop(conversation)"
>
<el-button
class=
"btn"
link
@
click
.
stop=
"handlerTop(conversation)"
>
<el-icon
title=
"置顶"
v-if=
"!conversation.pinned"
><Top
/></el-icon>
<el-icon
title=
"置顶"
v-if=
"!conversation.pinned"
><Top
/></el-icon>
<el-icon
title=
"置顶"
v-if=
"conversation.pinned"
><Bottom
/></el-icon>
<el-icon
title=
"置顶"
v-if=
"conversation.pinned"
><Bottom
/></el-icon>
...
@@ -104,6 +106,7 @@ const message = useMessage() // 消息弹窗
...
@@ -104,6 +106,7 @@ const message = useMessage() // 消息弹窗
// 定义属性
// 定义属性
const
searchName
=
ref
<
string
>
(
''
)
// 对话搜索
const
searchName
=
ref
<
string
>
(
''
)
// 对话搜索
const
activeConversationId
=
ref
<
string
|
null
>
(
null
)
// 选中的对话,默认为 null
const
activeConversationId
=
ref
<
string
|
null
>
(
null
)
// 选中的对话,默认为 null
const
hoverConversationId
=
ref
<
string
|
null
>
(
null
)
// 悬浮上去的对话
const
conversationList
=
ref
([]
as
ChatConversationVO
[])
// 对话列表
const
conversationList
=
ref
([]
as
ChatConversationVO
[])
// 对话列表
const
conversationMap
=
ref
<
any
>
({})
// 对话分组 (置顶、今天、三天前、一星期前、一个月前)
const
conversationMap
=
ref
<
any
>
({})
// 对话分组 (置顶、今天、三天前、一星期前、一个月前)
const
drawer
=
ref
<
boolean
>
(
false
)
// 角色仓库抽屉
const
drawer
=
ref
<
boolean
>
(
false
)
// 角色仓库抽屉
...
@@ -456,7 +459,6 @@ onMounted(async () => {
...
@@ -456,7 +459,6 @@ onMounted(async () => {
.btn
{
.btn
{
margin
:
0
;
margin
:
0
;
}
}
}
}
}
}
}
}
...
...
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