mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 20:04:09 +00:00
Merge branch 'dev' of https://github.com/youzan/vant into dev
This commit is contained in:
@@ -86,7 +86,7 @@ Example of `AreaList`
|
||||
}
|
||||
```
|
||||
|
||||
All code of China: [Area.json](https://github.com/youzan/vant/blob/dev/docs/demos/mock/area.json)
|
||||
All code of China: [Area.json](https://github.com/youzan/vant/blob/dev/docs/demos/mock/area.js)
|
||||
|
||||
#### argument of callback function confirm
|
||||
An array contains selected area objects.
|
||||
|
@@ -124,6 +124,18 @@ Use title slot to custom tab title
|
||||
</van-tabs>
|
||||
```
|
||||
|
||||
#### Swipeable
|
||||
|
||||
In swipeable mode, you can switch tabs with swipe gestrue in the content
|
||||
|
||||
```html
|
||||
<van-tabs :active="active" swipeable>
|
||||
<van-tab v-for="index in 4" :title="'tab ' + index">
|
||||
content {{ index }}
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
```
|
||||
|
||||
### Tabs API
|
||||
|
||||
| Attribute | Description | Type | Default | Accepted Values |
|
||||
@@ -132,6 +144,8 @@ Use title slot to custom tab title
|
||||
| active | Index of active tab | `String` `Number` | `0` | - |
|
||||
| duration | Toggle tab's animation time | `Number` | `0.2` | - | - |
|
||||
| swipe-threshold | Set swipe tabs threshold | `Number` | `4` | - | - |
|
||||
| sticky | Whether to use sticky mode | `Boolean` | `false` | - |
|
||||
| swipeable | Whether to switch tabs with swipe gestrue in the content | `Boolean` | `false` | - |
|
||||
|
||||
### Tab API
|
||||
|
||||
|
@@ -90,7 +90,7 @@ Vue.use(Area);
|
||||
}
|
||||
```
|
||||
|
||||
完整数据见 [Area.json](https://github.com/youzan/vant/blob/dev/docs/demos/mock/area.json)
|
||||
完整数据见 [Area.json](https://github.com/youzan/vant/blob/dev/docs/demos/mock/area.js)
|
||||
|
||||
#### 点击完成时返回的数据格式
|
||||
|
||||
|
@@ -15,10 +15,10 @@ Vue.use(Badge);
|
||||
|
||||
```html
|
||||
<van-badge-group :active-key="activeKey">
|
||||
<van-badge title="热销榜" @click="onClick" />
|
||||
<van-badge title="花式寿司" @click="onClick" info="8" />
|
||||
<van-badge title="火炽寿司" @click="onClick" info="99" />
|
||||
<van-badge title="手握寿司" @click="onClick" info="199" />
|
||||
<van-badge title="标签名称" @click="onClick" />
|
||||
<van-badge title="标签名称" @click="onClick" info="8" />
|
||||
<van-badge title="标签名称" @click="onClick" info="99" />
|
||||
<van-badge title="标签名称" @click="onClick" info="199" />
|
||||
</van-badge-group>
|
||||
```
|
||||
|
||||
|
@@ -86,7 +86,7 @@ Vue.use(Field);
|
||||
placeholder="请输入留言"
|
||||
rows="1"
|
||||
autosize
|
||||
/>
|
||||
/>
|
||||
</van-cell-group>
|
||||
```
|
||||
|
||||
|
@@ -30,9 +30,9 @@ export default {
|
||||
}
|
||||
```
|
||||
|
||||
#### 物流描述
|
||||
#### 描述信息
|
||||
|
||||
通过`title`和`description`属性来定义物流描述信息
|
||||
通过`title`和`description`属性来定义描述信息信息
|
||||
|
||||
```html
|
||||
<van-steps
|
||||
|
@@ -124,6 +124,18 @@ export default {
|
||||
</van-tabs>
|
||||
```
|
||||
|
||||
#### 滑动切换
|
||||
|
||||
通过`swipeable`属性可以开启滑动切换tab
|
||||
|
||||
```html
|
||||
<van-tabs :active="active" swipeable>
|
||||
<van-tab v-for="index in 4" :title="'选项 ' + index">
|
||||
内容 {{ index }}
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
```
|
||||
|
||||
### Tabs API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 可选 |
|
||||
@@ -133,6 +145,7 @@ export default {
|
||||
| duration | 切换 tab 的动画时间 | `Number` | `0.2` | - |
|
||||
| swipe-threshold | 滚动阀值,设置 Tab 超过多少个可滚动 | `Number` | `4` | - |
|
||||
| sticky | 是否使用粘性定位布局 | `Boolean` | `false` | - |
|
||||
| swipeable | 是否可以滑动内容切换 | `Boolean` | `false` | - |
|
||||
|
||||
### Tab API
|
||||
|
||||
|
Reference in New Issue
Block a user