Merge branch 'dev' of https://github.com/youzan/vant into dev

This commit is contained in:
陈嘉涵
2018-03-16 10:22:58 +08:00
30 changed files with 6536 additions and 4237 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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)
#### 点击完成时返回的数据格式

View File

@@ -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>
```

View File

@@ -86,7 +86,7 @@ Vue.use(Field);
placeholder="请输入留言"
rows="1"
autosize
/>
/>
</van-cell-group>
```

View File

@@ -30,9 +30,9 @@ export default {
}
```
#### 物流描述
#### 描述信息
通过`title`和`description`属性来定义物流描述信息
通过`title`和`description`属性来定义描述信息信息
```html
<van-steps

View File

@@ -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