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

搜索记录超出滚动

上级 8d885b7c
<template> <template>
<div class="flex-grow bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800"> <div class="flex-grow overflow-hidden bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800">
<div class="p-4 flex flex-col"> <div class="p-4 h-full flex flex-col">
<ILogo class="mt-2" /> <ILogo class="mt-2" />
<UButton <UButton
class="flex w-full mt-6" class="flex w-full mt-6"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
</div> </div>
</UButton> </UButton>
<div class="mt-4"> <div class="flex flex-grow overflow-hidden mt-4">
<INav /> <INav />
</div> </div>
</div> </div>
......
<template> <template>
<div class="flex flex-col gap-2"> <div class="flex flex-col w-full gap-2">
<UButton <UButton
leading-icon="i-heroicons-home" leading-icon="i-heroicons-home"
color="gray" color="gray"
......
<template> <template>
<div class="flex justify-between"> <div class="flex flex-col overflow-hidden">
<UButton <div class="flex justify-between">
class="flex-grow"
leading-icon="i-heroicons-magnifying-glass"
color="gray"
variant="ghost"
size="md"
label="搜索记录"
@click="handleOpen"
/>
<UButton
v-if="$isSignIn"
label="清空"
size="md"
variant="link"
@click="handleClear"
/>
</div>
<div v-if="$isSignIn" class="flex flex-col gap-2 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5">
<template v-for="(item, index) in $searchHistory" :key="index">
<UButton <UButton
class="flex group" class="flex-grow"
leading-icon="i-heroicons-magnifying-glass"
color="gray" color="gray"
variant="ghost" variant="ghost"
size="xs" size="md"
long label="搜索记录"
:to="`/search/${item.c_id}`" @click="handleOpen"
@click="handleClickItem" />
> <UButton
<div class="flex-grow truncate">{{ item.title }}</div> v-if="$isSignIn"
label="清空"
size="md"
variant="link"
@click="handleClear"
/>
</div>
<div v-if="$isSignIn" class="flex overflow-y-auto flex-col gap-2 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5">
<template v-for="(item, index) in $searchHistory" :key="index">
<UButton <UButton
class="hidden group-hover:flex" class="flex group"
color="red" color="gray"
variant="ghost" variant="ghost"
size="xs" size="xs"
:padded="false" long
leading-icon="i-heroicons-x-mark-20-solid" :to="`/search/${item.c_id}`"
@click.stop.prevent="handleRemoveRecordItem(item.c_id)" @click="handleClickItem"
/> >
</UButton> <div class="flex-grow truncate">{{ item.title }}</div>
</template> <UButton
class="hidden group-hover:flex"
color="red"
variant="ghost"
size="xs"
:padded="false"
leading-icon="i-heroicons-x-mark-20-solid"
@click.stop.prevent="handleRemoveRecordItem(item.c_id)"
/>
</UButton>
</template>
</div>
</div> </div>
<UModal v-model="isOpenHistory" :ui="{ width: 'w-full sm:max-w-screen-md' }"> <UModal v-model="isOpenHistory" :ui="{ width: 'w-full sm:max-w-screen-md' }">
<div class="flex items-center p-2"> <div class="flex items-center p-2">
......
<template> <template>
<div class="flex min-h-screen"> <div class="flex min-h-screen">
<div class="fixed top-0 w-64 hidden md:flex flex-col min-h-screen"> <div class="fixed top-0 w-64 hidden md:flex flex-col h-screen">
<IAside /> <IAside />
</div> </div>
<div class="w-full ml-0 md:ml-64 bg-white dark:bg-black flex flex-grow"> <div class="w-full ml-0 md:ml-64 bg-white dark:bg-black flex flex-grow">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册