提交 3a7a3300 编写于 作者: View Design's avatar View Design

Update Thread.vue

上级 a6bd6dd1
......@@ -76,9 +76,12 @@ function handleOpenSelect () {
}
function handleUpdateCollect (data) {
const { c_id } = data.value
if (c_id === thread.value.c_id) thread.value.collections = [data.value]
if (c_id === thread.value.c_id) {
thread.value.collections = [data.value]
Layout.clearCollectData()
}
}
watch(()=> Layout.selectCollectData, (data) => {
handleUpdateCollect(data)
if (data.value !== null) handleUpdateCollect(data)
}, { deep: true })
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册