1.使用v-if
在组件上定义v-if一个布尔变量
1.变量改为false
2.变量改为true
2.
import dialog from '@compintent/dialog' components: {dialog} this.$destroy('dialog');
3.
// get~ 销毁组件 destroyElement() { this.$destroy(true); this.$el.parentNode.removeChild(this.$el); },
1.使用v-if
在组件上定义v-if一个布尔变量
1.变量改为false
2.变量改为true
2.
import dialog from '@compintent/dialog' components: {dialog} this.$destroy('dialog');
3.
// get~ 销毁组件 destroyElement() { this.$destroy(true); this.$el.parentNode.removeChild(this.$el); },
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。