mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-04 06:06:16 +02:00
refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -36,7 +36,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, onUnmounted, nextTick, ref, watch, computed, toRefs, shallowRef } from 'vue';
|
||||
import { onMounted, onUnmounted, nextTick, ref, watch, computed, toRefs, useTemplateRef } from 'vue';
|
||||
import { debounce } from 'throttle-debounce';
|
||||
import type { SuggestionType } from '@/utility/autocomplete.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
@@ -75,7 +75,7 @@ const focused = ref(false);
|
||||
const changed = ref(false);
|
||||
const invalid = ref(false);
|
||||
const filled = computed(() => v.value !== '' && v.value != null);
|
||||
const inputEl = shallowRef<HTMLTextAreaElement>();
|
||||
const inputEl = useTemplateRef('inputEl');
|
||||
const preview = ref(false);
|
||||
let autocompleteWorker: Autocomplete | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user