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刪除。