1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-11-24 23:26:35 +09:00

chore: use defaultStore instead

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-03-25 12:20:49 +09:00
parent 2bce064ada
commit b56d173f8a
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99

View File

@ -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'));