mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(GridItem): add icon-prefix prop (#4276)
* Update index.ts * Update index.wxml * Update index.ts * docs(GridItem): add icon-prefix * Update README.md
This commit is contained in:
parent
ac50898519
commit
b2a5afce65
@ -12,6 +12,7 @@ VantComponent({
|
|||||||
props: {
|
props: {
|
||||||
icon: String,
|
icon: String,
|
||||||
iconColor: String,
|
iconColor: String,
|
||||||
|
iconPrefix: String,
|
||||||
dot: Boolean,
|
dot: Boolean,
|
||||||
info: null,
|
info: null,
|
||||||
badge: null,
|
badge: null,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</block>
|
</block>
|
||||||
<block wx:else>
|
<block wx:else>
|
||||||
<view class="van-grid-item__icon icon-class">
|
<view class="van-grid-item__icon icon-class">
|
||||||
<van-icon wx:if="{{ icon }}" name="{{ icon }}" color="{{ iconColor }}" dot="{{ dot }}" info="{{ badge || info }}" size="{{ iconSize }}" />
|
<van-icon wx:if="{{ icon }}" name="{{ icon }}" color="{{ iconColor }}" class-prefix="{{ iconPrefix }}" dot="{{ dot }}" info="{{ badge || info }}" size="{{ iconSize }}" />
|
||||||
<slot wx:else name="icon"></slot>
|
<slot wx:else name="icon"></slot>
|
||||||
</view>
|
</view>
|
||||||
<view class="van-grid-item__text text-class">
|
<view class="van-grid-item__text text-class">
|
||||||
|
@ -150,6 +150,7 @@
|
|||||||
| text | 文字 | _string_ | - | - |
|
| text | 文字 | _string_ | - | - |
|
||||||
| icon | 图标名称或图片链接,可选值见 [Icon 组件](#/icon) | _string_ | - | - |
|
| icon | 图标名称或图片链接,可选值见 [Icon 组件](#/icon) | _string_ | - | - |
|
||||||
| icon-color | 图标颜色 | _string_ | - | - |
|
| icon-color | 图标颜色 | _string_ | - | - |
|
||||||
|
| icon-prefix `v1.7.0` | 第三方图标前缀 | _string_ | `van-icon` | - |
|
||||||
| dot | 是否显示图标右上角小红点 | _boolean_ | `false` | - |
|
| dot | 是否显示图标右上角小红点 | _boolean_ | `false` | - |
|
||||||
| badge | 图标右上角徽标的内容 | _string \| number_ | - | - |
|
| badge | 图标右上角徽标的内容 | _string \| number_ | - | - |
|
||||||
| url | 点击后跳转的链接地址 | _string_ | - | - |
|
| url | 点击后跳转的链接地址 | _string_ | - | - |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user