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>
阅读 1.8k
1 个回答

先显示默认图,然后把默认图的 src 在 vue 的 mounted 钩子里通过 js 替换成实际要显示的图片

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题