Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Last active October 3, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/1bd6070fdfcbfd0021c127071ca284f9 to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/1bd6070fdfcbfd0021c127071ca284f9 to your computer and use it in GitHub Desktop.
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