Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
2e7fd435
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看板
提交
2e7fd435
编写于
5月 31, 2024
作者:
View Design
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
132
上级
087bcd32
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
4 deletion
+33
-4
components/i/action/Thread.vue
components/i/action/Thread.vue
+10
-1
components/i/library/Thread.vue
components/i/library/Thread.vue
+11
-1
layouts/default.vue
layouts/default.vue
+12
-2
未找到文件。
components/i/action/Thread.vue
浏览文件 @
2e7fd435
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
const
{
$openLibrarySelect
}
=
useLibraryStore
()
const
{
$openLibrarySelect
}
=
useLibraryStore
()
const
{
deleteCollectionRecord
}
=
useCollectionRequest
()
const
Layout
=
inject
(
'
Layout
'
)
const
props
=
defineProps
({
const
props
=
defineProps
({
collection_id
:
{
collection_id
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
...
@@ -33,7 +35,14 @@ const actionItems = computed(() => {
...
@@ -33,7 +35,14 @@ const actionItems = computed(() => {
},
},
{
{
label
:
'
从收藏中移除
'
,
label
:
'
从收藏中移除
'
,
icon
:
'
i-heroicons-x-mark
'
icon
:
'
i-heroicons-x-mark
'
,
click
:
async
()
=>
{
await
deleteCollectionRecord
(
props
.
collection_id
,
props
.
c_id
)
Layout
.
handleRemoveCollectData
({
collection_id
:
props
.
collection_id
,
c_id
:
props
.
c_id
})
}
}
}
]
]
}
else
{
}
else
{
...
...
components/i/library/Thread.vue
浏览文件 @
2e7fd435
...
@@ -81,10 +81,20 @@ function handleUpdateCollect (data) {
...
@@ -81,10 +81,20 @@ function handleUpdateCollect (data) {
const
{
c_id
}
=
data
.
value
const
{
c_id
}
=
data
.
value
if
(
c_id
===
thread
.
value
.
c_id
)
{
if
(
c_id
===
thread
.
value
.
c_id
)
{
thread
.
value
.
collections
=
[
data
.
value
]
thread
.
value
.
collections
=
[
data
.
value
]
Layout
.
clearCollectData
()
Layout
.
handleClearCollectData
()
}
}
function
handleRemoveCollect
(
data
)
{
const
{
c_id
}
=
data
.
value
if
(
c_id
===
thread
.
value
.
c_id
)
{
thread
.
value
.
collections
=
[]
Layout
.
handleClearRemoveCollectData
()
}
}
}
}
watch
(()
=>
Layout
.
selectCollectData
,
(
data
)
=>
{
watch
(()
=>
Layout
.
selectCollectData
,
(
data
)
=>
{
if
(
data
.
value
!==
null
)
handleUpdateCollect
(
data
)
if
(
data
.
value
!==
null
)
handleUpdateCollect
(
data
)
},
{
deep
:
true
})
},
{
deep
:
true
})
watch
(()
=>
Layout
.
removeCollectData
,
(
data
)
=>
{
if
(
data
.
value
!==
null
)
handleRemoveCollect
(
data
)
},
{
deep
:
true
})
</
script
>
</
script
>
\ No newline at end of file
layouts/default.vue
浏览文件 @
2e7fd435
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<
script
setup
>
<
script
setup
>
const
isOpenAside
=
ref
(
false
)
const
isOpenAside
=
ref
(
false
)
const
selectCollectData
=
ref
(
null
)
const
selectCollectData
=
ref
(
null
)
const
removeCollectData
=
ref
(
null
)
function
handleToggleAside
()
{
function
handleToggleAside
()
{
isOpenAside
.
value
=
!
isOpenAside
.
value
isOpenAside
.
value
=
!
isOpenAside
.
value
}
}
...
@@ -44,12 +45,21 @@ function handleCloseAside () {
...
@@ -44,12 +45,21 @@ function handleCloseAside () {
function
handleCollectSuccess
(
data
)
{
function
handleCollectSuccess
(
data
)
{
selectCollectData
.
value
=
data
selectCollectData
.
value
=
data
}
}
function
c
learCollectData
()
{
function
handleC
learCollectData
()
{
selectCollectData
.
value
=
null
selectCollectData
.
value
=
null
}
}
function
handleRemoveCollectData
(
data
)
{
removeCollectData
.
value
=
data
}
function
handleClearRemoveCollectData
()
{
removeCollectData
.
value
=
null
}
provide
(
'
Layout
'
,
{
provide
(
'
Layout
'
,
{
handleCloseAside
,
handleCloseAside
,
selectCollectData
,
selectCollectData
,
clearCollectData
handleClearCollectData
,
removeCollectData
,
handleRemoveCollectData
,
handleClearRemoveCollectData
})
})
</
script
>
</
script
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录