mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-03 23:06:20 +02:00
refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -23,9 +23,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, ref, shallowRef } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { onMounted, onUnmounted, ref, useTemplateRef } from 'vue';
|
||||
import { getScrollContainer } from '@@/js/scroll.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { isHorizontalSwipeSwiping } from '@/utility/touch.js';
|
||||
|
||||
const SCROLL_STOP = 10;
|
||||
@@ -43,7 +43,7 @@ const pullDistance = ref(0);
|
||||
let supportPointerDesktop = false;
|
||||
let startScreenY: number | null = null;
|
||||
|
||||
const rootEl = shallowRef<HTMLDivElement>();
|
||||
const rootEl = useTemplateRef('rootEl');
|
||||
let scrollEl: HTMLElement | null = null;
|
||||
|
||||
let disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user