mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-10 23:09:45 +08:00
[improvement] Card: add thumb-mode prop (#733)
This commit is contained in:
parent
a93c4f7d4f
commit
4cbefd361a
@ -47,6 +47,7 @@
|
|||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
| thumb | 左侧图片 | `String` | - |
|
| thumb | 左侧图片 | `String` | - |
|
||||||
|
| thumb-mode | 左侧图片裁剪、缩放的模式,可选值参考小程序 image 组件 mode 属性值 | `String` | `scaleToFill` |
|
||||||
| title | 标题 | `String` | - |
|
| title | 标题 | `String` | - |
|
||||||
| desc | 描述 | `String` | - |
|
| desc | 描述 | `String` | - |
|
||||||
| tag | 标签 | `String` | - |
|
| tag | 标签 | `String` | - |
|
||||||
|
@ -15,6 +15,10 @@ VantComponent({
|
|||||||
num: String,
|
num: String,
|
||||||
desc: String,
|
desc: String,
|
||||||
thumb: String,
|
thumb: String,
|
||||||
|
thumbMode: {
|
||||||
|
type: String,
|
||||||
|
value: 'scaleToFill'
|
||||||
|
},
|
||||||
title: String,
|
title: String,
|
||||||
price: String,
|
price: String,
|
||||||
originPrice: String,
|
originPrice: String,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<image
|
<image
|
||||||
wx:if="{{ thumb }}"
|
wx:if="{{ thumb }}"
|
||||||
src="{{ thumb }}"
|
src="{{ thumb }}"
|
||||||
|
mode="{{ thumbMode }}"
|
||||||
lazy-load="{{ lazyLoad }}"
|
lazy-load="{{ lazyLoad }}"
|
||||||
class="van-card__img thumb-class"
|
class="van-card__img thumb-class"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user