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
Unverified
Commit
869cae06
authored
May 02, 2024
by
芋道源码
Committed by
Gitee
May 02, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!437 update src/views/infra/webSocket/index.vue. #434
Merge pull request !437 from AhJindeg/N/A
parents
e2fe0474
de967a01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
src/views/infra/webSocket/index.vue
+2
-1
No files found.
src/views/infra/webSocket/index.vue
View file @
869cae06
...
...
@@ -54,7 +54,7 @@
</
template
>
<div
class=
"max-h-80 overflow-auto"
>
<ul>
<li
v-for=
"msg in message
List.reverse()
"
:key=
"msg.time"
class=
"mt-2"
>
<li
v-for=
"msg in message
ReverseList
"
:key=
"msg.time"
class=
"mt-2"
>
<div
class=
"flex items-center"
>
<span
class=
"text-primary mr-2 font-medium"
>
收到消息:
</span>
<span>
{{ formatDate(msg.time) }}
</span>
...
...
@@ -92,6 +92,7 @@ const { status, data, send, close, open } = useWebSocket(server.value, {
/** 监听接收到的数据 */
const
messageList
=
ref
([]
as
{
time
:
number
;
text
:
string
}[])
// 消息列表
const
messageReverseList
=
computed
(()
=>
messageList
.
value
.
slice
().
reverse
())
watchEffect
(()
=>
{
if
(
!
data
.
value
)
{
return
...
...
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