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

posted @ 2023-12-01 16:53  zhaogaojian  阅读(103)  评论(0编辑  收藏  举报