When v-for is used in vue, the data in vuex is used, which causes the image src to fail to render.

directly above:

vuex:

clipboard.png

html:

clipboard.png

clipboard.png

ask for advice on how to solve this

Mar.16,2021

you have saved


require
which is not recognized by the img tag.


Why don't your icon field be written as require ('.. / assets/.png') , and don't put a double quotation mark on it


Don't require try it


The data in

require cannot be run-time variables, it can only be static strings. You can put your picture in the static directory without webpack processing, and then write

in the code.
<img src='/static/....'/>
Menu