How to bind some pictures by default in the component for uploading elementUI upload images

is using elementUI as the background. Use the component for uploading pictures. Click the plus sign to add the picture normally. But when the form needs to be re-edited, you need to show these pictures first, and the question is how to do it.

clipboard.png


official website example
set the custom property provided by the component itself in the el-upload component: file-list=" listArr "

this listArr is an array object

listArr = [
{
name: 'aaa.jpeg',
url: 'xxxxxxxxxxxxxxxxxx'
},
{
name: 'bbbbb.jpeg',
url: 'xxxxxxxxxxxxxxx'
},
]

there is a demo on the official website. Go and see it for yourself, relying on file-list

.
Menu