
Vue Forms & Validation
v-model, form handling, input types, form validation, VeeValidate, Zod, Yup, custom validators
1What is v-model in Vue?
What is v-model in Vue?
คำตอบ
v-model creates a two-way binding between a form element and reactive data. It automatically synchronizes the input value with the associated variable, eliminating the need to manually write value binding and event listeners. This directive is the standard way to handle forms in Vue.
2What is the equivalent of v-model using v-bind and an event listener?
What is the equivalent of v-model using v-bind and an event listener?
คำตอบ
v-model is syntactic sugar for the combination of v-bind:value (or :value) which binds the value and @input which listens for changes. This combination helps understand how v-model works internally and is useful when finer control over updates is needed.
3Which v-model modifier should be used to synchronize the value only after the user leaves the field?
Which v-model modifier should be used to synchronize the value only after the user leaves the field?
คำตอบ
The .lazy modifier changes v-model behavior to listen to the change event instead of input. Synchronization happens on blur rather than on every keystroke. This is useful to reduce frequent updates and improve performance on fields with expensive validation.
Which v-model modifier automatically converts the input to a number?
How does v-model work with a single checkbox?
+17 คำถามสัมภาษณ์
หัวข้อสัมภาษณ์ Vue.js / Nuxt.js อื่นๆ
JavaScript Fundamentals
Modern JavaScript (ES6+)
Vue Basics
Vue Components
Vue Router
Pinia State Management
Vuex (Legacy)
Composition API
Vue Reactivity
Nuxt Fundamentals
Nuxt Data Fetching
Nuxt SSR & SSG
Nuxt Server Routes
Nuxt Modules
Vue Composables
Nuxt State Management
Vue Testing
Nuxt Deployment & CI/CD
Vue Performance
Vue Advanced Patterns
TypeScript with Vue
Nuxt Authentication
SEO with Nuxt
Nuxt Internationalization
Vue Architecture
Nuxt Security
Vue Ecosystem
Migration Vue 2→3 & Nuxt 2→3
เชี่ยวชาญ Vue.js / Nuxt.js สำหรับการสัมภาษณ์ครั้งถัดไป
เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์
เริ่มใช้ฟรี