add a component
This commit is contained in:
parent
ebcf9ccbef
commit
6d281326bc
|
@ -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");
|
||||
|
|
Reference in New Issue