refactor: drop controlled popper

This commit is contained in:
三咲智子 2022-11-28 15:32:04 +08:00
parent ccc9834360
commit fe875dc50f
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E

View file

@ -1,24 +1,5 @@
<script setup lang="ts">
import type { ComponentPublicInstance } from 'vue'
const avatar = ref<ComponentPublicInstance>()
const switcher = ref()
let showSwitcher = $ref(false)
onClickOutside(avatar, () => {
showSwitcher = false
}, { ignore: [switcher] })
</script>
<template> <template>
<VDropdown <VDropdown v-if="currentUser">
v-if="currentUser"
v-model:shown="showSwitcher"
:triggers="[]"
:auto-hide="false"
@click="showSwitcher = true"
>
<div style="-webkit-touch-callout: none;"> <div style="-webkit-touch-callout: none;">
<AccountAvatar <AccountAvatar
ref="avatar" ref="avatar"