Vue.js: src is a http resource that is forwarded to localhost

template Code

  <div class="img-container">
    <img :src="item[index]" v-for="(item,index) in dataList.imgList" />
  </div>

script Code

  data(){
  return{
    dataList:{
      imgList:[
        "http://img.zcool.cn/community/013a4456f2626f32f875a944208731.jpg",
        "http://img.zcool.cn/community/038025357ebd1e5a84a0d304f6b9c4a.jpg"
              ]
            }
          }
        }

the result becomes

in the browser.

clipboard.png

has url-loader

Mar.24,2021

' http://img.zcool.cn/community.'[0] is h, and it should be < div class=" img-container ">

.
<img :src="item" v-for="(item,index) in dataList.imgList" />

< / div >


you can see for yourself what your item is and you will know how to write it

.
<div class="img-container">
    <img :src="item" v-for="(item,index) in dataList.imgList" />
  </div>
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-1b3c738-2c309.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-1b3c738-2c309.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?