Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Vue.component('vmodel', {
data () {
return {
framework: 'Vue 2'
}
},
template: `
<div>
<h2>Trabajando con v-model en Vue 2</h2>
<input v-model="framework" />
<p>El framework escogido es: {{ framework }}</p>
</div>
`
})
app.component('vmodel', {
setup() {
const framework = ref("Vue 3");
return { framework };
},
template: `
<h2>Trabajando con v-model en Vue 3</h2>
<input v-model="framework" />
<p>El framework escogido es: {{ framework }}</p>
`
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment