You can use v-if
and v-else
to display content based on assertions on your data. Similarly, v-show
can be used to render the content, but hide it with css. v-if
can also be used on an invisible wrapper <template>
element.
removeItem
is invalid - it passes the event to splice, so it always deletes first item