feat: use explorer page as search for mobile only (#1301)
This commit is contained in:
parent
a2fb458696
commit
4b1b18768d
9 changed files with 38 additions and 41 deletions
|
@ -5,9 +5,14 @@ const index = ref(0)
|
|||
|
||||
const { t } = useI18n()
|
||||
const el = ref<HTMLElement>()
|
||||
const input = ref<HTMLInputElement>()
|
||||
const router = useRouter()
|
||||
const { focused } = useFocusWithin(el)
|
||||
|
||||
defineExpose({
|
||||
input,
|
||||
})
|
||||
|
||||
const results = computed(() => {
|
||||
if (query.value.length === 0)
|
||||
return []
|
||||
|
@ -68,6 +73,7 @@ const activate = () => {
|
|||
bg-transparent
|
||||
outline="focus:none"
|
||||
pe-4
|
||||
ml-1
|
||||
:placeholder="isHydrated ? t('nav.search') : ''"
|
||||
pb="1px"
|
||||
placeholder-text-secondary
|
||||
|
@ -77,7 +83,7 @@ const activate = () => {
|
|||
>
|
||||
</div>
|
||||
<!-- Results -->
|
||||
<div left-0 top-12 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
||||
<div left-0 top-11 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
|
||||
<div w-full bg-base border="~ base" rounded-3 max-h-100 overflow-auto py2>
|
||||
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
|
||||
{{ t('search.search_desc') }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue