Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
9f2369dc
N
NodeJS_639770
项目概览
inscode
/
NodeJS_639770
与 Fork 源项目一致
Fork自
inscode / NodeJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NodeJS_639770
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9f2369dc
编写于
5月 31, 2024
作者:
D
DebugIsFalse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature: 添加接口
上级
8ab91b3c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
11 deletion
+27
-11
components/i/library/thread.vue
components/i/library/thread.vue
+4
-1
composables/useCollectionRequest.js
composables/useCollectionRequest.js
+5
-5
pages/library/[id].vue
pages/library/[id].vue
+18
-5
未找到文件。
components/i/library/thread.vue
浏览文件 @
9f2369dc
...
...
@@ -13,7 +13,7 @@
</div>
<div
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
>
<UIcon
name=
"i-heroicons-clock"
/>
<span>
52 分钟前
</span>
<span>
{{
formatTime
}}
</span>
</div>
</div>
<div
class=
"flex gap-4"
>
...
...
@@ -50,4 +50,7 @@ const props = defineProps({
function
handleOpenSelect
(
id
)
{
$openLibrarySelect
(
id
)
}
const
formatTime
=
computed
(()
=>
{
return
useTime
(
props
.
item
.
create_time
)
})
</
script
>
\ No newline at end of file
composables/useCollectionRequest.js
浏览文件 @
9f2369dc
...
...
@@ -43,11 +43,11 @@ export default () => {
}
// 查询收藏夹会话列表
const
findCollection
=
async
(
collection_id
)
=>
{
const
{
data
,
error
}
=
await
useRequest
(
`/v1/collection/
${
collection_id
}
/items`
,
{
method
:
'
post
'
,
body
}
)
return
{
data
,
error
}
const
{
data
,
error
}
=
await
useRequest
(
`/v1/collection/
${
collection_id
}
/items`
,
{
method
:
'
get
'
})
if
(
error
.
value
)
{
return
[]
}
return
data
.
value
.
data
||
[]
}
// 删除收藏夹会话
const
deleteCollectionRecord
=
async
(
collection_id
,
c_id
)
=>
{
...
...
pages/library/[id].vue
浏览文件 @
9f2369dc
...
...
@@ -5,11 +5,11 @@
<div
class=
"flex gap-10"
>
<div
class=
"flex flex-col flex-grow"
>
<div
class=
"flex flex-col gap-4"
>
<ILibraryThread
/>
<ILibraryThread
/>
<ILibraryThread
/>
<ILibraryThread
/>
<ILibraryThread
/>
<ILibraryThread
v-for=
"item in themesTagList"
:item=
"item"
:key=
"item.id"
/>
</div>
</div>
</div>
...
...
@@ -18,7 +18,20 @@
</
template
>
<
script
setup
>
const
route
=
useRoute
()
const
{
findCollection
}
=
useCollectionRequest
()
const
state
=
reactive
({
id
:
route
.
params
.
id
})
const
themesTagList
=
ref
([])
async
function
findCollectionData
()
{
const
data
=
await
findCollection
(
state
.
id
)
themesTagList
.
value
=
data
.
map
(
item
=>
{
return
{
...
item
,
title
:
item
.
c_title
}
})
console
.
log
(
`themesTagList.value:`
,
themesTagList
.
value
)
}
await
findCollectionData
()
</
script
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录