[breaking change] GoodsAction: rename component
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
``` javascript
|
||||
import {
|
||||
GoodsAction,
|
||||
GoodsActionBigBtn,
|
||||
GoodsActionMiniBtn
|
||||
GoodsActionButton,
|
||||
GoodsActionIcon
|
||||
} from 'vant';
|
||||
|
||||
Vue
|
||||
.use(GoodsAction)
|
||||
.use(GoodsActionBigBtn)
|
||||
.use(GoodsActionMiniBtn);
|
||||
.use(GoodsActionButton)
|
||||
.use(GoodsActionIcon);
|
||||
```
|
||||
|
||||
### Usage
|
||||
@@ -19,24 +19,24 @@ Vue
|
||||
|
||||
```html
|
||||
<van-goods-action>
|
||||
<van-goods-action-mini-btn
|
||||
<van-goods-action-icon
|
||||
icon="chat-o"
|
||||
text="Icon1"
|
||||
@click="onClickMiniBtn"
|
||||
@click="onClickIcon"
|
||||
/>
|
||||
<van-goods-action-mini-btn
|
||||
<van-goods-action-icon
|
||||
icon="cart-o"
|
||||
text="Icon2"
|
||||
@click="onClickMiniBtn"
|
||||
@click="onClickIcon"
|
||||
/>
|
||||
<van-goods-action-big-btn
|
||||
<van-goods-action-button
|
||||
text="Button1"
|
||||
@click="onClickBigBtn"
|
||||
@click="onClickButton"
|
||||
/>
|
||||
<van-goods-action-big-btn
|
||||
<van-goods-action-button
|
||||
primary
|
||||
text="Button2"
|
||||
@click="onClickBigBtn"
|
||||
@click="onClickButton"
|
||||
/>
|
||||
</van-goods-action>
|
||||
```
|
||||
@@ -44,10 +44,10 @@ Vue
|
||||
```javascript
|
||||
export default {
|
||||
methods: {
|
||||
onClickMiniBtn() {
|
||||
onClickIcon() {
|
||||
Toast('Click Icon');
|
||||
},
|
||||
onClickBigBtn() {
|
||||
onClickButton() {
|
||||
Toast('Click Button');
|
||||
}
|
||||
}
|
||||
@@ -60,21 +60,21 @@ Use `info` prop to show messages in upper right corner of icon
|
||||
|
||||
```html
|
||||
<van-goods-action>
|
||||
<van-goods-action-mini-btn
|
||||
<van-goods-action-icon
|
||||
icon="chat-o"
|
||||
text="Icon1"
|
||||
/>
|
||||
<van-goods-action-mini-btn
|
||||
<van-goods-action-icon
|
||||
info="5"
|
||||
icon="cart-o"
|
||||
text="Icon2"
|
||||
/>
|
||||
<van-goods-action-mini-btn
|
||||
<van-goods-action-icon
|
||||
icon="shop-o"
|
||||
text="Icon3"
|
||||
/>
|
||||
<van-goods-action-big-btn text="Button1" />
|
||||
<van-goods-action-big-btn
|
||||
<van-goods-action-button text="Button1" />
|
||||
<van-goods-action-button
|
||||
primary
|
||||
text="Button2"
|
||||
/>
|
||||
@@ -88,7 +88,7 @@ Use `info` prop to show messages in upper right corner of icon
|
||||
| Attribute | Description | Type | Default |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation, to enable those features use `viewport-fit=cover` in the `viewport` meta tag | `Boolean` | `false` |
|
||||
|
||||
#### GoodsActionMiniBtn
|
||||
#### GoodsActionIcon
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
@@ -100,7 +100,7 @@ Use `info` prop to show messages in upper right corner of icon
|
||||
| to | Target route of the link, same as to of `vue-router` | `String | Object` | - |
|
||||
| replace | If true, the navigation will not leave a history record | `Boolean` | `false` |
|
||||
|
||||
#### GoodsActionBigBtn
|
||||
#### GoodsActionButton
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
|
||||
Reference in New Issue
Block a user