
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?
Câu trả lời
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?
Câu trả lời
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?
Câu trả lời
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 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Vue.js / Nuxt.js khác
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
Nắm vững Vue.js / Nuxt.js cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí