mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-05 19:41:45 +08:00
feat(icon): add_icon_info_class (#5458)
This commit is contained in:
parent
22acb8ddbc
commit
3d1d27641b
@ -3,7 +3,7 @@ import { button } from '../mixins/button';
|
|||||||
import { link } from '../mixins/link';
|
import { link } from '../mixins/link';
|
||||||
|
|
||||||
VantComponent({
|
VantComponent({
|
||||||
classes: ['icon-class', 'text-class'],
|
classes: ['icon-class', 'text-class', 'info-class'],
|
||||||
|
|
||||||
mixins: [link, button],
|
mixins: [link, button],
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
class-prefix="{{ classPrefix }}"
|
class-prefix="{{ classPrefix }}"
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
custom-class="icon-class"
|
custom-class="icon-class"
|
||||||
|
info-class="info-class"
|
||||||
/>
|
/>
|
||||||
<slot wx:else name="icon" />
|
<slot wx:else name="icon" />
|
||||||
<text class="text-class">{{ text }}</text>
|
<text class="text-class">{{ text }}</text>
|
||||||
|
@ -168,6 +168,7 @@ Page({
|
|||||||
| ---------- | ---------- |
|
| ---------- | ---------- |
|
||||||
| icon-class | 图标样式类 |
|
| icon-class | 图标样式类 |
|
||||||
| text-class | 文字样式类 |
|
| text-class | 文字样式类 |
|
||||||
|
| info-class `v1.10.20` | 图标右上角文字样式类 |
|
||||||
|
|
||||||
### GoodsActionButton 外部样式类
|
### GoodsActionButton 外部样式类
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-chat-o"
|
class="custom-class van-icon van-icon-chat-o"
|
||||||
@ -67,7 +68,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -125,6 +126,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-cart-o"
|
class="custom-class van-icon van-icon-cart-o"
|
||||||
@ -132,7 +134,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -307,6 +309,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-chat-o"
|
class="custom-class van-icon van-icon-chat-o"
|
||||||
@ -314,7 +317,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info van-info--dot custom-class"
|
class="van-info van-info van-info--dot custom-class"
|
||||||
@ -377,6 +380,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-cart-o"
|
class="custom-class van-icon van-icon-cart-o"
|
||||||
@ -384,7 +388,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info custom-class"
|
class="van-info van-info custom-class"
|
||||||
@ -447,6 +451,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-shop-o"
|
class="custom-class van-icon van-icon-shop-o"
|
||||||
@ -454,7 +459,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -625,6 +630,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-chat-o"
|
class="custom-class van-icon van-icon-chat-o"
|
||||||
@ -632,7 +638,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -688,6 +694,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-shop-o"
|
class="custom-class van-icon van-icon-shop-o"
|
||||||
@ -695,7 +702,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -866,6 +873,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-chat-o"
|
class="custom-class van-icon van-icon-chat-o"
|
||||||
@ -873,7 +881,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
@ -929,6 +937,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<van-icon
|
<van-icon
|
||||||
class="van-goods-action-icon__icon"
|
class="van-goods-action-icon__icon"
|
||||||
customClass="icon-class"
|
customClass="icon-class"
|
||||||
|
infoClass="info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="custom-class van-icon van-icon-shop-o"
|
class="custom-class van-icon van-icon-shop-o"
|
||||||
@ -936,7 +945,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
</wx-view>
|
</wx-view>
|
||||||
</van-icon>
|
</van-icon>
|
||||||
|
@ -1174,7 +1174,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info van-info--dot custom-class"
|
class="van-info van-info van-info--dot custom-class"
|
||||||
@ -1216,7 +1216,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info custom-class"
|
class="van-info van-info custom-class"
|
||||||
|
@ -101,6 +101,7 @@
|
|||||||
| 类名 | 说明 |
|
| 类名 | 说明 |
|
||||||
| ------------ | ------------ |
|
| ------------ | ------------ |
|
||||||
| custom-class | 根节点样式类 |
|
| custom-class | 根节点样式类 |
|
||||||
|
| info-class | 图标右上角文字样式类 |
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { VantComponent } from '../common/component';
|
import { VantComponent } from '../common/component';
|
||||||
|
|
||||||
VantComponent({
|
VantComponent({
|
||||||
|
classes: ['info-class'],
|
||||||
props: {
|
props: {
|
||||||
dot: Boolean,
|
dot: Boolean,
|
||||||
info: null,
|
info: null,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
wx:if="{{ info !== null || dot }}"
|
wx:if="{{ info !== null || dot }}"
|
||||||
dot="{{ dot }}"
|
dot="{{ dot }}"
|
||||||
info="{{ info }}"
|
info="{{ info }}"
|
||||||
custom-class="van-icon__info"
|
custom-class="van-icon__info info-class"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
wx:if="{{ computed.isImage(name) }}"
|
wx:if="{{ computed.isImage(name) }}"
|
||||||
|
@ -199,7 +199,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info van-info--dot custom-class"
|
class="van-info van-info van-info--dot custom-class"
|
||||||
@ -228,7 +228,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info custom-class"
|
class="van-info van-info custom-class"
|
||||||
@ -257,7 +257,7 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
bind:tap="onClick"
|
bind:tap="onClick"
|
||||||
>
|
>
|
||||||
<van-info
|
<van-info
|
||||||
customClass="van-icon__info"
|
customClass="van-icon__info info-class"
|
||||||
>
|
>
|
||||||
<wx-view
|
<wx-view
|
||||||
class="van-info van-info custom-class"
|
class="van-info van-info custom-class"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user