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

Update SearchHistory.vue

上级 c7150c80
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
label="搜索记录" label="搜索记录"
/> />
<UButton <UButton
v-if="$isSignIn"
class="hidden group-hover:flex" class="hidden group-hover:flex"
label="清空" label="清空"
size="md" size="md"
...@@ -18,7 +17,8 @@ ...@@ -18,7 +17,8 @@
@click="handleClear" @click="handleClear"
/> />
</div> </div>
<div v-if="$isSignIn" class="flex overflow-y-auto flex-col gap-1 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5"> <ClientOnly>
<div class="flex overflow-y-auto flex-col gap-1 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5">
<template v-for="(item, index) in $searchHistory" :key="index"> <template v-for="(item, index) in $searchHistory" :key="index">
<UButton <UButton
class="flex text-gray-400" class="flex text-gray-400"
...@@ -33,13 +33,13 @@ ...@@ -33,13 +33,13 @@
</UButton> </UButton>
</template> </template>
</div> </div>
</ClientOnly>
</div> </div>
</template> </template>
<script setup> <script setup>
const emits = defineEmits(['sign', 'clear']) const emits = defineEmits(['sign', 'clear'])
const Layout = inject('Layout') const Layout = inject('Layout')
const modal = useModal() const modal = useModal()
const { $isSignIn } = storeToRefs(useUserStore())
const { $searchHistory } = storeToRefs(useSearchStore()) const { $searchHistory } = storeToRefs(useSearchStore())
const { $clearSearchHistory } = useSearchStore() const { $clearSearchHistory } = useSearchStore()
const query = ref('') const query = ref('')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册