When you finish editing in your project, you encounter the problem that the editing feature uses a subassembly as a pop-up box, as shown in
This involves the problem of passing data from a parent component to a subassembly. This project uses v1.0, the problem is that when you click on the edit, the pop-up subassembly did not get the data from the parent component, the inspection did not find the code error, the final solution is in the parent component, the passed data in the initialization of each item is good
Creatissue (type,list,id) {
this.modelissue=true;
This.modeltype=type;
if (type== ' creat ') {
this.listdb.executorname= ';
This.listdb.executorid= ';
This.listdb.state= ';
This.listdb.projverid= ';
This.listdb.content= ';
This.issuetitle= "Create problem to";
} else if (type== ' edit ') {
this.listdb={...list}; Deconstruction of data, using only the value of the list, not the address of the list
this.editid=id;
this.issuetitle= "edit problem";
}
,
This is the method that is executed when you click Edit, and the following is the data passed to the subassembly
listdb:{executorname: ', Executorid: ', State: ',
projverid: ',
content: '
},
At the beginning, it just defines an empty data like this:
listdb:{},
In this case, the data will not be passed to the subassembly, and it would be better to define each item to be passed, like the one above.
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.