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

add

上级 4d67e4a7
......@@ -24,6 +24,7 @@
variant="ghost"
size="md"
label="搜索记录"
@click="handleOpenSearchHistory"
/>
<UButton
v-if="$isSignIn"
......@@ -59,16 +60,20 @@
const { $isSignIn } = useUserStore()
const searchHistory = ref([
{
title: 'Vue 的 v-model 怎么用'
title: 'Vue 的 v-model 怎么用',
url: 'c_20240521161631_C8miVoieSKGfgNGP?query=Vue%20的%20v-model%20怎么用&repo=keycloak'
},
{
title: '帮我写一个爬虫,爬取豆瓣热门电影top250'
title: '帮我写一个爬虫,爬取豆瓣热门电影top250',
url: 'c_20240521161649_0LbyaJFKX6fyJYyA?query=帮我写一个爬虫,爬取豆瓣热门电影top250&repo=keycloak'
},
{
title: 'grid 的 grid-template-columns 除了 minmax 和 repeat,还有哪些值'
title: 'grid 的 grid-template-columns 除了 minmax 和 repeat,还有哪些值',
url: 'c_20240521161709_LtiJL8thi5XuYLd6?query=grid%20的%20grid-template-columns%20除了%20minmax%20和%20repeat,还有哪些值&repo=keycloak'
},
{
title: 'flex 各种布局的区别'
title: 'flex 各种布局的区别',
url: 'c_20240521161933_wxgXGKYhmfJe6QE0?query=flex%20各种布局的区别&repo=keycloak'
}
])
const isOpenSign = ref(false)
......@@ -78,4 +83,10 @@ const handleOpenSign = () => {
const handleCloseSign = () => {
isOpenSign.value = false
}
const handleOpenSearchHistory = () => {
if (!$isSignIn) handleOpenSign()
else {
}
}
</script>
......@@ -7,7 +7,7 @@ export const useUserStore = defineStore('user', () => {
pro: 1
})
const $isSignIn = ref(false)
const $isSignIn = ref(true)
return { $info, $isSignIn }
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册