2、el-image設置error圖像

注意和2.0不同

 <el-table-column label="人臉圖像" align="center" prop="imageUrl" width="200px">
        <template #default="scope">
          <el-image :src=getImgUrl(scope.row.imageUrl) preview-teleported="true"  fit="cover"
            :preview-src-list=[getImgUrl(scope.row.imageUrl)] alt="Description" style="width: 100px; height: 100px;">
              <template #error>
                <div class="image-slot" >
                  <el-icon style="width: 100px; height: 100px;font-size: 100px;color:lightgray"><picture-filled /></el-icon>
                </div>
              </template>
            </el-image>
        </template>

image

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章