element的 table列表 怎么加默认图?

如下代码,加了几次默认图没加上,请问怎么加默认图?然后当图片加载出来之后就替换默认图

   <el-table-column label="封面" width="100%" >
          <template slot-scope="scope">
            <el-popover
              placement="right"
              title=""
              trigger="hover">
              <img :src="scope.row.cover" width="180px" height="250px" > //请忽略这个图              <img  slot="reference" :src="scope.row.cover" style="height: 80%"> //真正显示的图片            </el-popover>
          </template>
        </el-table-column>


qq_花开花谢_0
浏览 1365回答 1
1回答

SMILET

先显示默认图,然后把默认图的 src 在 vue 的 mounted 钩子里通过 js 替换成实际要显示的图片
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js