add a component

This commit is contained in:
Andreas Zweili 2021-01-25 12:26:42 +01:00
parent ebcf9ccbef
commit 6d281326bc
1 changed files with 14 additions and 1 deletions

View File

@ -19,7 +19,20 @@ const app = Vue.createApp({
],
};
},
methods: {},
});
// use multiword component names
app.component("user-contact", {
data() {
return {
detailsAreVisible: false,
};
},
methods: {
toggleDetails() {
this.detailsAreVisible = !this.detailsAreVisible;
},
},
});
app.mount("#app");