[new feature] Card: add lazy-load prop (#2301)

This commit is contained in:
neverland
2018-12-15 17:55:32 +08:00
committed by GitHub
parent fd88a29bfc
commit a94683a7e3
3 changed files with 9 additions and 0 deletions

View File

@@ -6,6 +6,12 @@
>
<slot name="thumb">
<img
v-if="lazyLoad"
v-lazy="thumb"
:class="b('img')"
>
<img
v-else
:src="thumb"
:class="b('img')"
>
@@ -81,6 +87,7 @@ export default create({
thumb: String,
title: String,
centered: Boolean,
lazyLoad: Boolean,
thumbLink: String,
num: [Number, String],
price: [Number, String],