refactor: drop controlled popper
This commit is contained in:
parent
ccc9834360
commit
fe875dc50f
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue