vue subassemblies parent component attribute value to write

Call the parent component sub-component code ( keyword Sync ):

<importModel :visible.sync="dialogModelVisible"></importModel>

Subassembly to modify the parent component codes visible property is false:

_this.$emit("update:visible", false);

 

Guess you like

Origin www.cnblogs.com/xiaojitui/p/11913766.html