shayloyuki

科技是第一生产力

 

el-image 插槽样式补全

问题

el-image 有两个 插槽:placeholder 和 error

依照 demo 使用时,样式会发生偏差:

demo:
image

使用:
image

解决办法

F12 打开 demo 元素页,发现有如下样式:

image

因此,把类名粘贴到全局样式中即可:

// el-image 插槽样式
.image-slot {
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #f5f7fa;
  color: #909399;
}

posted on 2023-07-11 09:13  shayloyuki  阅读(412)  评论(0编辑  收藏  举报

导航