[new feature] Image: add loading slot

This commit is contained in:
陈嘉涵
2019-05-17 14:51:06 +08:00
parent 1321ba6902
commit d7b69d2fe4
8 changed files with 185 additions and 34 deletions
+16 -1
View File
@@ -1,11 +1,26 @@
@import '../style/var';
.van-image {
position: relative;
display: inline-block;
&__img {
&__img,
&__error,
&__loading {
display: block;
width: 100%;
height: 100%;
}
&__error,
&__loading {
position: absolute;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
color: @gray-dark;
background-color: @background-color;
}
}