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/....'/>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c2b9-2c2e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c2b9-2c2e6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?