feat: add nav more menu on mobile (#322)

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
Ayaka Rizumu 2022-12-04 22:17:02 +08:00 committed by GitHub
parent 8f32b1ce22
commit cbd5867275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 237 additions and 54 deletions

View file

@ -1,5 +1,8 @@
<script setup lang="ts">
import { dropdownContextKey } from './ctx'
defineProps<{
placement?: string
}>()
const dropdown = $ref<any>()
@ -9,7 +12,7 @@ provide(dropdownContextKey, {
</script>
<template>
<VDropdown v-bind="$attrs" ref="dropdown" :class="{ dark: isDark }">
<VDropdown v-bind="$attrs" ref="dropdown" :class="{ dark: isDark }" :placement="placement || 'auto'">
<slot />
<template #popper="scope">
<slot name="popper" v-bind="scope" />