alternativa ai components globals
li importo dove li uso, mantengo globali solo quelli uscati in piĆ¹ occorrenze diverse
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import TheHeader from './components/TheHeader.vue'; |
| | | import BadgeList from './components/BadgeList.vue'; |
| | | import UserInfo from './components/UserInfo.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | // 'the-header': TheHeader, |
| | | // TheHeader: TheHeader, |
| | | TheHeader, |
| | | BadgeList, |
| | | UserInfo |
| | | }, |
| | | data() { |
| | | return { |
| | | activeUser: { |
| | |
| | | import { createApp } from 'vue'; |
| | | |
| | | import App from './App.vue'; |
| | | import TheHeader from './components/TheHeader.vue'; |
| | | import BaseBadge from './components/BaseBadge.vue'; |
| | | import BadgeList from './components/BadgeList.vue'; |
| | | import UserInfo from './components/UserInfo.vue'; |
| | | |
| | | |
| | | const app = createApp(App); |
| | | |
| | | app.component('the-header', TheHeader); |
| | | app.component('base-badge', BaseBadge); |
| | | app.component('badge-list', BadgeList); |
| | | app.component('user-info', UserInfo); |
| | | |
| | | app.mount('#app'); |