-
Create a
UserItem.vue
component which represents a user item list element. It will take some props (id
,firstName
,lastName
,age
). It will output auser-delete
event with user id. Add adelete
button which will trigger the delete event. -
Create a
UserList.vue
component which will display a user list. Define a data object{users: []}
, with a hard-coded value list. Listen theuser-delete
event and updateusers
array. -
Use
UserList.vue
inApp.vue
.
npm install
npm run serve
npm run build
npm run lint