Difference between V-if and V-show

V-if is true conditional rendering v-show is controlled by manipulating CSS

v-if

V-if changes trigger the creation and destruction of child components

And v-if is lazy; if the start is false, it will not render until the first time it is true

v-show

V-show is implemented by manipulating CSS, initially rendering.

The difference between watch and computed

watch

1. Do not support cache. 2

computed

1, support cache, only the dependent elements change, will be recalculated. 2, do not support asynchronous 3, many-to-one relationship