Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
3134f178
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看板
提交
3134f178
编写于
5月 31, 2024
作者:
View Design
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
thread
上级
538bb4b2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
16 deletion
+42
-16
components/i/library/Collect.vue
components/i/library/Collect.vue
+1
-1
components/i/library/Select.vue
components/i/library/Select.vue
+3
-1
components/i/library/Thread.vue
components/i/library/Thread.vue
+37
-14
pages/library/[id].vue
pages/library/[id].vue
+1
-0
未找到文件。
components/i/library/Collect.vue
浏览文件 @
3134f178
...
...
@@ -6,7 +6,7 @@
<div
class=
"flex"
>
<div
class=
"flex items-center text-gray-500 text-sm gap-0.5"
>
<UIcon
name=
"i-heroicons-square-3-stack-3d"
/>
<span>
1
</span>
<span>
{{
item
.
record_count
}}
</span>
</div>
</div>
</div>
...
...
components/i/library/Select.vue
浏览文件 @
3134f178
...
...
@@ -29,7 +29,7 @@
@
click=
"handleSelected(item.id)"
>
<div
class=
"flex flex-grow justify-between items-center"
>
<div>
{{
item.name
}}
</div>
<div>
{{
item.name
}}
</div>
<UIcon
v-if=
"selected.includes(item.id)"
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary text-lg"
/>
</div>
</UButton>
...
...
@@ -73,6 +73,8 @@ async function handleSelected(id) {
selected
.
value
=
[
id
]
}
async
function
handleSave
()
{
console
.
log
(
788
)
return
if
(
loading
.
value
)
return
loading
.
value
=
true
// 取消合集
...
...
components/i/library/Thread.vue
浏览文件 @
3134f178
<
template
>
<ULink
:to=
"`/search/$
{
item
.c_id}`" class="flex flex-col group">
<div
class=
"transition truncate group-hover:text-primary"
>
{{
item
.
title
}}
</div>
<ULink
:to=
"`/search/$
{
thread
.c_id}`" class="flex flex-col group">
<div
class=
"transition truncate group-hover:text-primary"
>
{{
thread
.
title
}}
</div>
<div
class=
"break-word text-balance line-clamp-2 font-sans text-base"
:class=
"textColor"
>
{{
item
.
description
||
'
待补充
'
}}
{{
thread
.
description
||
'
待补充
'
}}
</div>
</ULink>
<div
class=
"flex justify-between items-center"
>
...
...
@@ -13,18 +13,20 @@
</div>
<div
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
>
<UIcon
name=
"i-heroicons-clock"
/>
<span>
{{
useTime
(
item
.
create_time
)
}}
</span>
<span>
{{
useTime
(
thread
.
create_time
)
}}
</span>
</div>
</div>
<div
class=
"flex gap-4"
>
<UButton
:ui=
"
{ rounded: 'rounded-full' }"
to="/library/123"
color="white"
size="2xs"
label="前端开发"
/>
<UTooltip
text=
"添加到收藏"
>
<template
v-for=
"collect in thread.collections"
:key=
"collect.collection_id"
>
<UButton
:ui=
"
{ rounded: 'rounded-full' }"
:to="`/library/${collect.collection_id}`"
color="white"
size="2xs"
:label="collect.collection_name"
/>
</
template
>
<UTooltip
text=
"添加到收藏"
v-if=
"!thread.collections.length"
>
<UButton
color=
"gray"
variant=
"ghost"
...
...
@@ -45,9 +47,30 @@ const props = defineProps({
item
:
{
type
:
Object
,
default
:
(()
=>
{})()
},
isItem
:
{
type
:
Boolean
,
default
:
false
}
})
const
thread
=
computed
(()
=>
{
if
(
!
props
.
isItem
)
return
props
.
item
else
{
const
item
=
props
.
item
item
.
title
=
props
.
item
.
c_title
item
.
collections
=
[]
if
(
props
.
item
.
collection_id
&&
props
.
item
.
collection_name
)
{
item
.
collections
=
[
{
collection_id
:
props
.
item
.
collection_id
,
collection_name
:
props
.
item
.
collection_name
}
]
}
return
item
}
})
function
handleOpenSelect
(
id
)
{
$openLibrarySelect
(
id
)
function
handleOpenSelect
()
{
$openLibrarySelect
(
props
.
item
.
c_
id
)
}
</
script
>
\ No newline at end of file
pages/library/[id].vue
浏览文件 @
3134f178
...
...
@@ -9,6 +9,7 @@
v-for=
"item in themesTagList"
:item=
"item"
:key=
"item.id"
is-item
/>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录