computed: {
comp: function () {
return () => import(`./component/item${this.formItem.item_type}.form`);
}
},
when I switch the value of this.formItem.item_type, comp is not triggered
computed: {
comp: function () {
console.log(this.formItem.item_type)
return () => import(`./component/item${this.formItem.item_type}.form`);
}
},
when I add console.log (this.formItem.item_type), it triggers normally, but comment out doesn"t trigger normally. Why?
in addition: I use watch to monitor normal
watch:{
"formItem.item_type": function (val, oldVal) {
this.comp = () => import(`./component/item${this.formItem.item_type}.form`);
}
},
supplement this.formItem objects