kopia lustrzana https://github.com/elk-zone/elk
refactor: drop controlled popper
rodzic
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>
|
||||
<VDropdown
|
||||
v-if="currentUser"
|
||||
v-model:shown="showSwitcher"
|
||||
:triggers="[]"
|
||||
:auto-hide="false"
|
||||
@click="showSwitcher = true"
|
||||
>
|
||||
<VDropdown v-if="currentUser">
|
||||
<div style="-webkit-touch-callout: none;">
|
||||
<AccountAvatar
|
||||
ref="avatar"
|
||||
|
|
Ładowanie…
Reference in New Issue