fix: FID 입력창 자동 포커스 추가 - Ctrl+V 붙여넣기 동작
This commit is contained in:
parent
b160ec3948
commit
765868079d
@ -35,6 +35,7 @@
|
||||
<div class="card">
|
||||
<div class="search-row">
|
||||
<input
|
||||
ref="fidInputRef"
|
||||
v-model="fidInput"
|
||||
type="text"
|
||||
placeholder="FID (플레이어 ID) 입력"
|
||||
@ -66,7 +67,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { ref, computed, onMounted, nextTick } from 'vue';
|
||||
import { useWosStore } from '../stores/wos.store';
|
||||
import UserCard from '../components/UserCard.vue';
|
||||
import CouponInput from '../components/CouponInput.vue';
|
||||
@ -74,6 +75,7 @@ import CouponManager from '../components/CouponManager.vue';
|
||||
|
||||
const store = useWosStore();
|
||||
const fidInput = ref('');
|
||||
const fidInputRef = ref<HTMLInputElement | null>(null);
|
||||
const userSearchQuery = ref('');
|
||||
|
||||
const filteredUsers = computed(() => {
|
||||
@ -93,6 +95,8 @@ onMounted(async () => {
|
||||
await store.searchPlayer(savedFid);
|
||||
store.loadSavedUsers();
|
||||
}
|
||||
await nextTick();
|
||||
fidInputRef.value?.focus();
|
||||
});
|
||||
|
||||
async function searchPlayer() {
|
||||
@ -101,6 +105,8 @@ async function searchPlayer() {
|
||||
localStorage.setItem('wos_fid', fid);
|
||||
await store.searchPlayer(fid);
|
||||
store.loadSavedUsers();
|
||||
await nextTick();
|
||||
fidInputRef.value?.focus();
|
||||
}
|
||||
|
||||
async function selectUser(fid: string) {
|
||||
@ -108,6 +114,8 @@ async function selectUser(fid: string) {
|
||||
localStorage.setItem('wos_fid', fid);
|
||||
await store.searchPlayer(fid);
|
||||
store.loadSavedUsers();
|
||||
await nextTick();
|
||||
fidInputRef.value?.focus();
|
||||
}
|
||||
|
||||
function onImgErr(e: Event) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user