如下代碼,加了幾次默認(rèn)圖沒加上,請問怎么加默認(rèn)圖?然后當(dāng)圖片加載出來之后就替換默認(rèn)圖 <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" > //請忽略這個(gè)圖 <img slot="reference" :src="scope.row.cover" style="height: 80%"> //真正顯示的圖片 </el-popover>
</template>
</el-table-column>
1 回答

SMILET
TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊
先顯示默認(rèn)圖,然后把默認(rèn)圖的 src 在 vue 的 mounted 鉤子里通過 js 替換成實(shí)際要顯示的圖片
添加回答
舉報(bào)
0/150
提交
取消