vue中v-show与v-if的区别

243 阅读1分钟

v-show 是控制css属性display:none

v-if

是对组件的销毁与重建好比(document.createElement,document.body.removeChild(ele))