Article From:https://segmentfault.com/q/1010000011053027
Question:

I assign values to an operation (click Edit to produce a pop-up and display the picture).
this.defaultList = [
{

  name:'a42bdcc1178e62b46',
  url:`${baseUrl}${params.row.v_icon}`,

}
]
The interface does not display pictures
But I print this.$refs.upload at the console

It can be seen that its fileList is valued.

But I print console.log (this.$refs.upload.fileList) alone, which is empty.

Answer 0:

You’ve just run into the same problem and found a solution that passes values from the parent component to the props of the child component, and then you can display them.

Answer 1:

Some people say that you can operate uploadList directly, and default can’t get it, for example.

this.uploadList.push({
  name: ...,
  url: ...,
  showProgress: false,
  status: "finished"
});

Leave a Reply

Your email address will not be published. Required fields are marked *