Snippets about vue
3 snippets
-
SNP079
v-model on your own component with defineModel
Vue 3.4 made two-way binding on custom components a one-liner.
8 lines of vue in 2 blocks, 5 lines of explanation.
#B41 -
SNP034
Watch a nested property in Vue
Your watcher doesn't fire when something deep inside an object changes. Here is why and what to do.
2 lines of js in 2 blocks, 6 lines of explanation.
#6B1 -
SNP003
Select all text in input field on click the Vue JS way
Comparing the traditional javascript way with the Vue event you can use.
2 lines of html in 2 blocks, 3 lines of explanation.
#24B