fix: preferences-button click to show setting drawer (#7938)
parent
126b33687a
commit
6b81d1b0d5
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { Settings } from '@vben/icons';
|
import { Settings } from '@vben/icons';
|
||||||
|
|
||||||
import { VbenIconButton } from '@vben-core/shadcn-ui';
|
import { VbenIconButton } from '@vben-core/shadcn-ui';
|
||||||
|
|
@ -10,10 +12,13 @@ const emit = defineEmits<{ clearPreferencesAndLogout: [] }>();
|
||||||
function clearPreferencesAndLogout() {
|
function clearPreferencesAndLogout() {
|
||||||
emit('clearPreferencesAndLogout');
|
emit('clearPreferencesAndLogout');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const preferencesRef = ref<InstanceType<typeof Preferences> | null>(null);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Preferences @clear-preferences-and-logout="clearPreferencesAndLogout">
|
<Preferences ref="preferencesRef" @clear-preferences-and-logout="clearPreferencesAndLogout">
|
||||||
<VbenIconButton class="hover:animate-[shrink_0.3s_ease-in-out]">
|
<VbenIconButton class="hover:animate-[shrink_0.3s_ease-in-out]" @click="preferencesRef?.open();">
|
||||||
<Settings class="size-4 text-foreground" />
|
<Settings class="size-4 text-foreground" />
|
||||||
</VbenIconButton>
|
</VbenIconButton>
|
||||||
</Preferences>
|
</Preferences>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue