summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkInput.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/MkInput.vue
parentrefactor(frontend): router refactoring (diff)
downloadmisskey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.gz
misskey-7b323031b774745ee2146c89ead2a9ebe628d613.tar.bz2
misskey-7b323031b774745ee2146c89ead2a9ebe628d613.zip
refactor(frontend): use useTemplateRef for DOM referencing
Diffstat (limited to 'packages/frontend/src/components/MkInput.vue')
-rw-r--r--packages/frontend/src/components/MkInput.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkInput.vue b/packages/frontend/src/components/MkInput.vue
index a66e64311a..49cb5cb544 100644
--- a/packages/frontend/src/components/MkInput.vue
+++ b/packages/frontend/src/components/MkInput.vue
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
-import { onMounted, onUnmounted, nextTick, ref, shallowRef, watch, computed, toRefs } from 'vue';
+import { onMounted, onUnmounted, nextTick, ref, useTemplateRef, watch, computed, toRefs } from 'vue';
import { debounce } from 'throttle-debounce';
import { useInterval } from '@@/js/use-interval.js';
import type { InputHTMLAttributes } from 'vue';
@@ -92,9 +92,9 @@ const focused = ref(false);
const changed = ref(false);
const invalid = ref(false);
const filled = computed(() => v.value !== '' && v.value != null);
-const inputEl = shallowRef<HTMLInputElement>();
-const prefixEl = shallowRef<HTMLElement>();
-const suffixEl = shallowRef<HTMLElement>();
+const inputEl = useTemplateRef('inputEl');
+const prefixEl = useTemplateRef('prefixEl');
+const suffixEl = useTemplateRef('suffixEl');
const height =
props.small ? 33 :
props.large ? 39 :