Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
409a709a
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看板
提交
409a709a
编写于
5月 30, 2024
作者:
D
DebugIsFalse
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of gitcode.com:git_bot/ai-fe
上级
d1363911
c04e2a02
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
55 addition
and
44 deletion
+55
-44
components/i/action/thread.vue
components/i/action/thread.vue
+38
-0
components/i/library/create.vue
components/i/library/create.vue
+1
-1
components/i/library/select.vue
components/i/library/select.vue
+2
-2
components/i/library/thread.vue
components/i/library/thread.vue
+1
-34
components/i/search/Header.vue
components/i/search/Header.vue
+12
-6
composables/useCollectionRequest.js
composables/useCollectionRequest.js
+1
-1
未找到文件。
components/i/action/thread.vue
0 → 100644
浏览文件 @
409a709a
<
template
>
<UDropdown
class=
"flex flex-grow"
:items=
"actionItems"
>
<UButton
color=
"gray"
variant=
"ghost"
size=
"2xs"
icon=
"i-heroicons-ellipsis-horizontal"
/>
</UDropdown>
</
template
>
<
script
setup
>
const
actionItems
=
[
[
{
label
:
'
添加到收藏
'
,
icon
:
'
i-heroicons-plus
'
,
click
:
()
=>
{
handleOpenSelect
()
}
},
{
label
:
'
更改合集
'
,
icon
:
'
i-heroicons-squares-plus
'
,
click
:
()
=>
{
handleOpenSelect
()
}
},
{
label
:
'
从收藏中移除
'
,
icon
:
'
i-heroicons-x-mark
'
},
{
label
:
'
删除主题
'
,
icon
:
'
i-heroicons-trash
'
}
]
]
</
script
>
components/i/library/create.vue
浏览文件 @
409a709a
...
...
@@ -32,7 +32,7 @@
</div>
<UTextarea
v-model=
"description"
placeholder=
"
集合
描述"
placeholder=
"
合集
描述"
/>
</div>
</div>
...
...
components/i/library/select.vue
浏览文件 @
409a709a
...
...
@@ -3,7 +3,7 @@
<UCard
:ui=
"
{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
<template
#header
>
<div
class=
"flex items-center justify-between"
>
<div
class=
"text-xl"
>
选择
集合
</div>
<div
class=
"text-xl"
>
选择
合集
</div>
<UButton
leading-icon=
"i-heroicons-x-mark-20-solid"
color=
"gray"
...
...
@@ -15,7 +15,7 @@
<div
class=
"flex flex-col gap-4"
>
<UButton
leading-icon=
"i-heroicons-plus-20-solid"
label=
"创建新
集合
"
label=
"创建新
合集
"
color=
"gray"
@
click=
"handleOpenCreate"
/>
...
...
components/i/library/thread.vue
浏览文件 @
409a709a
...
...
@@ -43,14 +43,7 @@
@
click=
"handleOpenSelect"
/>
</UTooltip>
<UDropdown
class=
"flex flex-grow"
:items=
"actionItems"
>
<UButton
color=
"gray"
variant=
"ghost"
size=
"2xs"
icon=
"i-heroicons-ellipsis-horizontal"
/>
</UDropdown>
<IActionThread
/>
</div>
</div>
<UDivider
/>
...
...
@@ -58,32 +51,6 @@
<
script
setup
>
const
{
$openLibrarySelect
}
=
useLibraryStore
()
const
textColor
=
'
text-gray-500 dark:text-gray-400
'
const
actionItems
=
[
[
{
label
:
'
添加到收藏
'
,
icon
:
'
i-heroicons-plus
'
,
click
:
()
=>
{
handleOpenSelect
()
}
},
{
label
:
'
更改集合
'
,
icon
:
'
i-heroicons-squares-plus
'
,
click
:
()
=>
{
handleOpenSelect
()
}
},
{
label
:
'
从收藏中移除
'
,
icon
:
'
i-heroicons-x-mark
'
},
{
label
:
'
删除主题
'
,
icon
:
'
i-heroicons-trash
'
}
]
]
function
handleOpenSelect
(
id
)
{
$openLibrarySelect
(
id
)
}
...
...
components/i/search/Header.vue
浏览文件 @
409a709a
...
...
@@ -14,14 +14,20 @@
/>
</div>
<div
class=
"flex gap-2"
>
<IActionThread
/>
<UButton
@
click=
"handleOpenSelect"
color=
"gray"
variant=
"ghost"
leading-icon=
"i-heroicons-plus-
20-solid
"
color=
"gray"
variant=
"ghost"
leading-icon=
"i-heroicons-plus-
small
"
:label=
"$selectCollectionId.length > 0 ? '已收藏' : '收藏'"
@
click=
"handleOpenSelect"
/>
<UPopover
v-model:open=
"isShareOpen"
>
<UButton
:leading-icon=
"isOpen ? 'i-heroicons-share-20-solid' : 'i-heroicons-lock-closed-20-solid'"
@
click=
"handleSetOpenState"
>
分享
</UButton>
<UButton
:leading-icon=
"isOpen ? 'i-heroicons-share-16-solid' : 'i-heroicons-lock-closed-16-solid'"
label=
"分享"
@
click=
"handleSetOpenState"
/>
<template
#panel
>
<div
class=
"flex flex-col p-3 gap-2 min-w-72"
>
<div>
访问权限
</div>
...
...
@@ -32,7 +38,7 @@
>
<div
class=
"flex-grow flex flex-col gap-1 text-sm"
>
<div
class=
"flex items-center gap-1"
:class=
"
{ 'text-primary-500': !isOpen }">
<UIcon
name=
"i-heroicons-lock-closed-
20
-solid"
/>
<UIcon
name=
"i-heroicons-lock-closed-
16
-solid"
/>
<span>
私密
</span>
</div>
<div
class=
"text-xs text-gray-500"
>
只有作者可以查看
</div>
...
...
@@ -76,7 +82,7 @@ const toast = useToast()
const
route
=
useRoute
()
const
{
$isSignIn
}
=
storeToRefs
(
useUserStore
())
const
{
$selectCollectionId
}
=
storeToRefs
(
useLibraryStore
())
const
{
$openLibrary
Create
,
$openLibrary
Select
,
$setSelectCollectionId
}
=
useLibraryStore
()
const
{
$openLibrarySelect
,
$setSelectCollectionId
}
=
useLibraryStore
()
const
{
findRecordCollection
}
=
useCollectionRequest
()
const
props
=
defineProps
({
query
:
String
,
...
...
composables/useCollectionRequest.js
浏览文件 @
409a709a
...
...
@@ -14,7 +14,7 @@ export default () => {
})
return
{
data
,
error
}
}
//
集合
列表
//
合集
列表
const
getCollection
=
async
()
=>
{
const
{
data
,
error
}
=
await
useRequest
(
'
/v1/collection/list
'
,
{
method
:
'
get
'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录