summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkModal.vue
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 18:46:03 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-19 18:46:03 +0900
commit7b323031b774745ee2146c89ead2a9ebe628d613 (patch)
tree69c6bc1f101826b13fb18df8aebc0fd9fc5c6377 /packages/frontend/src/components/MkModal.vue
parentrefactor(frontend): router refactoring (diff)
downloadsharkey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.gz
sharkey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.bz2
sharkey-7b323031b774745ee2146c89ead2a9ebe628d613.zip
refactor(frontend): use useTemplateRef for DOM referencing
Diffstat (limited to 'packages/frontend/src/components/MkModal.vue')
-rw-r--r--packages/frontend/src/components/MkModal.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue
index 8b3086d55e..b5c93df4ed 100644
--- a/packages/frontend/src/components/MkModal.vue
+++ b/packages/frontend/src/components/MkModal.vue
@@ -42,7 +42,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
-import { nextTick, normalizeClass, onMounted, onUnmounted, provide, watch, ref, shallowRef, computed } from 'vue';
+import { nextTick, normalizeClass, onMounted, onUnmounted, provide, watch, ref, useTemplateRef, computed } from 'vue';
import type { Keymap } from '@/utility/hotkey.js';
import * as os from '@/os.js';
import { isTouchUsing } from '@/utility/touch.js';
@@ -100,8 +100,8 @@ const maxHeight = ref<number>();
const fixed = ref(false);
const transformOrigin = ref('center');
const showing = ref(true);
-const modalRootEl = shallowRef<HTMLElement>();
-const content = shallowRef<HTMLElement>();
+const modalRootEl = useTemplateRef('modalRootEl');
+const content = useTemplateRef('content');
const zIndex = os.claimZIndex(props.zPriority);
const useSendAnime = ref(false);
const type = computed<ModalTypes>(() => {