mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 17:15:13 +00:00
chore: use defaultStore instead
This commit is contained in:
parent
2bce064ada
commit
b56d173f8a
1 changed files with 7 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<Transition
|
||||
appear
|
||||
:enter-active-class="$store.state.animation ? $style.transition_fade_enterActive : ''"
|
||||
:leave-active-class="$store.state.animation ? $style.transition_fade_leaveActive : ''"
|
||||
:enter-from-class="$store.state.animation ? $style.transition_fade_enterFrom : ''"
|
||||
:leave-to-class="$store.state.animation ? $style.transition_fade_leaveTo : ''"
|
||||
:enter-active-class="animation ? $style.transition_fade_enterActive : ''"
|
||||
:leave-active-class="animation ? $style.transition_fade_leaveActive : ''"
|
||||
:enter-from-class="animation ? $style.transition_fade_enterFrom : ''"
|
||||
:leave-to-class="animation ? $style.transition_fade_leaveTo : ''"
|
||||
>
|
||||
<div ref="rootEl" :class="$style.root" :style="{ zIndex }" @contextmenu.prevent.stop="() => {}">
|
||||
<MkMenu :items="items" :align="'left'" @close="$emit('closed')"/>
|
||||
|
@ -17,6 +17,7 @@ import { onMounted, onBeforeUnmount } from 'vue';
|
|||
import MkMenu from './MkMenu.vue';
|
||||
import { MenuItem } from './types/menu.vue';
|
||||
import contains from '@/scripts/contains';
|
||||
import { defaultStore } from '@/store';
|
||||
import * as os from '@/os';
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -28,6 +29,8 @@ const emit = defineEmits<{
|
|||
(ev: 'closed'): void;
|
||||
}>();
|
||||
|
||||
const animation = $computed(() => defaultStore.state.animation);
|
||||
|
||||
let rootEl = $shallowRef<HTMLDivElement>();
|
||||
|
||||
let zIndex = $ref<number>(os.claimZIndex('high'));
|
||||
|
|
Loading…
Reference in a new issue