需求描述:点击编辑按钮,跳出编辑弹窗,回显图片组件里面的图片 问题:element el-dialog里再调用组件,打开该弹窗的瞬间找不到弹窗里调用子组件的方法 原因:弹窗显示时,调用的子组件还没渲染出来所以查找不到该组件的方法,感觉是父子组件渲染先后的问题 解决:我选择的方法是写推迟调用方法定时器setTimeout 代码 
< ! --  新增/ 修改 -- > < el- dialog: title= "title" : visible. sync= "addlDialogVisible" width= "50%" : before- close= "onCloseAdd" : destroy- on- close= "true" > < UploadImage ref= "componentImag"  / > < span slot= "footer"  class = "dialog-footer" > < el- button @click= "onCloseAdd" > 取 消< / el- button> < el- button type= "primary"  @click= "onConfirmAddDialog" > 确 定< / el- button> < / span> < / el- dialog> onEditAction ( ) { if ( this . multipleSelection[ 0 ] . ImageUrl!== '' &&  this . multipleSelection[ 0 ] . ImageUrl!== null ) { let  pamImage =  { fileName : '' , url : this . multipleSelection[ 0 ] . ImageUrl, } setTimeout ( ( )  =>  { this . $refs. componentImag. editShowStyle ( pamImage)  } ,  0 ) } } ,