Created
August 30, 2024 14:56
-
-
Save Giovasdf/bdcdccc8c44c39f90c1847f2c143e5f1 to your computer and use it in GitHub Desktop.
Componentes Dinamicos
This file contains hidden or 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
| <script> | |
| import LetrasView from './components/LetrasView.vue'; | |
| import NumerosView from './components/NumerosView.vue'; | |
| export default { | |
| data() { | |
| return { | |
| componenteARenderizar: 'LetrasView' | |
| } | |
| }, | |
| components: { | |
| LetrasView, | |
| NumerosView | |
| } | |
| } | |
| </script> | |
| <template> | |
| <div> | |
| <button @click="componenteARenderizar = 'LetrasView'">Letras</button> | |
| <button @click="componenteARenderizar = 'NumerosView'">Numeros</button> | |
| <div> | |
| <component :is="componenteARenderizar" /> | |
| </div> | |
| </div> | |
| </template> | |
| <style scoped> | |
| </style> |
This file contains hidden or 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
| <template> | |
| <div> | |
| Este es el componente de Letras | |
| </div> | |
| </template> |
This file contains hidden or 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
| <template> | |
| <div> | |
| 1234567890 | |
| </div> | |
| </template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment