-
-
Save cursosdesarrolloweb/8f54e47a99bc316456bb3327fb5c4b21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component("use-plugin", { | |
mounted() { | |
console.log(this.$profile('Israel', 39)); | |
// Mi nombre es Israel, tengo 39 años y trabajo de programador e instructor en Cursosdesarrolloweb" | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.component("use-plugin", { | |
setup() { | |
provideProfile({ | |
name: "Israel", | |
age: 39, | |
skills: { | |
programmer: "Programador PHP, JavaScript y Python", | |
instructor: "Instructor de cursos en línea de desarrollo web y móvil en Cursosdesarrolloweb" | |
} | |
}) | |
const profile = useProfile(); | |
return { profile }; | |
}, | |
template: ` | |
<h2>Crear plugins en Vue 3</h2> | |
<p> | |
Nombre: {{ profile.name }}<br /> | |
Edad: {{ profile.age }}<br /> | |
Skills: {{ profile.$skill('programmer') }} | |
</p> | |
` | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment