[Doc] update changelog

This commit is contained in:
陈嘉涵 2018-10-18 18:50:23 +08:00
parent 2228e46733
commit 2e8d7e0b4f
107 changed files with 810 additions and 1212 deletions

View File

@ -77,7 +77,7 @@ Actionsheet will get another style if there is a `title` prop.
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| actions | Options | `Array` | `[]` | | actions | Options | `Array` | `[]` |
| title | Title | `String` | - | | title | Title | `String` | - |
| cancel-text | Text of cancel button | `String` | - | | cancel-text | Text of cancel button | `String` | - |
@ -89,14 +89,14 @@ Actionsheet will get another style if there is a `title` prop.
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| select | Triggered when click option | item | | select | Triggered when click option | item |
| cancel | Triggered when cancel click | - | | cancel | Triggered when cancel click | - |
### Data struct of actions ### Data struct of actions
| key | Description | | key | Description |
|-----------|-----------| |------|------|
| name | Title | | name | Title |
| subname | Subtitle | | subname | Subtitle |
| className | className for the option | | className | className for the option |

View File

@ -10,6 +10,7 @@ Vue.use(Actionsheet);
### 代码演示 ### 代码演示
#### 基础用法 #### 基础用法
需要传入一个`actions`的数组,数组的每一项是一个对象,对象属性见文档下方表格。 需要传入一个`actions`的数组,数组的每一项是一个对象,对象属性见文档下方表格。
```html ```html
@ -80,20 +81,20 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| actions | 菜单选项 | `Array` | `[]` | | actions | 菜单选项 | `Array` | `[]` | - |
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| cancel-text | 取消按钮文字,为空时不展示取消按钮 | `String` | - | | cancel-text | 取消按钮文字,为空时不展示取消按钮 | `String` | - | - |
| overlay | 是否显示遮罩层 | `Boolean` | `true` | | overlay | 是否显示遮罩层 | `Boolean` | `true` | - |
| close-on-click-overlay | 点击遮罩是否关闭菜单 | `Boolean` | `true` | | close-on-click-overlay | 是否在点击蒙层后关闭 | `Boolean` | `true` | - |
| lazy-render | 是否在首次显示弹层时才渲染 DOM 节点 | `Boolean` | `true` | | lazy-render | 是否在显示弹层时才渲染节点 | `Boolean` | `true` | 1.1.11 |
| get-container | 指定挂载的节点,可以传入 CSS 选择器,<br>或一个返回 DOM 节点的函数 | `String | () => HTMLElement` | - | | get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | - | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| select | 选中选项时触发,禁用或加载状态下不会触发 | item: 选项对应的对象 | | select | 选中选项时触发,禁用或加载状态下不会触发 | item: 选项对应的对象 |
| cancel | 取消按钮点击时触发 | - | | cancel | 取消按钮点击时触发 | - |
@ -102,21 +103,9 @@ export default {
`API`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key` `API`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`
| key | 说明 | | key | 说明 |
|-----------|-----------| |------|------|
| name | 标题 | | name | 标题 |
| subname | 二级标题 | | subname | 二级标题 |
| className | 为对应列添加额外的 class | | className | 为对应列添加额外的 class |
| loading | 是否为加载状态 | | loading | 是否为加载状态 |
| disabled | 是否为禁用状态 | | disabled | 是否为禁用状态 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.16 | feature | 新增 select 事件 |
| 1.1.16 | bugfix | 修复选项加载中时仍然有点击态的问题 |
| 1.1.11 | feature | 新增 lazy-render 属性 |
| 1.1.9 | feature | 支持禁用选项 |
| 1.1.8 | bugfix | 修复在 rem 布局下标题文字大小错误的问题 |
| 1.0.4 | feature | 新增 cancel 事件 |
| 1.0.0 | bugfix | 修复下边框未展示的问题 |

View File

@ -60,7 +60,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| area-list | Area List | `Object` | - | | area-list | Area List | `Object` | - |
| address-info | Address Info | `Object` | `{}` | | address-info | Address Info | `Object` | `{}` |
| search-result | Address search result | `Array` | `[]` | | search-result | Address search result | `Array` | `[]` |
@ -77,7 +77,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| save | Triggered when click save button | contentform content | | save | Triggered when click save button | contentform content |
| focus | Triggered when focus field | key: field name | | focus | Triggered when focus field | key: field name |
| delete | Triggered when confirm delete | contentform content | | delete | Triggered when confirm delete | contentform content |
@ -89,14 +89,14 @@ export default {
### Slot ### Slot
| Name | Description | | Name | Description |
|-----------|-----------| |------|------|
| - | Custom content below postal | | - | Custom content below postal |
### Data Structure ### Data Structure
#### addressInfo Data Structure #### addressInfo Data Structure
| key | Description | Type | | key | Description | Type |
|-----------|-----------|-----------| |------|------|------|
| id | Address Id | `String | Number` | | id | Address Id | `String | Number` |
| name | Name | `String` | | name | Name | `String` |
| tel | Phone | `String` | | tel | Phone | `String` |
@ -110,7 +110,7 @@ export default {
#### searchResult Data Structure #### searchResult Data Structure
| key | Description | Type | | key | Description | Type |
|-----------|-----------|-----------| |------|------|------|
| name | Name | `String` | | name | Name | `String` |
| address | Address | `String` | | address | Address | `String` |

View File

@ -57,25 +57,25 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| area-list | 地区列表 | `Object` | - | | area-list | 地区列表 | `Object` | - | - |
| address-info | 收货人信息初始值 | `Object` | `{}` | | address-info | 收货人信息初始值 | `Object` | `{}` | - |
| search-result | 详细地址搜索结果 | `Array` | `[]` | | search-result | 详细地址搜索结果 | `Array` | `[]` | - |
| show-postal | 是否显示邮政编码 | `Boolean` | `false` | | show-postal | 是否显示邮政编码 | `Boolean` | `false` | - |
| show-delete | 是否显示删除按钮 | `Boolean` | `false` | | show-delete | 是否显示删除按钮 | `Boolean` | `false` | 1.0.0 |
| show-set-default | 是否显示默认地址栏 | `Boolean` | `false` | | show-set-default | 是否显示默认地址栏 | `Boolean` | `false` | - |
| show-search-result | 是否显示搜索结果 | `Boolean` | `false` | | show-search-result | 是否显示搜索结果 | `Boolean` | `false` | - |
| save-button-text | 保存按钮文字 | `String` | `保存` | | save-button-text | 保存按钮文字 | `String` | `保存` | - |
| delete-button-text | 删除按钮文字 | `String` | `删除` | | delete-button-text | 删除按钮文字 | `String` | `删除` | - |
| is-saving | 是否显示保存按钮加载动画 | `Boolean` | `false` | | is-saving | 是否显示保存按钮加载动画 | `Boolean` | `false` | - |
| is-deleting | 是否显示删除按钮加载动画 | `Boolean` | `false` | | is-deleting | 是否显示删除按钮加载动画 | `Boolean` | `false` | - |
| tel-validator | 手机号格式校验函数 | `(tel: string) => boolean` | - | | tel-validator | 手机号格式校验函数 | `string => boolean` | - | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| save | 点击保存按钮时触发 | content表单内容 | | save | 点击保存按钮时触发 | content表单内容 |
| focus | 输入框聚焦时触发 | key: 聚焦的输入框对应的 key | | focus | 输入框聚焦时触发 | key: 聚焦的输入框对应的 key |
| delete | 确认删除地址时触发 | content表单内容 | | delete | 确认删除地址时触发 | content表单内容 |
@ -87,7 +87,7 @@ export default {
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 在邮政编码下方插入内容 | | - | 在邮政编码下方插入内容 |
### 数据格式 ### 数据格式
@ -97,7 +97,7 @@ export default {
注意addressInfo 仅作为初始值传入,表单最终内容可以在 save 事件中获取 注意addressInfo 仅作为初始值传入,表单最终内容可以在 save 事件中获取
| key | 说明 | 类型 | | key | 说明 | 类型 |
|-----------|-----------|-----------| |------|------|------|
| id | 每条地址的唯一标识 | `String | Number` | | id | 每条地址的唯一标识 | `String | Number` |
| name | 收货人姓名 | `String` | | name | 收货人姓名 | `String` |
| tel | 收货人手机号 | `String` | | tel | 收货人手机号 | `String` |
@ -112,24 +112,10 @@ export default {
#### searchResult 数据格式 #### searchResult 数据格式
| key | 说明 | 类型 | | key | 说明 | 类型 |
|-----------|-----------|-----------| |------|------|------|
| name | 地名 | `String` | | name | 地名 | `String` |
| address | 详细地址 | `String` | | address | 详细地址 | `String` |
#### 省市县列表数据格式 #### 省市县列表数据格式
请参考 [Area](#/zh-CN/area) 组件。 请参考 [Area](#/zh-CN/area) 组件。
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.2 | bugfix | 修复详细地址下边框未展示的问题
| 1.2.0 | breaking change | 采用驼峰命名的数据结构
| 1.2.0 | bugfix | 修复删除按钮展示逻辑
| 1.1.14 | bugfix | 修复格式化字符串时报错的问题
| 1.1.8 | feature | 支持配置按钮文字
| 1.1.6 | bugfix | 修复省市区弹层样式错误的问题
| 1.1.3 | feature | 新增 cancel-delete 事件
| 1.0.2 | bugfix | 修复初始化时省市区未正确选中的问题
| 1.0.0 | feature | 新增 show-delete 属性
| 1.0.0 | bugfix | 修复在数据变更时未正确选中省市区的问题

View File

@ -66,7 +66,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Id of chosen address | String | - | | v-model | Id of chosen address | String | - |
| list | Address list | Array | `[]` | | list | Address list | Array | `[]` |
| disabled-list | Disabled address list | `Array` | `[]` | | disabled-list | Disabled address list | `Array` | `[]` |
@ -77,7 +77,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| add | Triggered when click add button | - | | add | Triggered when click add button | - |
| edit | Triggered when edit address | item: address objectindex | | edit | Triggered when edit address | item: address objectindex |
| select | Triggered when select address | item: address objectindex | | select | Triggered when select address | item: address objectindex |
@ -87,7 +87,7 @@ export default {
### Address Data Structure ### Address Data Structure
| key | Description | Type | | key | Description | Type |
|-----------|-----------|-----------| |------|------|------|
| id | Id | `String | Number` | | id | Id | `String | Number` |
| name | Name | `String` | | name | Name | `String` |
| tel | Phone | `String` | | tel | Phone | `String` |
@ -96,6 +96,6 @@ export default {
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | Custom content after list | | - | Custom content after list |
| top | Custom content before list | | top | Custom content before list |

View File

@ -67,30 +67,31 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前选中地址的 id | `String` | - | | v-model | 当前选中地址的 id | `String` | - | - |
| list | 地址列表 | `Array` | `[]` | | list | 地址列表 | `Array` | `[]` | - |
| disabled-list | 不可配送地址列表 | `Array` | `[]` | | add-button-text | 底部按钮文字 | `String` | `新增地址` | - |
| disabled-text | 不可配送提示文案 | `String` | - | | disabled-list | 不可配送地址列表 | `Array` | `[]` | 1.3.0 |
| switchable | 是否允许切换地址 | `Boolean` | `true` | | disabled-text | 不可配送提示文案 | `String` | - | 1.3.0 |
| add-button-text | 底部按钮文字 | `String` | `新增地址` | | switchable | 是否允许切换地址 | `Boolean` | `true` | 1.3.8 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 | 版本 |
|-----------|-----------|-----------| |------|------|------|------|
| add | 点击新增按钮时触发 | - | | add | 点击新增按钮时触发 | - | - |
| edit | 点击编辑按钮时触发 | item: 地址对象index: 索引 | | edit | 点击编辑按钮时触发 | item: 地址对象index: 索引 | - |
| select | 切换选中的地址时触发 | item: 地址对象index: 索引 | | select | 切换选中的地址时触发 | item: 地址对象index: 索引 | - |
| edit-disabled | 编辑不可配送的地址时触发 | item: 地址对象index: 索引 | | edit-disabled | 编辑不可配送的地址时触发 | item: 地址对象index: 索引 | 1.3.0 |
| select-disabled | 选中不可配送的地址时触发 | item: 地址对象index: 索引 | | select-disabled | 选中不可配送的地址时触发 | item: 地址对象index: 索引 | 1.3.0 |
### 数据格式 ### 数据格式
#### 地址列表字段说明 #### 地址列表字段说明
| key | 说明 | 类型 | | key | 说明 | 类型 |
|-----------|-----------|-----------| |------|------|------|
| id | 每条地址的唯一标识 | `String | Number` | | id | 每条地址的唯一标识 | `String | Number` |
| name | 收货人姓名 | `String` | | name | 收货人姓名 | `String` |
| tel | 收货人手机号 | `String` | | tel | 收货人手机号 | `String` |
@ -99,13 +100,6 @@ export default {
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 在列表下方插入内容 | | - | 在列表下方插入内容 |
| top | 在顶部插入内容 | | top | 在顶部插入内容 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.2 | bugfix | 修复详细地址未完全展示的问题
| 1.3.0 | feature | 支持不可配送地址列表

View File

@ -40,7 +40,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| value | the `code` of selected area | `String` | - | | value | the `code` of selected area | `String` | - |
| title | Toolbar title | `String` | - | | title | Toolbar title | `String` | - |
| area-list | Area data | `Object` | - | | area-list | Area data | `Object` | - |
@ -52,7 +52,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| confirm | triggers when clicking the confirm button | an array | | confirm | triggers when clicking the confirm button | an array |
| cancel | triggers when clicking the cancel button | - | | cancel | triggers when clicking the cancel button | - |
| change | Triggered when current option changed | Picker instance, current valuescolumn index | | change | Triggered when current option changed | Picker instance, current valuescolumn index |
@ -62,7 +62,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
Use ref to get area instance and call instance methods Use ref to get area instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| reset | - | - | Reset all options | | reset | - | - | Reset all options |
### Data Structure ### Data Structure

View File

@ -37,15 +37,15 @@ Vue.use(Area);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | |------|------|------|------|------|
| value | 当前选中的省市区`code` | `String` | - | | value | 当前选中的省市区`code` | `String` | - | - |
| title | 顶部栏标题 | `String` | - | | title | 顶部栏标题 | `String` | - | - |
| area-list | 省市区数据,格式见下方 | `Object` | - | | area-list | 省市区数据,格式见下方 | `Object` | - | - |
| columns-num | 省市区显示列数3-省市区2-省市1-省 | `String | Number` | `3` | | columns-num | 显示列数3-省市区2-省市1-省 | `String | Number` | `3` | - |
| loading | 是否显示加载状态 | `Boolean` | `false` | | loading | 是否显示加载状态 | `Boolean` | `false` | - |
| item-height | 选项高度 | `Number` | `44` | | item-height | 选项高度 | `Number` | `44` | - |
| visible-item-count | 可见的选项个数 | `Number` | `5` | | visible-item-count | 可见的选项个数 | `Number` | `5` | - |
### Event ### Event
@ -60,7 +60,7 @@ Vue.use(Area);
通过 ref 可以获取到 area 实例并调用实例方法 通过 ref 可以获取到 area 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| reset | - | - | 重置所有选项到第一项 | | reset | - | - | 重置所有选项到第一项 |
### 数据格式 ### 数据格式
@ -124,11 +124,3 @@ Vue.use(Area);
} }
]; ];
``` ```
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.12 | feature | 新增 reset 方法 |
| 1.1.11 | bugfix | 修复 city_list 为空时报错的问题 |
| 1.1.2 | feature | 新增 change 事件 |

View File

@ -40,12 +40,12 @@ export default {
### BadgeGroup API ### BadgeGroup API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| active-key | Index of chosen badge | `String | Number` | `0` | | active-key | Index of chosen badge | `String | Number` | `0` |
### Badge API ### Badge API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| title | Content | `String` | `''` | | title | Content | `String` | `''` |
| info | Info Message | `String | Number` | `''` | | info | Info Message | `String | Number` | `''` |
| url | Link | `String` | - | | url | Link | `String` | - |

View File

@ -40,19 +40,14 @@ export default {
### BadgeGroup API ### BadgeGroup API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| active-key | 选中`badge`的索引 | `String | Number` | `0` | | active-key | 选中`badge`的索引 | `String | Number` | `0` | - |
### Badge API ### Badge API
| 参数 | 说明 | 类型 | 默认值 |
|-----------|-----------|-----------|-------------|
| title | 内容 | `String` | `''` |
| info | 提示消息 | `String | Number` | `''` |
| url | 跳转链接 | `String` | - |
### 更新日志 | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| 版本 | 类型 | 内容 | | title | 内容 | `String` | `''` | - |
|-----------|-----------|-----------| | info | 提示消息 | `String | Number` | `''` | - |
| 1.0.0 | bugfix | 修复选中时字体粗细错误 | | url | 跳转链接 | `String` | - | - |

View File

@ -58,7 +58,7 @@ Vue.use(Button);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| type | Can be set to `primary` `warning` `danger` | `String` | `default` | | type | Can be set to `primary` `warning` `danger` | `String` | `default` |
| size | Can be set to `normal` `large` `small` `mini` | `String` | `normal` | | size | Can be set to `normal` `large` `small` `mini` | `String` | `normal` |
| text | Text | `String` | - | | text | Text | `String` | - |
@ -74,5 +74,5 @@ Vue.use(Button);
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when click button and not disabled or loading | - | | click | Triggered when click button and not disabled or loading | - |

View File

@ -62,35 +62,22 @@ Vue.use(Button);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| type | 按钮类型,可选值为 `primary` `warning` `danger` | `String` | `default` | | type | 类型,可选值为 `primary` `warning` `danger` | `String` | `default` | - |
| size | 按钮尺寸,可选值为 `normal` `large` `small` `mini` | `String` | `normal` | | size | 尺寸,可选值为 `normal` `large` `small` `mini` | `String` | `normal` | - |
| text | 按钮文字 | `String` | - | | text | 文字 | `String` | - | - |
| tag | 按钮 HTML 标签 | `String` | `button` | | tag | HTML 标签 | `String` | `button` | - |
| native-type | 按钮类型(原生) | `String` | - | | native-type | 类型(原生) | `String` | - | - |
| plain | 是否为朴素按钮 | `Boolean` | `false` | | disabled | 是否禁用按钮 | `Boolean` | `false` | - |
| disabled | 是否禁用按钮 | `Boolean` | `false` | | loading | 是否显示为加载状态 | `Boolean` | `false` | - |
| loading | 是否显示为加载状态 | `Boolean` | `false` | | block | 是否为块级元素 | `Boolean` | `false` | - |
| block | 是否为块级元素 | `Boolean` | `false` | | plain | 是否为朴素按钮 | `Boolean` | `false` | 1.1.13 |
| round | 是否为圆形按钮 | `Boolean` | `false` | | square | 是否为方形按钮 | `Boolean` | `false` | 1.2.0 |
| square | 是否为方形按钮 | `Boolean` | `false` | | round | 是否为圆形按钮 | `Boolean` | `false` | 1.3.4 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击按钮且按钮状态不为加载或禁用时触发 | - | | click | 点击按钮且按钮状态不为加载或禁用时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.4 | feature | 新增 round 属性 |
| 1.3.1 | bugfix | 修复加载图标颜色错误的问题
| 1.2.0 | feature | 新增 square 属性
| 1.1.15 | feature | 新增 warning 类型
| 1.1.15 | bugfix | 修复浏览器文字缩放时样式错误的问题
| 1.1.13 | feature | 新增 plain 属性
| 1.0.5 | bugfix | 修复 loading 状态下无法水平对齐的问题
| 1.0.4 | bugfix | 修复加载状态下可点击的问题

View File

@ -44,7 +44,7 @@ Use `slot` to custom content.
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| thumb | Left thumb image URL | `String` | - | | thumb | Left thumb image URL | `String` | - |
| title | Title | `String` | - | | title | Title | `String` | - |
| desc | Description | `String` | - | | desc | Description | `String` | - |
@ -59,7 +59,7 @@ Use `slot` to custom content.
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| title | Custom title | | title | Custom title |
| desc | Custom description | | desc | Custom description |
| tags | Custom tags | | tags | Custom tags |

View File

@ -43,33 +43,25 @@ Vue.use(Card);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| thumb | 左侧图片 URL | `String` | - | | thumb | 左侧图片 URL | `String` | - | - |
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| desc | 描述 | `String` | - | | desc | 描述 | `String` | - | - |
| tag | 标签 | `String` | - | | tag | 标签 | `String` | - | 1.3.4 |
| num | 商品数量 | `String | Number` | - | | num | 商品数量 | `String | Number` | - | - |
| price | 商品价格 | `String | Number` | - | | price | 商品价格 | `String | Number` | - | - |
| origin-price | 商品划线原价 | `String | Number` | - | | origin-price | 商品划线原价 | `String | Number` | - | 1.3.6 |
| centered | 内容是否垂直居中 | `String` | `false` | | centered | 内容是否垂直居中 | `String` | `false` | - |
| currency | 货币符号 | `String` | `¥` | | currency | 货币符号 | `String` | `¥` | - |
| thumb-link | 点击左侧图片后的跳转链接 | `String` | - | | thumb-link | 点击左侧图片后的跳转链接 | `String` | - | 1.3.4 |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| title | 自定义标题 | | title | 自定义标题 |
| desc | 自定义描述 | | desc | 自定义描述 |
| tags | 自定义描述下方的内容 | | tags | 自定义描述下方的内容 |
| thumb | 自定义图片 | | thumb | 自定义图片 |
| footer | 自定义右下角内容 | | footer | 自定义右下角内容 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.4 | feature | 新增 thumb-link 属性 |
| 1.3.4 | feature | 新增 tag 属性 |
| 1.3.6 | feature | 新增 origin-price 属性 |

View File

@ -64,13 +64,13 @@ Vue.use(Cell).use(CellGroup);
### CellGroup API ### CellGroup API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| border | Whether to show outer border | `Boolean` | `true` | | border | Whether to show outer border | `Boolean` | `true` |
### Cell API ### Cell API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| icon | Left Icon | `String` | - | | icon | Left Icon | `String` | - |
| title | Title | `String | Number` | - | | title | Title | `String | Number` | - |
| value | Right text | `String | Number` | - | | value | Right text | `String | Number` | - |
@ -88,13 +88,13 @@ Vue.use(Cell).use(CellGroup);
### Cell Event ### Cell Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when click cell | - | | click | Triggered when click cell | - |
### Cell Slot ### Cell Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Default slot | | - | Default slot |
| icon | Custom icon | | icon | Custom icon |
| title | Custom title | | title | Custom title |

View File

@ -70,49 +70,40 @@ Vue.use(Cell).use(CellGroup);
### CellGroup API ### CellGroup API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| border | 是否显示外边框 | `Boolean` | `true` | | border | 是否显示外边框 | `Boolean` | `true` | - |
### Cell API ### Cell API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| icon | 左侧图标,可选值见 Icon 组件 | `String` | - | | icon | 左侧图标,可选值见 Icon 组件 | `String` | - | - |
| title | 左侧标题 | `String | Number` | - | | title | 左侧标题 | `String | Number` | - | - |
| value | 右侧内容 | `String | Number` | - | | value | 右侧内容 | `String | Number` | - | - |
| label | 标题下方的描述信息 | `String` | - | | label | 标题下方的描述信息 | `String` | - | - |
| border | 是否显示内边框 | `Boolean` | `true` | | url | 跳转链接 | `String` | - | - |
| center | 是否使内容垂直居中 | `Boolean` | `false` | | to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
| url | 跳转链接 | `String` | - | | border | 是否显示内边框 | `Boolean` | `true` | - |
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | | replace | 跳转时是否替换当前 history | `String` | `false` | - |
| replace | 跳转时是否替换当前 history | `String` | `false` | | clickable | 是否开启点击反馈 | `Boolean` | `false` | - |
| clickable | 是否开启点击反馈 | `Boolean` | `false` | | is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` | - |
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` | | required | 是否显示表单必填星号 | `Boolean` | `false` | - |
| required | 是否显示表单必填星号 | `Boolean` | `false` | | center | 是否使内容垂直居中 | `Boolean` | `false` | 1.0.3 |
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - | | arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - | 1.1.10 |
### Cell Event ### Cell Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击 cell 时触发 | - | | click | 点击 cell 时触发 | - |
### Cell Slot ### Cell Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义显示内容 | | - | 自定义显示内容 |
| icon | 自定义`icon` | | icon | 自定义`icon` |
| title | 自定义`title` | | title | 自定义`title` |
| right-icon | 自定义右侧按钮,默认是`arrow` | | right-icon | 自定义右侧按钮,默认是`arrow` |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.10 | feature | 新增 arrow-direction 属性
| 1.1.4 | feature | title 和 value 属性支持 number 类型
| 1.0.8 | bugfix | 修复文字垂直不对齐的问题
| 1.0.3 | feature | 新增 center 属性
| 1.0.3 | feature | 布局方式由 table 升级为 flex-box

View File

@ -129,7 +129,7 @@ export default {
### Checkbox API ### Checkbox API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| name | Checkbox name | `any` | - | | name | Checkbox name | `any` | - |
| v-model | Check status | `Boolean` | `false` | | v-model | Check status | `Boolean` | `false` |
| disabled | Diable checkbox | `Boolean` | `false` | | disabled | Diable checkbox | `Boolean` | `false` |
@ -140,7 +140,7 @@ export default {
### CheckboxGroup API ### CheckboxGroup API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Names of all checked checkboxes | `Array` | - | | v-model | Names of all checked checkboxes | `Array` | - |
| disabled | Disable all checkboxes | `Boolean` | `false` | | disabled | Disable all checkboxes | `Boolean` | `false` |
| max | Maximum amount of checked options | `Number` | `0`(Unlimited) | | max | Maximum amount of checked options | `Number` | `0`(Unlimited) |
@ -148,19 +148,19 @@ export default {
### Checkbox Event ### Checkbox Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when value changed | current value | | change | Triggered when value changed | current value |
### CheckboxGroup Event ### CheckboxGroup Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when value changed | current value | | change | Triggered when value changed | current value |
### Checkbox Slot ### Checkbox Slot
| Name | Description | slot-scope | | Name | Description | slot-scope |
|-----------|-----------|-----------| |------|------|------|
| - | Custom label | - | | - | Custom label | - |
| icon | Custom icon | checked: whether to be checked | | icon | Custom icon | checked: whether to be checked |
@ -169,5 +169,5 @@ export default {
Use ref to get checkbox instance and call instance methods Use ref to get checkbox instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| toggle | - | - | Toggle check status | | toggle | - | - | Toggle check status |

View File

@ -131,39 +131,39 @@ export default {
### Checkbox API ### Checkbox API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| name | 标识 Checkbox 名称 | `any` | - | | name | 标识符 | `any` | - | - |
| v-model | 是否为选中状态 | `Boolean` | `false` | | shape | 形状,可选值为 `square` | `String` | `round` | - |
| disabled | 是否禁用单选框 | `Boolean` | `false` | | v-model | 是否为选中状态 | `Boolean` | `false` | - |
| label-disabled | 是否禁用单选框内容点击 | `Boolean` | `false` | | disabled | 是否禁用单选框 | `Boolean` | `false` | - |
| label-position | 文本位置,可选值为 `left` | `String` | `right` | | label-disabled | 是否禁用单选框文本点击 | `Boolean` | `false` | - |
| shape | 形状,可选值为 `round` `square` | `String` | `round` | | label-position | 文本位置,可选值为 `left` | `String` | `right` | 1.1.11 |
### CheckboxGroup API ### CheckboxGroup API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 所有选中项的 name | `Array` | - | | v-model | 所有选中项的标识符 | `Array` | - | - |
| disabled | 是否禁用所有单选框 | `Boolean` | `false` | | disabled | 是否禁用所有单选框 | `Boolean` | `false` | - |
| max | 设置最大可选数 | `Number` | `0`(无限制) | | max | 设置最大可选数0 为无限制 | `Number` | `0` | - |
### Checkbox Event ### Checkbox Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 | | change | 当绑定值变化时触发的事件 | 当前组件的值 |
### CheckboxGroup Event ### CheckboxGroup Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 | | change | 当绑定值变化时触发的事件 | 当前组件的值 |
### Checkbox Slot ### Checkbox Slot
| 名称 | 说明 | slot-scope | | 名称 | 说明 | slot-scope |
|-----------|-----------|-----------| |------|------|------|
| - | 自定义文本 | - | | - | 自定义文本 | - |
| icon | 自定义图标 | checked: 是否为选中状态 | | icon | 自定义图标 | checked: 是否为选中状态 |
@ -172,14 +172,5 @@ export default {
通过 ref 可以获取到 checkbox 实例并调用实例方法 通过 ref 可以获取到 checkbox 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| toggle | - | - | 切换选中状态 | | toggle | - | - | 切换选中状态 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.12 | feature | 新增 icon 插槽,支持自定义图标 |
| 1.1.11 | feature | 新增 label-position 属性 |
| 1.1.8 | bugfix | 修复 v-model 类型检查错误 |
| 1.1.0 | bugfix | 修复内容为空时渲染了空 label 元素的问题 |

View File

@ -56,7 +56,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Current rate | `Number` | - | | v-model | Current rate | `Number` | - |
| rate | Target rate | `Number` | `100` | | rate | Target rate | `Number` | `100` |
| size | Circle size | `String` | `100px` | | size | Circle size | `String` | `100px` |
@ -71,5 +71,5 @@ export default {
### Cell Slot ### Cell Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | custom text content | | - | custom text content |

View File

@ -56,21 +56,21 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前进度 | `Number` | - | | v-model | 当前进度 | `Number` | - | - |
| rate | 目标进度 | `Number` | `100` | | rate | 目标进度 | `Number` | `100` | - |
| size | 圆环直径 | `String` | `100px` | | size | 圆环直径 | `String` | `100px` | - |
| color | 进度条颜色 | `String` | `#38f` | | color | 进度条颜色 | `String` | `#38f` | - |
| layer-color | 轨道颜色 | `String` | `#fff` | | layer-color | 轨道颜色 | `String` | `#fff` | - |
| fill | 填充颜色 | `String` | `none` | | fill | 填充颜色 | `String` | `none` | - |
| speed | 动画速度(单位为 rate/s| `Number` | - | | speed | 动画速度(单位为 rate/s| `Number` | - | - |
| text | 文字 | `String` | - | | text | 文字 | `String` | - | - |
| stroke-width | 进度条宽度 | `Number` | `40` | | stroke-width | 进度条宽度 | `Number` | `40` | - |
| clockwise | 是否顺时针增加 | `Boolean` | `true` | | clockwise | 是否顺时针增加 | `Boolean` | `true` | - |
### Circle Slot ### Circle Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义文字内容 | | - | 自定义文字内容 |

View File

@ -90,7 +90,7 @@ Setting `type` to `flex` to enable flex layout
#### Row #### Row
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| type | Layout type, can be set to `flex` | `String` | - | | type | Layout type, can be set to `flex` | `String` | - |
| gutter | Grid spacingpx | `String | Number` | - | | gutter | Grid spacingpx | `String | Number` | - |
| tag | Custom element tag | `String` | `div` | | tag | Custom element tag | `String` | `div` |
@ -100,7 +100,7 @@ Setting `type` to `flex` to enable flex layout
#### Col #### Col
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| span | Number of column the grid spans | `String | Number` | - | | span | Number of column the grid spans | `String | Number` | - |
| offset | Number of spacing on the left side of the grid | `String | Number` | - | | offset | Number of spacing on the left side of the grid | `String | Number` | - |
| tag | Custom element tag | `String` | `div` | | tag | Custom element tag | `String` | `div` |

View File

@ -90,26 +90,18 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
#### Row #### Row
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| type | 布局方式,可选值为`flex` | `String` | - | | type | 布局方式,可选值为`flex` | `String` | - | 1.1.9 |
| gutter | 列元素之间的间距单位为px | `String | Number` | - | | gutter | 列元素之间的间距单位为px | `String | Number` | - | - |
| tag | 自定义元素标签 | `String` | `div` | | tag | 自定义元素标签 | `String` | `div` | - |
| justify | Flex 主轴对齐方式,可选值为 end/center/space-around/space-between | `String` | `start` | | justify | Flex 主轴对齐方式,可选值为 `end` `center` <br> `space-around` `space-between` | `String` | `start` | 1.1.9 |
| align | Flex 交叉轴对齐方式,可选值为 center/bottom | `String` | `top` | | align | Flex 交叉轴对齐方式,可选值为 `center` `bottom` | `String` | `top` | 1.1.9 |
#### Col #### Col
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| span | 列元素宽度 | `String | Number` | - | | span | 列元素宽度 | `String | Number` | - | - |
| offset | 列元素偏移距离 | `String | Number` | - | | offset | 列元素偏移距离 | `String | Number` | - | - |
| tag | 自定义元素标签 | `String` | `div` | | tag | 自定义元素标签 | `String` | `div` | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.9 | feature | 新增 type 属性 |
| 1.1.9 | feature | 新增 align 属性 |
| 1.1.9 | feature | 新增 justify 属性 |

View File

@ -70,20 +70,20 @@ export default {
### Collapse API ### Collapse API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | names of current active panels | `Array | String | Number` | - | | v-model | names of current active panels | `Array | String | Number` | - |
| accordion | Whether to be accordion mode | `Boolean` | `false` | | accordion | Whether to be accordion mode | `Boolean` | `false` |
### Collapse Event ### Collapse Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when switch panel | activeNames: `string | array` | | change | Triggered when switch panel | activeNames: `string | array` |
### CollapseItem API ### CollapseItem API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| name | Name | `String | Number` | `index` | | name | Name | `String | Number` | `index` |
| icon | Left Icon | `String` | - | | icon | Left Icon | `String` | - |
| title | Title | `String | Number` | - | | title | Title | `String | Number` | - |
@ -96,7 +96,7 @@ export default {
### CollapseItem Slot ### CollapseItem Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Content | | - | Content |
| value | Custom value | | value | Custom value |
| icon | Custom icon | | icon | Custom icon |

View File

@ -81,50 +81,37 @@ export default {
### Collapse API ### Collapse API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| v-model | 当前展开面板的 name | `Array | String | Number` | - | | v-model | 当前展开面板的 name | `Array | String | Number` | - |
| accordion | 是否开启手风琴模式 | `Boolean` | `false` | | accordion | 是否开启手风琴模式 | `Boolean` | `false` |
### Collapse Event ### Collapse Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 切换面板时触发 | activeNames: `string | array` | | change | 切换面板时触发 | activeNames: `string | array` |
### CollapseItem API ### CollapseItem API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|------|
| name | 面板唯一标识符,默认为索引值 | `String | Number` | `index` | | name | 唯一标识符,默认为索引值 | `String | Number` | `index` | - |
| icon | 标题栏左侧图标,可选值见 Icon 组件 | `String` | - | | title | 标题栏左侧内容 | `String | Number` | - | - |
| title | 标题栏左侧内容 | `String | Number` | - | | icon | 标题栏左侧图标,可选值见 Icon 组件 | `String` | - | 1.2.1 |
| value | 标题栏右侧内容 | `String | Number` | - | | value | 标题栏右侧内容 | `String | Number` | - | 1.2.1 |
| label | 标题栏描述信息 | `String` | - | | label | 标题栏描述信息 | `String` | - | 1.2.1 |
| border | 是否显示内边框 | `Boolean` | `true` | | border | 是否显示内边框 | `Boolean` | `true` | 1.2.1 |
| disabled | 是否禁用面板 | `Boolean` | `false` | | is-link | 是否展示标题栏右侧箭头并开启点击反馈 | `Boolean` | `true` | 1.2.1 |
| is-link | 标题栏是否展示右侧箭头并开启点击反馈 | `Boolean` | `true` | | disabled | 是否禁用面板 | `Boolean` | `false` | 1.3.6 |
### CollapseItem Slot ### CollapseItem Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 面板内容 | | - | 面板内容 |
| value | 自定义显示内容 | | value | 自定义显示内容 |
| icon | 自定义`icon` | | icon | 自定义`icon` |
| title | 自定义`title` | | title | 自定义`title` |
| right-icon | 自定义右侧按钮,默认是`arrow` | | right-icon | 自定义右侧按钮,默认是`arrow` |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.6 | feature | 新增 disabled 属性 |
| 1.2.1 | feature | 新增 icon 属性 |
| 1.2.1 | feature | 新增 label 属性 |
| 1.2.1 | feature | 新增 value 属性 |
| 1.2.1 | feature | 新增 border 属性 |
| 1.2.1 | feature | 新增 is-link 属性 |
| 1.2.1 | feature | 新增 icon 属性 |
| 1.1.14 | feature | 新增过渡动画 |
| 1.0.0 | feature | 新增组件 |

View File

@ -134,7 +134,7 @@ export default {
### ContactCard API ### ContactCard API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| type | Can be set to `add` `edit` | `String` | `add` | | type | Can be set to `add` `edit` | `String` | `add` |
| name | Name | `String` | - | | name | Name | `String` | - |
| tel | Phone | `String` | - | | tel | Phone | `String` | - |
@ -143,7 +143,7 @@ export default {
### ContactList API ### ContactList API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| v-model | Id of chosen contact | `String | Number` | - | | v-model | Id of chosen contact | `String | Number` | - |
| list | Contact list | `Array` | `[]` | | list | Contact list | `Array` | `[]` |
| add-text | Add button text | `String` | `Add new contact` | | add-text | Add button text | `String` | `Add new contact` |
@ -151,14 +151,14 @@ export default {
### ContactList Event ### ContactList Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| add | Triggered when click add button | - | | add | Triggered when click add button | - |
| edit | Triggered when click edit button | item: contact objectindex | | edit | Triggered when click edit button | item: contact objectindex |
| select | Triggered when select contact | item: contact object | | select | Triggered when select contact | item: contact object |
### ContactEdit API ### ContactEdit API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| contact-info | Contact Info | `Object` | `[]` | | contact-info | Contact Info | `Object` | `[]` |
| is-edit | Whether is editing | `Boolean` | `false` | | is-edit | Whether is editing | `Boolean` | `false` |
| is-saving | Whether to show save button loading status | `Boolean` | `false` | | is-saving | Whether to show save button loading status | `Boolean` | `false` |
@ -168,14 +168,14 @@ export default {
### ContactEdit Event ### ContactEdit Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| save | Triggered when click save button | contentcontact info | | save | Triggered when click save button | contentcontact info |
| delete | Triggered when click delete button | contentcontact info | | delete | Triggered when click delete button | contentcontact info |
### Contact Data Structure ### Contact Data Structure
| key | Description | Type | | key | Description | Type |
|-----------|-----------|-----------| |------|------|------|
| id | ID | `String | Number` | | id | ID | `String | Number` |
| name | Name | `String` | | name | Name | `String` |
| tel | Phone | `String` | | tel | Phone | `String` |

View File

@ -133,42 +133,43 @@ export default {
### ContactCard API ### ContactCard API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| type | 类型,可选值为 `add` `edit` | `String` | `add` | | type | 类型,可选值为 `add` `edit` | `String` | `add` | - |
| name | 联系人姓名 | `String` | - | | name | 联系人姓名 | `String` | - | - |
| tel | 联系人手机号 | `String` | - | | tel | 联系人手机号 | `String` | - | - |
| add-text | 添加时的文案提示 | `String` | `添加订单联系人信息` | | add-text | 添加时的文案提示 | `String` | `添加订单联系人信息` | - |
### ContactList API ### ContactList API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| v-model | 当前选中联系人的 id | `String | Number` | - | | v-model | 当前选中联系人的 id | `String | Number` | - | - |
| list | 联系人列表 | `Array` | `[]` | | list | 联系人列表 | `Array` | `[]` | - |
| add-text | 新建按钮文案 | `String` | `新建联系人` | | add-text | 新建按钮文案 | `String` | `新建联系人` | - |
### ContactList Event ### ContactList Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| add | 点击新增按钮时触发 | - | | add | 点击新增按钮时触发 | - |
| edit | 点击编辑按钮时触发 | item: 当前联系人对象index: 索引 | | edit | 点击编辑按钮时触发 | item: 当前联系人对象index: 索引 |
| select | 切换选中的联系人时触发 | item: 当前联系人对象index: 索引 | | select | 切换选中的联系人时触发 | item: 当前联系人对象index: 索引 |
### ContactEdit API ### ContactEdit API
| 参数 | 说明 | 类型 | 默认值 |
|-----------|-----------|-----------|-------------|-------------| | 参数 | 说明 | 类型 | 默认值 | 版本 |
| contact-info | 联系人信息 | `Object` | `[]` | |------|------|------|------|------|
| is-edit | 是否为编辑联系人 | `Boolean` | `false` | | contact-info | 联系人信息 | `Object` | `[]` | - |
| is-saving | 是否显示保存按钮加载动画 | `Boolean` | `false` | | is-edit | 是否为编辑联系人 | `Boolean` | `false` | - |
| is-deleting | 是否显示删除按钮加载动画 | `Boolean` | `false` | | is-saving | 是否显示保存按钮加载动画 | `Boolean` | `false` | - |
| tel-validator | 手机号格式校验函数 | `(tel: string) => boolean` | - | | is-deleting | 是否显示删除按钮加载动画 | `Boolean` | `false` | - |
| tel-validator | 手机号格式校验函数 | `(tel: string) => boolean` | - | - |
### ContactEdit Event ### ContactEdit Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| save | 点击保存按钮时触发 | content表单内容 | | save | 点击保存按钮时触发 | content表单内容 |
| delete | 点击删除按钮时触发 | content表单内容 | | delete | 点击删除按钮时触发 | content表单内容 |
@ -177,7 +178,7 @@ export default {
#### 联系人数据格式 #### 联系人数据格式
| key | 说明 | 类型 | | key | 说明 | 类型 |
|-----------|-----------|-----------| |------|------|------|
| id | 每位联系人的唯一标识 | `String | Number` | | id | 每位联系人的唯一标识 | `String | Number` |
| name | 联系人姓名 | `String` | | name | 联系人姓名 | `String` |
| tel | 联系人手机号 | `String` | | tel | 联系人手机号 | `String` |

View File

@ -68,7 +68,7 @@ export default {
### CouponCell API ### CouponCell API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| title | Cell title | `String` | `Coupon` | | title | Cell title | `String` | `Coupon` |
| chosen-coupon | Index of chosen coupon | `Number` | `-1` | | chosen-coupon | Index of chosen coupon | `Number` | `-1` |
| coupons | Coupon list | `Array` | `[]` | | coupons | Coupon list | `Array` | `[]` |
@ -77,7 +77,7 @@ export default {
### CouponList API ### CouponList API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Current exchange code | `String` | - | | v-model | Current exchange code | `String` | - |
| chosen-coupon | Index of chosen coupon | `Number` | `-1` | | chosen-coupon | Index of chosen coupon | `Number` | `-1` |
| coupons | Coupon list | `Array` | `[]` | | coupons | Coupon list | `Array` | `[]` |
@ -88,20 +88,19 @@ export default {
| exchange-min-length | Min length to enable exchange button | `Number` | `1` | | exchange-min-length | Min length to enable exchange button | `Number` | `1` |
| displayed-coupon-index | Index of displayed coupon | `Number` | - | | displayed-coupon-index | Index of displayed coupon | `Number` | - |
| close-button-text | Close button text | `String` | `Close` | | close-button-text | Close button text | `String` | `Close` |
| disabled-list-title | Disabled list title | `String` | `Unavailable` |
| input-placeholder | Input placeholder | `String` | `Coupon code` | | input-placeholder | Input placeholder | `String` | `Coupon code` |
### CouponList Event ### CouponList Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when change chosen coupon | index: index of chosen coupon | | change | Triggered when change chosen coupon | index: index of chosen coupon |
| exchange | Triggered when exchange coupon | code: exchange code | | exchange | Triggered when exchange coupon | code: exchange code |
### Coupon Item Data Structure ### Coupon Item Data Structure
| key | Description | Type | | key | Description | Type |
|-----------|-----------|-----------| |------|------|------|
| id | Id | `String` | | id | Id | `String` |
| name | Name | `String` | | name | Name | `String` |
| discount | Discount | `Number` | | discount | Discount | `Number` |

View File

@ -89,7 +89,6 @@ export default create({
code: String, code: String,
closeButtonText: String, closeButtonText: String,
inputPlaceholder: String, inputPlaceholder: String,
disabledListTitle: String,
exchangeButtonText: String, exchangeButtonText: String,
exchangeButtonLoading: Boolean, exchangeButtonLoading: Boolean,
exchangeButtonDisabled: Boolean, exchangeButtonDisabled: Boolean,

View File

@ -68,43 +68,43 @@ export default {
### CouponCell API ### CouponCell API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| title | 单元格标题 | `String` | `优惠券` | | title | 单元格标题 | `String` | `优惠券` | - |
| chosen-coupon | 当前选中优惠券的索引 | `Number` | `-1` | | chosen-coupon | 当前选中优惠券的索引 | `Number` | `-1` | - |
| coupons | 可用优惠券列表 | `Array` | `[]` | | coupons | 可用优惠券列表 | `Array` | `[]` | - |
| editable | 能否切换优惠券 | `Boolean` | `true` | | editable | 能否切换优惠券 | `Boolean` | `true` | - |
### CouponList API ### CouponList API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前输入的兑换码 | `String` | - | | v-model | 当前输入的兑换码 | `String` | - | - |
| chosen-coupon | 当前选中优惠券的索引 | `Number` | `-1` | | chosen-coupon | 当前选中优惠券的索引 | `Number` | `-1` | - |
| coupons | 可用优惠券列表 | `Array` | `[]` | | coupons | 可用优惠券列表 | `Array` | `[]` | - |
| disabled-coupons | 不可用优惠券列表 | `Array` | `[]` | | disabled-coupons | 不可用优惠券列表 | `Array` | `[]` | - |
| exchange-button-text | 兑换按钮文字 | `String` | `兑换` | | exchange-button-text | 兑换按钮文字 | `String` | `兑换` | - |
| exchange-button-loading | 是否在兑换按钮上显示加载动画 | `Boolean` | `false` | | exchange-button-loading | 是否显示兑换按钮加载动画 | `Boolean` | `false` | - |
| exchange-button-disabled | 是否禁用兑换按钮 | `Boolean` | `false` | | exchange-button-disabled | 是否禁用兑换按钮 | `Boolean` | `false` | - |
| exchange-min-length | 兑换码最小长度 | `Number` | `1` | | exchange-min-length | 兑换码最小长度 | `Number` | `1` | - |
| displayed-coupon-index | 滚动至特定优惠券位置 | `Number` | - | | displayed-coupon-index | 滚动至特定优惠券位置 | `Number` | - | - |
| show-close-button | 是否显示列表底部按钮 | `Boolean` | `true` | | show-close-button | 是否显示列表底部按钮 | `Boolean` | `true` | - |
| close-button-text | 列表底部按钮文字 | `String` | `不使用优惠` | | close-button-text | 列表底部按钮文字 | `String` | `不使用优惠` | - |
| disabled-list-title | 不可用券列表标题 | `String` | `不可用优惠` | | input-placeholder | 输入框文字提示 | `String` | `请输入优惠码` | - |
| input-placeholder | 输入框文字提示 | `String` | `请输入优惠码` | | show-exchange-bar | 是否展示兑换栏 | `Boolean` | `true` | - |
| show-exchange-bar | 是否展示兑换栏 | `Boolean` | `true` |
### CouponList Event ### CouponList Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 优惠券切换回调 | index, 选中优惠券的索引 | | change | 优惠券切换回调 | index, 选中优惠券的索引 |
| exchange | 兑换优惠券回调 | code, 兑换码 | | exchange | 兑换优惠券回调 | code, 兑换码 |
### 数据格式 ### 数据格式
#### 优惠券字段说明 #### 优惠券字段说明
| key | 说明 | 类型 | | key | 说明 | 类型 |
|-----------|-----------|-----------| |------|------|------|
| id | 优惠券 id | `String` | | id | 优惠券 id | `String` |
| name | 优惠券名称 | `String` | | name | 优惠券名称 | `String` |
| discount | 折扣0为满减券88=>8.8折 | `Number` | | discount | 折扣0为满减券88=>8.8折 | `Number` |

View File

@ -111,7 +111,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| type | Can be set to `date` `time`<br> `year-month` | `String` | `datetime` | | type | Can be set to `date` `time`<br> `year-month` | `String` | `datetime` |
| min-date | Min date | `Date` | Ten years ago on January 1 | | min-date | Min date | `Date` | Ten years ago on January 1 |
| max-date | Max date | `Date` | Ten years later on December 31 | | max-date | Max date | `Date` | Ten years later on December 31 |
@ -130,7 +130,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when value changed | picker: picker instance | | change | Triggered when value changed | picker: picker instance |
| confirm | Triggered when click confirm button | value: current value | | confirm | Triggered when click confirm button | value: current value |
| cancel | Triggered when click cancel button | - | | cancel | Triggered when click cancel button | - |

View File

@ -111,27 +111,28 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| type | 类型,可选值为 `date` `time`<br> `year-month` | `String` | `datetime` | | type | 类型,可选值为 `date` <br> `time` `year-month` | `String` | `datetime` | 1.0.2 |
| min-date | 可选的最小时间,精确到分钟 | `Date` | 十年前的 1 月 1 日 | | min-date | 可选的最小时间,精确到分钟 | `Date` | 十年前 | - |
| max-date | 可选的最大时间,精确到分钟 | `Date` | 十年后的 12 月 31 日 | | max-date | 可选的最大时间,精确到分钟 | `Date` | 十年后 | - |
| min-hour | 可选的最小小时,针对 time 类型 | `Number` | `0` | | min-hour | 可选的最小小时,针对 time 类型 | `Number` | `0` | - |
| max-hour | 可选的最大小时,针对 time 类型 | `Number` | `23` | | max-hour | 可选的最大小时,针对 time 类型 | `Number` | `23` | - |
| min-minute | 可选的最小分钟,针对 time 类型 | `Number` | `0` | | min-minute | 可选的最小分钟,针对 time 类型 | `Number` | `0` | 1.1.15 |
| max-minute | 可选的最大分钟,针对 time 类型 | `Number` | `59` | | max-minute | 可选的最大分钟,针对 time 类型 | `Number` | `59` | 1.1.15 |
| formatter | 选项格式化函数 | `(type, value) => value` | - | | formatter | 选项格式化函数 | `(type, value) => value` | - | 1.1.14 |
| title | 顶部栏标题 | `String` | `''` | | title | 顶部栏标题 | `String` | `''` | 1.0.4 |
| loading | 是否显示加载状态 | `Boolean` | `false` | | show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | 1.0.2 |
| item-height | 选项高度 | `Number` | `44` | | loading | 是否显示加载状态 | `Boolean` | `false` | 1.0.4 |
| confirm-button-text | 确认按钮文字 | `String` | `确认` | | item-height | 选项高度 | `Number` | `44` | 1.0.4 |
| cancel-button-text | 取消按钮文字 | `String` | `取消` | | confirm-button-text | 确认按钮文字 | `String` | `确认` | 1.0.4 |
| visible-item-count | 可见的选项个数 | `Number` | `5` | | cancel-button-text | 取消按钮文字 | `String` | `取消` | 1.0.4 |
| visible-item-count | 可见的选项个数 | `Number` | `5` | 1.0.4 |
### Event ### Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当值变化时触发的事件 | picker 实例 | | change | 当值变化时触发的事件 | picker 实例 |
| confirm | 点击完成按钮时触发的事件 | 当前 value | | confirm | 点击完成按钮时触发的事件 | 当前 value |
| cancel | 点击取消按钮时触发的事件 | - | | cancel | 点击取消按钮时触发的事件 | - |
@ -141,27 +142,10 @@ export default {
`change`事件中,可以获取到`picker`实例,对`picker`进行相应的更新等操作: `change`事件中,可以获取到`picker`实例,对`picker`进行相应的更新等操作:
| 函数 | 说明 | | 函数 | 说明 |
|-----------|-----------| |------|------|
| getColumnValue(index) | 获取对应列中选中的值 | | getColumnValue(index) | 获取对应列中选中的值 |
| setColumnValue(index, value) | 设置对应列中选中的值 | | setColumnValue(index, value) | 设置对应列中选中的值 |
| getColumnValues(index) | 获取对应列中所有的备选值 | | getColumnValues(index) | 获取对应列中所有的备选值 |
| setColumnValues(index, values) | 设置对应列中所有的备选值 | | setColumnValues(index, values) | 设置对应列中所有的备选值 |
| getValues() | 获取所有列中被选中的值,返回一个数组 | | getValues() | 获取所有列中被选中的值,返回一个数组 |
| setValues(values) | `values`为一个数组,设置所有列中被选中的值 | | setValues(values) | `values`为一个数组,设置所有列中被选中的值 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.3 | bugfix | 修复时间范围变化时未正确更新 value 的问题 |
| 1.3.0 | bugfix | 修复使用 min-minute 属性时初始值错误的问题
| 1.1.16 | bugfix | 修复使用 formatter 时默认值错误的问题
| 1.1.15 | feature | 新增 max-minute、min-minute 属性
| 1.1.14 | feature | 新增 formatter 属性
| 1.1.11 | bugfix | 修复 change 事件回调参数不正确的问题
| 1.1.9 | bugfix | 修复 visible-item-count 属性拼写错误
| 1.1.4 | bugfix | 修复初始值错误的问题
| 1.0.6 | bugfix | 修复 change 事件参数错误
| 1.0.4 | feature | 支持 Picker 组件所有属性
| 1.0.2 | feature | 新增 show-toolbar 属性
| 1.0.2 | feature | 新增 month-year 类型

View File

@ -58,7 +58,7 @@ export default {
### Methods ### Methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| Dialog | `options` | `Promise` | Show dialog | | Dialog | `options` | `Promise` | Show dialog |
| Dialog.alert | `options` | `Promise` | Show alert dialog | | Dialog.alert | `options` | `Promise` | Show alert dialog |
| Dialog.confirm | `options` | `Promise` | Show confim dialog | | Dialog.confirm | `options` | `Promise` | Show confim dialog |
@ -69,7 +69,7 @@ export default {
### Options ### Options
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| title | Title | `String` | - | | title | Title | `String` | - |
| message | Message | `String` | - | | message | Message | `String` | - |
| className | Custom className | `String | Array | Object` | - | | className | Custom className | `String | Array | Object` | - |
@ -128,7 +128,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Whether to show dialog | `Boolean` | - | | v-model | Whether to show dialog | `Boolean` | - |
| title | Title | `String` | - | | title | Title | `String` | - |
| message | Message | `String` | - | | message | Message | `String` | - |
@ -146,6 +146,6 @@ export default {
### Event ### Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| confirm | Triggered when click confirm button | - | | confirm | Triggered when click confirm button | - |
| cancel | Triggered when click cancel button | - | | cancel | Triggered when click cancel button | - |

View File

@ -59,7 +59,7 @@ export default {
### 方法 ### 方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| Dialog | `options` | `Promise` | 展示弹窗 | | Dialog | `options` | `Promise` | 展示弹窗 |
| Dialog.alert | `options` | `Promise` | 展示消息提示弹窗 | | Dialog.alert | `options` | `Promise` | 展示消息提示弹窗 |
| Dialog.confirm | `options` | `Promise` | 展示消息确认弹窗 | | Dialog.confirm | `options` | `Promise` | 展示消息确认弹窗 |
@ -69,19 +69,19 @@ export default {
### Options ### Options
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| message | 内容 | `String` | - | | message | 内容 | `String` | - | - |
| className | 自定义类名 | `String | Array | Object` | - | | className | 自定义类名 | `String | Array | Object` | - | 1.1.7 |
| showConfirmButton | 是否展示确认按钮 | `Boolean` | `true` | | showConfirmButton | 是否展示确认按钮 | `Boolean` | `true` | - |
| showCancelButton | 是否展示取消按钮 | `Boolean` | `false` | | showCancelButton | 是否展示取消按钮 | `Boolean` | `false` | - |
| confirmButtonText | 确认按钮的文案 | `String` | `确认` | | confirmButtonText | 确认按钮的文案 | `String` | `确认` | - |
| cancelButtonText | 取消按钮的文案 | `String` | `取消` | | cancelButtonText | 取消按钮的文案 | `String` | `取消` | - |
| overlay | 是否展示蒙层 | `Boolean` | `true` | | overlay | 是否展示蒙层 | `Boolean` | `true` | - |
| closeOnClickOverlay | 点击蒙层时是否关闭弹窗 | `Boolean` | `false` | | closeOnClickOverlay | 点击蒙层时是否关闭弹窗 | `Boolean` | `false` | - |
| lockScroll | 是否锁定背景滚动 | `Boolean` | `true` | | lockScroll | 是否锁定背景滚动 | `Boolean` | `true` | - |
| beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 可以阻止弹窗关闭 | (action: string, done: function) => void | - | | beforeClose | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | 1.1.6 |
#### 高级用法 #### 高级用法
@ -131,35 +131,24 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 是否显示弹窗 | `Boolean` | - | | v-model | 是否显示弹窗 | `Boolean` | - | - |
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| message | 内容 | `String` | - | | message | 内容 | `String` | - | - |
| show-confirm-button | 是否展示确认按钮 | `Boolean` | `true` | | show-confirm-button | 是否展示确认按钮 | `Boolean` | `true` | - |
| show-cancel-button | 是否展示取消按钮 | `Boolean` | `false` | | show-cancel-button | 是否展示取消按钮 | `Boolean` | `false` | - |
| confirm-button-text | 确认按钮的文案 | `String` | `确认` | | confirm-button-text | 确认按钮的文案 | `String` | `确认` | - |
| cancel-button-text | 取消按钮的文案 | `String` | `取消` | | cancel-button-text | 取消按钮的文案 | `String` | `取消` | - |
| overlay | 是否展示蒙层 | `Boolean` | `true` | | overlay | 是否展示蒙层 | `Boolean` | `true` | - |
| close-on-click-overlay | 点击蒙层时是否关闭弹窗 | `Boolean` | `false` | | close-on-click-overlay | 是否在点击蒙层后关闭 | `Boolean` | `false` | - |
| lock-scroll | 是否锁定背景滚动 | `Boolean` | `true` | | lock-scroll | 是否锁定背景滚动 | `Boolean` | `true` | - |
| before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 可以阻止弹窗关闭 | (action: string, done: function) => void | - | | before-close | 关闭前的回调函数,<br>调用 done() 后关闭弹窗,<br>调用 done(false) 阻止弹窗关闭 | `(action, done) => void` | - | 1.1.6 |
| get-container | 指定挂载的节点,可以传入 CSS 选择器,<br>或一个返回 DOM 节点的函数 | `String | () => HTMLElement` | - | | get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | - | 1.1.6 |
### Event ### Event
| 事件 | 说明 | 回调参数 | | 事件 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| confirm | 点击确认按钮时触发 | - | | confirm | 点击确认按钮时触发 | - |
| cancel | 点击取消按钮时触发 | - | | cancel | 点击取消按钮时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.8 | feature | 支持单独传入 title 属性
| 1.1.7 | feature | 支持 className 属性
| 1.1.6 | feature | 新增 get-container 属性
| 1.1.6 | feature | beforeClose 支持通过回调参数控制关闭动作
| 1.0.6 | feature | 新增 before-close 属性, 支持异步关闭
| 1.0.4 | bugfix | 修复未初始化时 close 方法报错的问题

View File

@ -114,7 +114,7 @@ Use button slot to insert button
Field support all native properties of input tagsuch as `maxlength``placeholder``autofocus` Field support all native properties of input tagsuch as `maxlength``placeholder``autofocus`
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| value | Field value | `String | Number` | - | | value | Field value | `String | Number` | - |
| label | Field label | `String` | - | | label | Field label | `String` | - |
| type | Input type | `String` | `text` | | type | Input type | `String` | `text` |
@ -137,7 +137,7 @@ Field support all native properties of input tagsuch as `maxlength`、`placeh
Field support all native events of input tagsuch as `focus``blur``keypress` Field support all native events of input tagsuch as `focus``blur``keypress`
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| click-icon | Triggered when click the icon of Field | - | | click-icon | Triggered when click the icon of Field | - |
| clear | Triggered when click clear icon | - | | clear | Triggered when click clear icon | - |
@ -146,13 +146,13 @@ Field support all native events of input tagsuch as `focus`、`blur`、`keypr
Use ref to get field instance and call instance methods Use ref to get field instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| blur | - | - | Trigger input blur | | blur | - | - | Trigger input blur |
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| label | Custom label | | label | Custom label |
| icon | Custom icon | | icon | Custom icon |
| button | Insert button | | button | Insert button |

View File

@ -115,31 +115,31 @@ Vue.use(Field);
Field 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``autofocus` Field 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``autofocus`
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|------|
| label | 输入框左侧文本 | `String` | - | | label | 输入框左侧文本 | `String` | - | - |
| value | 当前输入的值 | `String | Number` | - | | value | 当前输入的值 | `String | Number` | - | - |
| type | 可设置为任意原生类型, 如 `number` `tel` `textarea` | `String` | `text` | | type | 可设置为原生类型, 如 `number` `tel` `textarea` | `String` | `text` | - |
| border | 是否显示内边框 | `Boolean` | `true` | | border | 是否显示内边框 | `Boolean` | `true` | - |
| disabled | 是否禁用输入框 | `Boolean` | `false` | | disabled | 是否禁用输入框 | `Boolean` | `false` | - |
| readonly | 是否只读 | `Boolean` | `false` | | readonly | 是否只读 | `Boolean` | `false` | - |
| clearable | 是否启用清除控件 | `Boolean` | `false` | | clearable | 是否启用清除控件 | `Boolean` | `false` | 1.1.9 |
| required | 是否显示表单必填星号 | `Boolean` | `false` | | required | 是否显示表单必填星号 | `Boolean` | `false` | - |
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` | | is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` | 1.1.10 |
| error | 是否将输入内容标红 | `Boolean` | `false` | | error | 是否将输入内容标红 | `Boolean` | `false` | - |
| error-message | 底部错误提示文案,为空时不展示 | `String` | `''` | | error-message | 底部错误提示文案,为空时不展示 | `String` | `''` | - |
| label-align | 文本对齐方式,可选值为 `center` `right` | `String` | `left` | | label-align | 文本对齐方式,可选值为 `center` `right` | `String` | `left` | 1.1.10 |
| input-align | 输入框内容对齐方式,可选值为 `center` `right` | `String` | `left` | | input-align | 输入框内容对齐方式,可选值为 `center` `right` | `String` | `left` | 1.1.10 |
| autosize | 自适应内容高度,只对 textarea 有效,可传入对象,<br>如 { maxHeight: 100, minHeight: 50 },单位为 px | `Boolean | Object` | `false` | | autosize | 自适应内容高度,只对 textarea 有效,可传入对象,<br>如 { maxHeight: 100, minHeight: 50 },单位为 px | `Boolean | Object` | `false` | 1.0.0 |
| icon | 输入框尾部图标 (可选值见 Icon 组件) | `String` | - | | icon | 输入框尾部图标,可选值见 Icon 组件 | `String` | - | - |
| left-icon | 输入框左侧图标 (可选值见 Icon 组件) | `String` | - | | left-icon | 输入框左侧图标,可选值见 Icon 组件 | `String` | - | 1.1.4 |
### Event ### Event
Field 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress` Field 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress`
| 事件 | 说明 | 回调参数 | | 事件 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| click-icon | 点击尾部图标时触发 | - | | click-icon | 点击尾部图标时触发 | - |
| clear | 点击清除按钮后触发 | - | | clear | 点击清除按钮后触发 | - |
@ -148,35 +148,13 @@ Field 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
通过 ref 可以获取到 field 实例并调用实例方法 通过 ref 可以获取到 field 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| blur | - | - | 取消输入框焦点 | | blur | - | - | 取消输入框焦点 |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| label | 自定义输入框标签 | | label | 自定义输入框标签 |
| icon | 自定义输入框尾部图标 | | icon | 自定义输入框尾部图标 |
| button | 自定义输入框尾部按钮 | | button | 自定义输入框尾部按钮 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.3 | bugfix | 修复类型为 number 时 maxlength 属性不生效的问题 |
| 1.1.15 | bugfix | 修复 date 类型在 iOS 设备下显示错误的问题
| 1.1.14 | bugfix | 修复行高错误
| 1.1.11 | bugfix | 修复 readonly 状态下在 safari 上出现光标的问题
| 1.1.11 | bugfix | 修复 readonly 状态下仍然会显示清除按钮的问题
| 1.1.10 | feature | 新增 is-link 属性
| 1.1.10 | feature | 新增 input-align 属性
| 1.1.10 | feature | 新增 label-align 属性
| 1.1.9 | feature | 新增 clearable 属性
| 1.1.8 | feature | 新增 blur 方法
| 1.1.7 | feature | 支持 v-model.number
| 1.1.5 | bugfix | 修复在 safari 上不正确的外边距
| 1.1.4 | feature | 新增 left-icon 属性
| 1.1.3 | feature | 新增 label 插槽
| 1.0.8 | bugfix | 修复 number 类型无法输入负数的问题
| 1.0.3 | feature | 新增 button 插槽,支持插入按钮
| 1.0.0 | feature | 支持配置 autosize 最大/最小高度

View File

@ -57,7 +57,7 @@ Use `info` prop to show messages in upper right corner of icon
#### GoodsActionMiniBtn #### GoodsActionMiniBtn
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| text | Button text | `String` | - | | text | Button text | `String` | - |
| icon | Icon | `String` | - | | icon | Icon | `String` | - |
| icon-class | Icon class name | `String` | `''` | | icon-class | Icon class name | `String` | `''` |
@ -70,7 +70,7 @@ Use `info` prop to show messages in upper right corner of icon
#### GoodsActionBigBtn #### GoodsActionBigBtn
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| text | Button text | `String` | - | | text | Button text | `String` | - |
| primary | Is primary button (red color) | `Boolean` | `false` | | primary | Is primary button (red color) | `Boolean` | `false` |
| url | Link | `String` | - | | url | Link | `String` | - |

View File

@ -56,29 +56,22 @@ export default {
#### GoodsActionMiniBtn #### GoodsActionMiniBtn
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| text | 按钮文字 | `String` | - | | text | 按钮文字 | `String` | - | - |
| icon | 图标 | `String` | - | | icon | 图标 | `String` | - | - |
| icon-class | 图标额外类名 | `String` | `''` | | icon-class | 图标额外类名 | `String` | - | - |
| info | 图标右上角提示信息 | `String | Number` | - | | info | 图标右上角提示信息 | `String | Number` | - | - |
| url | 跳转链接 | `String` | - | | url | 跳转链接 | `String` | - | - |
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | | to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
| replace | 跳转时是否替换当前 history | `String` | `false` | | replace | 跳转时是否替换当前 history | `String` | `false` | - |
#### GoodsActionBigBtn #### GoodsActionBigBtn
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| text | 按钮文字 | `String` | - | | text | 按钮文字 | `String` | - | - |
| primary | 是否主行动按钮,主行动按钮默认为红色 | `Boolean` | `false` | | primary | 是否为红色按钮 | `Boolean` | `false` | - |
| url | 跳转链接 | `String` | - | | url | 跳转链接 | `String` | - | - |
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | | to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
| replace | 跳转时是否替换当前 history | `String` | `false` | | replace | 跳转时是否替换当前 history | `String` | `false` | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.4 | bugfix | 修复 info 长度超过三位数时显示错误 |

View File

@ -47,7 +47,7 @@ import 'vant/lib/vant-css/icon-local.css';
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| name | Icon name | `String` | `''` | | name | Icon name | `String` | `''` |
| info | Info message | `String | Number` | `''` | | info | Info message | `String | Number` | `''` |
| color | Icon color | `String` | `inherit` | | color | Icon color | `String` | `inherit` |
@ -58,5 +58,5 @@ import 'vant/lib/vant-css/icon-local.css';
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when click icon | - | | click | Triggered when click icon | - |

View File

@ -50,26 +50,17 @@ import 'vant/lib/vant-css/icon-local.css';
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| name | 图标名称 | `String` | - | | name | 图标名称 | `String` | - | - |
| info | 图标右上角文字提示 | `String | Number` | - | | info | 图标右上角文字提示 | `String | Number` | - | - |
| color | 图标颜色 | `String` | `inherit` | | color | 图标颜色 | `String` | `inherit` | 1.1.3 |
| size | 图标大小,如 `20px``2em` | `String` | `inherit` | | size | 图标大小,如 `20px` `2em` | `String` | `inherit` | 1.1.15 |
| class-prefix | 类名前缀 | `String` | `van-icon` | | class-prefix | 类名前缀 | `String` | `van-icon` | 1.2.1 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击图标时触发 | - | | click | 点击图标时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.2.1 | feature | 新增 class-prefix 属性
| 1.2.0 | bugfix | 修复 size 属性不生效的问题
| 1.1.15 | feature | 新增 size 属性
| 1.1.10 | breaking change | 移除 birthday-privilege、member-day-privilege、balance-details 图标
| 1.1.3 | feature | 新增 color 属性

View File

@ -48,7 +48,7 @@ setTimeout(() => {
### Arguments ### Arguments
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-----------| |------|------|------|------|
| images | Images URL list | `Array` | `[]` | | images | Images URL list | `Array` | `[]` |
| startPosition | Start position | `Number` | `0` | | startPosition | Start position | `Number` | `0` |
| showIndex | Whether to show index | `Boolean` | `true` | | showIndex | Whether to show index | `Boolean` | `true` |

View File

@ -55,20 +55,9 @@ setTimeout(() => {
### 配置项 ### 配置项
| 参数名 | 说明 | 类型 | 默认值 | | 参数名 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-----------| |------|------|------|------|------|
| images | 需要预览的图片 URL 数组 | `Array` | `[]` | | images | 需要预览的图片 URL 数组 | `Array` | `[]` | 1.1.16 |
| startPosition | 图片预览起始位置索引 | `Number` | `0` | | startPosition | 图片预览起始位置索引 | `Number` | `0` | 1.1.16 |
| showIndex | 是否显示页码 | `Boolean` | `true` | | showIndex | 是否显示页码 | `Boolean` | `true` | 1.3.4 |
| onClose | 关闭时的回调函数 | `Function` | - | | onClose | 关闭时的回调函数 | `Function` | - | 1.1.16 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.4 | feature | 新增 showIndex 属性 |
| 1.1.16 | feature | 支持传入 onClose 回调函数
| 1.1.13 | bugfix | 修复 startPosition 属性不生效的问题
| 1.1.3 | bugfix | 修复只有一张图片时无法关闭的问题
| 1.1.1 | bugfix | 修复 offset 计算错误
| 1.0.5 | bugfix | 修复 close 方法失效的问题

View File

@ -48,7 +48,7 @@ Use `v-lazy:background-image` to set background url, and declare the height of t
### Options ### Options
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| loading | Src of the image while loading | `String` | - | | loading | Src of the image while loading | `String` | - |
| error | Src of the image upon load fail | `String` | - | | error | Src of the image upon load fail | `String` | - |
| preload | Proportion of pre-loading height | `String` | - | | preload | Proportion of pre-loading height | `String` | - |

View File

@ -54,15 +54,15 @@ export default {
### Options ### Options
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| loading | 加载时的图片 | `String` | - | | loading | 加载时的图片 | `String` | - | - |
| error | 错误时的图片 | `String` | - | | error | 错误时的图片 | `String` | - | - |
| preload | 预加载高度的比例 | `String` | - | | preload | 预加载高度的比例 | `String` | - | - |
| attempt | 尝试次数 | `Number` | `3` | | attempt | 尝试次数 | `Number` | `3` | - |
| listenEvents | 监听的事件 | `Array` | `scroll`等 | | listenEvents | 监听的事件 | `Array` | `scroll`等 | - |
| adapter | 适配器 | `Object` | - | | adapter | 适配器 | `Object` | - | - |
| filter | 图片url过滤 | `Object` | - | | filter | 图片 URL 过滤 | `Object` | - | - |
| lazyComponent | 是否能懒加载模块 | `Boolean` | `false` | | lazyComponent | 是否能懒加载模块 | `Boolean` | `false` | - |
更多内容请参照:[vue-lazyload 官方文档](https://github.com/hilongjw/vue-lazyload) 更多内容请参照:[vue-lazyload 官方文档](https://github.com/hilongjw/vue-lazyload)

View File

@ -56,7 +56,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| loading | Whether to show loading infothe `load` event will not be triggered when loading | `Boolean` | `false` | | loading | Whether to show loading infothe `load` event will not be triggered when loading | `Boolean` | `false` |
| finished | Whether loading is finishedthe `load` event will not be triggered when finished | `Boolean` | `false` | | finished | Whether loading is finishedthe `load` event will not be triggered when finished | `Boolean` | `false` |
| offset | The load event will be triggered when the distance between the scrollbar and the bottom is less than offset | `Number` | `300` | | offset | The load event will be triggered when the distance between the scrollbar and the bottom is less than offset | `Number` | `300` |
@ -66,7 +66,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| load | Triggered when the distance between the scrollbar and the bottom is less than offset | - | | load | Triggered when the distance between the scrollbar and the bottom is less than offset | - |
### Methods ### Methods
@ -74,12 +74,12 @@ export default {
Use ref to get list instance and call instance methods Use ref to get list instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| check | - | - | Check scroll position | | check | - | - | Check scroll position |
### Slot ### Slot
| Name | Description | | Name | Description |
|-----------|-----------| |------|------|
| - | List content | | - | List content |
| loading | Custom loading tips | | loading | Custom loading tips |

View File

@ -60,18 +60,18 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| loading | 是否处于加载状态,加载过程中不触发`load`事件 | `Boolean` | `false` | | loading | 是否处于加载状态,加载过程中不触发`load`事件 | `Boolean` | `false` | - |
| finished | 是否已加载完成,加载完成后不再触发`load`事件 | `Boolean` | `false` | | finished | 是否已加载完成,加载完成后不再触发`load`事件 | `Boolean` | `false` | - |
| offset | 滚动条与底部距离小于 offset 时触发`load`事件 | `Number` | `300` | | offset | 滚动条与底部距离小于 offset 时触发`load`事件 | `Number` | `300` | - |
| loading-text | 加载中提示文案 | `String` | `加载中...` | | loading-text | 加载中提示文案 | `String` | `加载中...` | 1.1.1 |
| immediate-check | 是否在初始化时立即执行滚动位置检查 | `Boolean` | `true` | | immediate-check | 是否在初始化时立即执行滚动位置检查 | `Boolean` | `true` | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| load | 滚动条与底部距离小于 offset 时触发 | - | | load | 滚动条与底部距离小于 offset 时触发 | - |
### 方法 ### 方法
@ -79,22 +79,12 @@ export default {
通过 ref 可以获取到 list 实例并调用实例方法 通过 ref 可以获取到 list 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| check | - | - | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 | | check | - | - | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 列表内容 | | - | 列表内容 |
| loading | 自定义底部加载中提示 | | loading | 自定义底部加载中提示 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.2 | feature | 新增 loading 插槽
| 1.1.16 | feature | 新增 check 方法
| 1.1.10 | bugfix | 修复不可见时依旧会触发 load 事件的问题
| 1.1.1 | feature | 新增 loading-text 属性
| 1.0.0 | breaking change | 新增组件

View File

@ -26,7 +26,7 @@ Vue.use(Loading);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| color | Loading color | `String` | `#c9c9c9` | | | color | Loading color | `String` | `#c9c9c9` | |
| type | Can be set to `spinner` | `String` | `circular` | | type | Can be set to `spinner` | `String` | `circular` |
| size | Size | `String` | `30px` | | size | Size | `String` | `30px` |

View File

@ -25,14 +25,8 @@ Vue.use(Loading);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| color | 颜色 | `String` | `#c9c9c9` | | color | 颜色 | `String` | `#c9c9c9` | - |
| type | 类型,可选值为 `spinner` | `String` | `circular` | | type | 类型,可选值为 `spinner` | `String` | `circular` | - |
| size | 大小 | `String` | `30px` | | size | 大小 | `String` | `30px` | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | feature | 支持配置为任意颜色 |

View File

@ -32,7 +32,7 @@ Locale.add(messages);
Current supported languages: Current supported languages:
| Language | Filename | | Language | Filename |
|-----------|-----------| |------|------|
| Chinese | zh-CN | | Chinese | zh-CN |
| English | en-US | | English | en-US |
| Traditional Chinese | zh-HK | | Traditional Chinese | zh-HK |

View File

@ -33,7 +33,7 @@ Locale.add(messages);
目前支持的语言: 目前支持的语言:
| 语言 | 文件名 | | 语言 | 文件名 |
|-----------|-----------| |------|------|
| 简体中文 | zh-CN | | 简体中文 | zh-CN |
| 英语 | en-US | | 英语 | en-US |
| 繁體中文 | zh-HK | | 繁體中文 | zh-HK |

View File

@ -47,7 +47,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| title | Title | `String` | `''` | | title | Title | `String` | `''` |
| left-text | Left Text | `String` | `''` | | left-text | Left Text | `String` | `''` |
| right-text | Right Text | `String` | `''` | | right-text | Right Text | `String` | `''` |
@ -58,7 +58,7 @@ export default {
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| title | Custom title | | title | Custom title |
| left | Custom left side content | | left | Custom left side content |
| right | Custom right side content | | right | Custom right side content |
@ -66,6 +66,6 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click-left | Triggered when click left button | - | | click-left | Triggered when click left button | - |
| click-right | Triggered when click right button | - | | click-right | Triggered when click right button | - |

View File

@ -47,19 +47,19 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| title | 标题 | `String` | `''` | | title | 标题 | `String` | `''` | - |
| left-text | 左侧文案 | `String` | `''` | | left-text | 左侧文案 | `String` | `''` | - |
| right-text | 右侧文案 | `String` | `''` | | right-text | 右侧文案 | `String` | `''` | - |
| left-arrow | 是否显示左侧箭头 | `Boolean` | `false` | | left-arrow | 是否显示左侧箭头 | `Boolean` | `false` | - |
| fixed | 是否固定在顶部 | `Boolean` | `false` | | fixed | 是否固定在顶部 | `Boolean` | `false` | - |
| z-index | 元素 z-index | `Number` | `1` | | z-index | 元素 z-index | `Number` | `1` | - |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| title | 自定义标题 | | title | 自定义标题 |
| left | 自定义左侧区域内容 | | left | 自定义左侧区域内容 |
| right | 自定义右侧区域内容 | | right | 自定义右侧区域内容 |
@ -67,12 +67,6 @@ export default {
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click-left | 点击左侧按钮时触发 | - | | click-left | 点击左侧按钮时触发 | - |
| click-right | 点击右侧按钮时触发 | - | | click-right | 点击右侧按钮时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.0.5 | bugfix | 修复标题长度未限制的问题 |

View File

@ -41,7 +41,7 @@ Vue.use(NoticeBar);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| mode | Mode, can be set to `closeable` `link` | `String` | `''` | | mode | Mode, can be set to `closeable` `link` | `String` | `''` |
| delay | Animation delay (s) | `Number` | `1` | | delay | Animation delay (s) | `Number` | `1` |
| speed | Scroll speed (px/s) | `Number` | `50` | | speed | Scroll speed (px/s) | `Number` | `50` |
@ -54,5 +54,5 @@ Vue.use(NoticeBar);
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when click notice bar | - | | click | Triggered when click notice bar | - |

View File

@ -44,18 +44,18 @@ Vue.use(NoticeBar);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| mode | 通告栏模式,可选值为 `closeable` `link` | `String` | `''` | | mode | 通告栏模式,可选值为 `closeable` `link` | `String` | `''` | - |
| delay | 动画延迟时间 (s) | `Number` | `1` | | delay | 动画延迟时间 (s) | `Number` | `1` | - |
| speed | 滚动速率 (px/s) | `Number` | `50` | | speed | 滚动速率 (px/s) | `Number` | `50` | - |
| scrollable | 是否在长度溢出时滚动播放 | `Boolean` | `true` | | scrollable | 是否在长度溢出时滚动播放 | `Boolean` | `true` | - |
| left-icon | 左侧图标图片 URL | `String` | - | | left-icon | 左侧图标图片 URL | `String` | - | - |
| color | 文本颜色 | `String` | `#f60` | | color | 文本颜色 | `String` | `#f60` | - |
| background | 滚动条背景 | `String` | `#fff7cc` | | background | 滚动条背景 | `String` | `#fff7cc` | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击事件回调 | - | | click | 点击事件回调 | - |

View File

@ -62,7 +62,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| show | Whether to show keyboard | `Boolean` | - | | show | Whether to show keyboard | `Boolean` | - |
| theme | Keyboard themecan be set to `default` `custom` | `String` | `default` | | theme | Keyboard themecan be set to `default` `custom` | `String` | `default` |
| title | Keyboard title | `String` | - | | title | Keyboard title | `String` | - |
@ -76,7 +76,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| input | Triggered when keydown | key: Content of the key | | input | Triggered when keydown | key: Content of the key |
| delete | Triggered when press delete key | - | | delete | Triggered when press delete key | - |
| blur | Triggered when click close button | - | | blur | Triggered when click close button | - |

View File

@ -61,31 +61,25 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| show | 是否显示键盘 | `Boolean` | - | | show | 是否显示键盘 | `Boolean` | - | - |
| theme | 样式风格,可选值为 `default` `custom` | `String` | `default` | | theme | 样式风格,可选值为 `default` `custom` | `String` | `default` | - |
| title | 键盘标题 | `String` | - | | title | 键盘标题 | `String` | - | - |
| transition | 是否开启过场动画 | `Boolean` | `true` | | transition | 是否开启过场动画 | `Boolean` | `true` | - |
| z-index | 键盘 z-index | `Number` | `100` | | z-index | 键盘 z-index | `Number` | `100` | - |
| extra-key | 左下角按键内容 | `String` | `''` | | extra-key | 左下角按键内容 | `String` | `''` | - |
| close-button-text | 关闭按钮文字,空则不展示 | `String` | `-` | | close-button-text | 关闭按钮文字,空则不展示 | `String` | `-` | - |
| show-delete-key | 是否展示删除按钮 | `Boolean` | `true` | | show-delete-key | 是否展示删除按钮 | `Boolean` | `true` | - |
| hide-on-click-outside | 点击外部时是否收起键盘 | `Boolean` | `true` | | hide-on-click-outside | 点击外部时是否收起键盘 | `Boolean` | `true` | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| input | 点击按键时触发 | key: 按键内容 | | input | 点击按键时触发 | key: 按键内容 |
| delete | 点击删除键时触发 | - | | delete | 点击删除键时触发 | - |
| close | 点击关闭按钮时触发 | - | | close | 点击关闭按钮时触发 | - |
| blur | 点击关闭按钮或非键盘区域时触发 | - | | blur | 点击关闭按钮或非键盘区域时触发 | - |
| show | 键盘完全弹出时触发 | - | | show | 键盘完全弹出时触发 | - |
| hide | 键盘完全收起时触发 | - | | hide | 键盘完全收起时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.5 | feature | 新增 close 事件 |

View File

@ -53,7 +53,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Current page number | `Number` | - | | v-model | Current page number | `Number` | - |
| mode | Mode, can be set to `simple` `multi` | `String` | `multi` | | mode | Mode, can be set to `simple` `multi` | `String` | `multi` |
| total-items | Total items | `Number` | `0` | | total-items | Total items | `Number` | `0` |
@ -67,5 +67,5 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered on page change | - | | change | Triggered on page change | - |

View File

@ -54,20 +54,20 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前页码 | `Number` | - | | v-model | 当前页码 | `Number` | - | - |
| mode | 显示模式,可选值为 `simple` `multi` | `String` | `multi` | | mode | 显示模式,可选值为 `simple` `multi` | `String` | `multi` | - |
| total-items | 总记录数 | `Number` | `0` | | total-items | 总记录数 | `Number` | `0` | - |
| items-per-page | 每页记录数 | `Number` | `10` | | items-per-page | 每页记录数 | `Number` | `10` | - |
| page-count | 总页数,如果不设置将以 `total-items``items-per-page` 为准进行计算 | `Number` | `-` | | page-count | 总页数 | `Number` | `根据页数计算` | - |
| prev-text | 上一页 | `String` | `上一页` | | prev-text | 上一页 | `String` | `上一页` | - |
| next-text | 下一页 | `String` | `下一页` | | next-text | 下一页 | `String` | `下一页` | - |
| show-page-size | 显示的页码个数 | `Number` | `5` | | show-page-size | 显示的页码个数 | `Number` | `5` | - |
| force-ellipses | 显示省略号 | `Boolean` | `false` | | force-ellipses | 显示省略号 | `Boolean` | `false` | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 页码改变时触发 | - | | change | 页码改变时触发 | - |

View File

@ -32,7 +32,7 @@ Vue.use(Panel);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| icon | Left Icon | `String` | - | | icon | Left Icon | `String` | - |
| title | Title | `String` | - | | title | Title | `String` | - |
| desc | Description | `String` | - | | desc | Description | `String` | - |
@ -42,7 +42,7 @@ Vue.use(Panel);
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Default slot | | - | Default slot |
| header | Custom header | | header | Custom header |
| footer | Custom footer | | footer | Custom footer |

View File

@ -33,17 +33,17 @@ Vue.use(Panel);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| desc | 描述 | `String` | - | | desc | 描述 | `String` | - | - |
| status | 状态 | `String` | - | | status | 状态 | `String` | - | - |
| icon | 标题左侧图标,可选值见 Icon 组件 | `String` | - | | icon | 标题左侧图标,可选值见 Icon 组件 | `String` | - | 1.3.8 |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义内容 | | - | 自定义内容 |
| header | 自定义 header | | header | 自定义 header |
| footer | 自定义 footer | | footer | 自定义 footer |

View File

@ -52,7 +52,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| value | Password value | `String` | `''` | | value | Password value | `String` | `''` |
| length | Maxlength of password | `Number` | `6` | | length | Maxlength of password | `Number` | `6` |
| info | Bottom info | `String` | - | | info | Bottom info | `String` | - |
@ -61,5 +61,5 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| focus | Triggered when input get focused | - | | focus | Triggered when input get focused | - |

View File

@ -51,15 +51,15 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| value | 密码值 | `String` | `''` | | value | 密码值 | `String` | `''` | - |
| length | 密码最大长度 | `Number` | `6` | | length | 密码最大长度 | `Number` | `6` | - |
| info | 输入框下方提示 | `String` | - | | info | 输入框下方文字提示 | `String` | - | - |
| error-info | 输入框下方错误提示 | `String` | - | | error-info | 输入框下方错误提示 | `String` | - | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| focus | 输入框聚焦时触发 | - | | focus | 输入框聚焦时触发 | - |

View File

@ -127,7 +127,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| columns | Columns data | `Array` | `[]` | | columns | Columns data | `Array` | `[]` |
| show-toolbar | Whether to show toolbar | `Boolean` | `false` | | show-toolbar | Whether to show toolbar | `Boolean` | `false` |
| title | Toolbar title | `String` | `''` | | title | Toolbar title | `String` | `''` |
@ -142,7 +142,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
Picker events will pass different parameters according to the columns are single or multiple Picker events will pass different parameters according to the columns are single or multiple
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| confirm | Triggered when click confirm button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes | | confirm | Triggered when click confirm button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes |
| cancel | Triggered when click cancel button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes | | cancel | Triggered when click cancel button | Single columncurrent valuecurrent index<br>Multiple columnscurrent valuescurrent indexes |
| change | Triggered when current option changed | Single columnPicker instance, current valuecurrent index<br>Multiple columnsPicker instance, current valuescolumn index | | change | Triggered when current option changed | Single columnPicker instance, current valuecurrent index<br>Multiple columnsPicker instance, current valuescolumn index |
@ -151,7 +151,7 @@ Picker events will pass different parameters according to the columns are single
### Data struct of columns ### Data struct of columns
| key | Description | | key | Description |
|-----------|-----------| |------|------|
| values | Value of column | | values | Value of column |
| defaultIndex | Default value index | | defaultIndex | Default value index |
| className | ClassName for this column | | className | ClassName for this column |
@ -161,7 +161,7 @@ Picker events will pass different parameters according to the columns are single
Use ref to get picker instance and call instance methods Use ref to get picker instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| getValues | - | values | Get current values of all columns | | getValues | - | values | Get current values of all columns |
| setValues | values | - | Set current values of all columns | | setValues | values | - | Set current values of all columns |
| getIndexes | - | indexes | Get current indexes of all columns | | getIndexes | - | indexes | Get current indexes of all columns |

View File

@ -128,33 +128,35 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | | columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | - |
| show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | | show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | - |
| title | 顶部栏标题 | `String` | `''` | | title | 顶部栏标题 | `String` | `''` | - |
| loading | 是否显示加载状态 | `Boolean` | `false` | | loading | 是否显示加载状态 | `Boolean` | `false` | - |
| value-key | 选项对象中,文字对应的 key | `String` | `text` | | value-key | 选项对象中,文字对应的 key | `String` | `text` | - |
| item-height | 选项高度 | `Number` | `44` | | item-height | 选项高度 | `Number` | `44` | - |
| confirm-button-text | 确认按钮文字 | `String` | `确认` | | confirm-button-text | 确认按钮文字 | `String` | `确认` | - |
| cancel-button-text | 取消按钮文字 | `String` | `取消` | | cancel-button-text | 取消按钮文字 | `String` | `取消` | - |
| visible-item-count | 可见的选项个数 | `Number` | `5` | | visible-item-count | 可见的选项个数 | `Number` | `5` | - |
### Event ### Event
Picker 组件的事件会根据 columns 是单列或多列返回不同的参数 Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 | | confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
| cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 | | cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
| change | 选项改变时触发 | 单列Picker 实例,选中值,选中值对应的索引<br>多列Picker 实例,所有列选中值,当前列对应的索引 | | change | 选项改变时触发 | 单列Picker 实例,选中值,选中值对应的索引<br>多列Picker 实例,所有列选中值,当前列对应的索引 |
### Columns 数据结构 ### Columns 数据结构
当传入多列数据时,`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key` 当传入多列数据时,`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`
| key | 说明 | | key | 说明 |
|-----------|-----------| |------|------|
| values | 列中对应的备选值 | | values | 列中对应的备选值 |
| defaultIndex | 初始选中项的索引,默认为 0 | | defaultIndex | 初始选中项的索引,默认为 0 |
| className | 为对应列添加额外的`class` | | className | 为对应列添加额外的`class` |
@ -164,7 +166,7 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
通过 ref 可以获取到 picker 实例并调用实例方法 通过 ref 可以获取到 picker 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| getValues | - | values | 获取所有列选中的值 | | getValues | - | values | 获取所有列选中的值 |
| setValues | values | - | 设置所有列选中的值 | | setValues | values | - | 设置所有列选中的值 |
| getIndexes | - | indexes | 获取所有列选中值对应的索引 | | getIndexes | - | indexes | 获取所有列选中值对应的索引 |
@ -175,12 +177,3 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
| setColumnIndex | columnIndex, optionIndex | - | 设置对应列选中项的索引 | | setColumnIndex | columnIndex, optionIndex | - | 设置对应列选中项的索引 |
| getColumnValues | columnIndex | values | 获取对应列中所有选项 | | getColumnValues | columnIndex | values | 获取对应列中所有选项 |
| setColumnValue | columnIndex, values | - | 设置对应列中所有选项 | | setColumnValue | columnIndex, values | - | 设置对应列中所有选项 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.13 | bugfix | 修复部分安卓机型下选项高度错误的问题 |
| 1.1.6 | feature | 支持 html 类型的选项 |
| 1.1.0 | bugfix | 修复系统字体大小缩放时布局错乱的问题 |
| 1.0.4 | feature | 支持 Picker 组件所有属性 |

View File

@ -38,11 +38,11 @@ Use `position` prop to set popup display position
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Whether to show popup | `Boolean` | `false` | | v-model | Whether to show popup | `Boolean` | `false` |
| overlay | Whether to show overlay | `Boolean` | `true` | | overlay | Whether to show overlay | `Boolean` | `true` |
| position | Can be set to `top` `bottom` `right` `left` | `String` | - | | position | Can be set to `top` `bottom` `right` `left` | `String` | - |
| overlay-class | Custom overlay class | `String` | `` | | overlay-class | Custom overlay class | `String` | - |
| overlay-style | Custom overlay style | `Object` | - | | overlay-style | Custom overlay style | `Object` | - |
| close-on-click-overlay | Close popup when click overlay | `Boolean` | `true` | | close-on-click-overlay | Close popup when click overlay | `Boolean` | `true` |
| transition | Transition | `String` | `popup-slide` | | transition | Transition | `String` | `popup-slide` |
@ -53,5 +53,5 @@ Use `position` prop to set popup display position
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click-overlay | Triggered when click overlay | - | | click-overlay | Triggered when click overlay | - |

View File

@ -37,34 +37,21 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前组件是否显示 | `Boolean` | `false` | | v-model | 当前组件是否显示 | `Boolean` | `false` | - |
| overlay | 是否显示背景蒙层 | `Boolean` | `true` | | overlay | 是否显示蒙层 | `Boolean` | `true` | - |
| lock-scroll | 是否锁定背景滚动 | `Boolean` | `true` | | position | 位置,可选值为 `top` `bottom` <br> `right` `left` | `String` | - | - |
| position | 可选值为 `top` `bottom` `right` `left` | `String` | - | | overlay-class | 自定义蒙层类名 | `String` | - | - |
| overlay-class | 自定义蒙层 class | `String` | `` | | overlay-style | 自定义蒙层样式 | `Object` | - | - |
| overlay-style | 自定义蒙层样式 | `Object` | `` | | transition | transition 名称 | `String` | - | - |
| close-on-click-overlay | 点击蒙层是否关闭 Popup | `Boolean` | `true` | | get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | - | - |
| transition | transition 名称 | `String` | `popup-slide` | | close-on-click-overlay | 是否在点击蒙层后关闭 | `Boolean` | `true` | - |
| lazy-render | 是否在首次显示弹层时才渲染 DOM 节点 | `Boolean` | `true` | | lock-scroll | 是否锁定背景滚动 | `Boolean` | `true` | 1.0.0 |
| get-container | 指定挂载的节点,可以传入 CSS 选择器,<br>或一个返回 DOM 节点的函数 | `String | () => HTMLElement` | - | | lazy-render | 是否在显示弹层时才渲染节点 | `Boolean` | `true` | 1.1.5 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click-overlay | 点击蒙层时触发 | - | | click-overlay | 点击蒙层时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | feature | get-container 属性支持传入 CSS 选择器
| 1.2.1 | bugfix | 修复使用 get-container 属性时 DOM 不能被正确销毁的问题
| 1.1.8 | bugfix | 修复内容过高时超出屏幕可视范围的问题
| 1.1.5 | feature | 新增 lazy-render 属性
| 1.1.0 | bugfix | 修复多层级关闭时未正确移除 lock-scroll 导致无法滚动的问题
| 1.0.8 | bugfix | 修复 lock-scroll 属性在 iOS 下无效的问题
| 1.0.4 | bugfix | 修复多层弹出时 lock-scroll 失效的问题
| 1.0.0 | breaking change | 新增 lock-scroll 属性,废弃 lock-on-scroll、prevent-scroll 属性

View File

@ -51,7 +51,7 @@ Use `pivot-text` to custom textuse `color` to custom bar color
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| inactive | Whether to be gray | `Boolean` | `false` | | inactive | Whether to be gray | `Boolean` | `false` |
| percentage | Percentage | `Number` | `false` | | percentage | Percentage | `Number` | `false` |
| show-pivot | Whether to show text | `Boolean` | `true` | | show-pivot | Whether to show text | `Boolean` | `true` |

View File

@ -52,20 +52,12 @@ Vue.use(Progress);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| inactive | 是否置灰 | `Boolean` | `false` | | inactive | 是否置灰 | `Boolean` | `false` | - |
| percentage | 进度百分比 | `Number` | `false` | | percentage | 进度百分比 | `Number` | `false` | - |
| show-pivot | 是否显示进度文字 | `Boolean` | `true` | | show-pivot | 是否显示进度文字 | `Boolean` | `true` | - |
| color | 进度条颜色 | `String` | `#38f` | | color | 进度条颜色 | `String` | `#38f` | - |
| text-color | 进度条文字颜色 | `String` | `#fff` | | text-color | 进度条文字颜色 | `String` | `#fff` | - |
| pivot-text | 文字显示 | `String` | 百分比文字 | | pivot-text | 文字显示 | `String` | 百分比文字 | - |
| pivot-color | 文字背景色 | `String` | 与进度条颜色一致 | | pivot-color | 文字背景色 | `String` | 与进度条颜色一致 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.12 | bugfix | 修复文字为空时样式错误的问题 |
| 1.1.5 | bugfix | 修复文字超出边界的问题 |
| 1.1.4 | feature | 支持渐变色 |

View File

@ -42,7 +42,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Loading status | `Boolean` | - | | v-model | Loading status | `Boolean` | - |
| pulling-text | Text to show when pulling | `String` | `Pull to refresh...` | | pulling-text | Text to show when pulling | `String` | `Pull to refresh...` |
| loosing-text | Text to show when loosing | `String` | `Loose to refresh...` | | loosing-text | Text to show when loosing | `String` | `Loose to refresh...` |
@ -55,14 +55,14 @@ export default {
### Event ### Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| refresh | Triggered when pull refresh | - | | refresh | Triggered when pull refresh | - |
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Default slot | | - | Default slot |
| normal | Content of head when at normal status | | normal | Content of head when at normal status |
| pulling | Content of head when at pulling | | pulling | Content of head when at pulling |

View File

@ -10,6 +10,7 @@ Vue.use(PullRefresh);
### 代码演示 ### 代码演示
#### 基础用法 #### 基础用法
下拉刷新时会触发 `refresh` 事件,在事件的回调函数中可以进行同步或异步操作,操作完成后将 `v-model` 设置为 `false`,表示加载完成。 下拉刷新时会触发 `refresh` 事件,在事件的回调函数中可以进行同步或异步操作,操作完成后将 `v-model` 设置为 `false`,表示加载完成。
```html ```html
@ -41,36 +42,28 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 是否在加载中 | `Boolean` | - | | v-model | 是否在加载中 | `Boolean` | - | - |
| pulling-text | 下拉过程中顶部文案 | `String` | `下拉即可刷新...` | | pulling-text | 下拉过程文案 | `String` | `下拉即可刷新...` | - |
| loosing-text | 释放过程中顶部文案 | `String` | `释放即可刷新...` | | loosing-text | 释放过程文案 | `String` | `释放即可刷新...` | - |
| loading-text | 加载过程中顶部文案 | `String` | `加载中...` | | loading-text | 加载过程文案 | `String` | `加载中...` | - |
| animation-duration | 动画时长 | `Number` | `300` | | animation-duration | 动画时长 | `Number` | `300` | - |
| head-height | 顶部内容高度 | `Number` | `50` | | head-height | 顶部内容高度 | `Number` | `50` | - |
| disabled | 是否禁用 | `Boolean` | `false` | | disabled | 是否禁用 | `Boolean` | `false` | 1.1.10 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| refresh | 下拉刷新时触发 | - | | refresh | 下拉刷新时触发 | - |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义内容 | | - | 自定义内容 |
| normal | 非下拉状态时顶部内容 | | normal | 非下拉状态时顶部内容 |
| pulling | 下拉过程中顶部内容 | | pulling | 下拉过程中顶部内容 |
| loosing | 释放过程中顶部内容 | | loosing | 释放过程中顶部内容 |
| loading | 加载过程中顶部内容 | | loading | 加载过程中顶部内容 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.3 | bugfix | 修复在部分情况下提示 preventDefault 警告的问题 |
| 1.1.10 | feature | 新增 disabled 属性 |
| 1.0.0 | feature | 支持手动触发 loading 动画 |

View File

@ -57,7 +57,7 @@ export default {
### Radio API ### Radio API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| name | Radio name | `any` | - | | name | Radio name | `any` | - |
| disabled | Whether to disable radio | `Boolean` | `false` | | disabled | Whether to disable radio | `Boolean` | `false` |
| label-disabled | Whether to disable label click | `Boolean` | `false` | | label-disabled | Whether to disable label click | `Boolean` | `false` |
@ -66,12 +66,12 @@ export default {
### RadioGroup API ### RadioGroup API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Name of checked radio | `any` | - | | v-model | Name of checked radio | `any` | - |
| disabled | Diable all radios | `Boolean` | `false` | | disabled | Diable all radios | `Boolean` | `false` |
### RadioGroup Event ### RadioGroup Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when value changed | current value | | change | Triggered when value changed | current value |

View File

@ -58,30 +58,22 @@ export default {
### Radio API ### Radio API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| name | 标识 Radio 名称 | 任意类型 | - | | name | 标识符 | 任意类型 | - | - |
| disabled | 是否为禁用状态 | `Boolean` | `false` | | disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| label-disabled | 是否禁用文本内容点击 | `Boolean` | `false` | | label-disabled | 是否禁用文本内容点击 | `Boolean` | `false` | 1.1.13 |
| label-position | 文本位置,可选值为 `left` | `String` | `right` | | label-position | 文本位置,可选值为 `left` | `String` | `right` | 1.1.13 |
### RadioGroup API ### RadioGroup API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前选中项的 name | 任意类型 | - | | v-model | 当前选中项的标识符 | 任意类型 | - | - |
| disabled | 是否禁用所有单选框 | `Boolean` | `false` | | disabled | 是否禁用所有单选框 | `Boolean` | `false` | - |
### RadioGroup Event ### RadioGroup Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当绑定值变化时触发的事件 | 当前选中项的 name | | change | 当绑定值变化时触发的事件 | 当前选中项的 name |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.13 | feature | 新增 label-position 属性 |
| 1.1.13 | feature | 新增 label-disabled 属性 |
| 1.0.5 | feature | name 属性支持任意类型 |

View File

@ -46,7 +46,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Current rate | `Number` | - | | v-model | Current rate | `Number` | - |
| count | Count | `Number` | `5` | | count | Count | `Number` | `5` |
| size | Icon size (px) | `Number` | `20` | | size | Icon size (px) | `Number` | `20` |
@ -59,5 +59,5 @@ export default {
### Event ### Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when rate changed | current rate | | change | Triggered when rate changed | current rate |

View File

@ -45,27 +45,19 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前分值 | `Number` | - | | v-model | 当前分值 | `Number` | - | - |
| count | 图标总数 | `Number` | `5` | | count | 图标总数 | `Number` | `5` | - |
| size | 图标大小 (px) | `Number` | `20` | | size | 图标大小 (px) | `Number` | `20` | - |
| color | 选中时的颜色 | `String` | `#ffd21e` | | color | 选中时的颜色 | `String` | `#ffd21e` | - |
| void-color | 未选中时的颜色 | `String` | `#c7c7c7` | | void-color | 未选中时的颜色 | `String` | `#c7c7c7` | - |
| readonly | 是否为只读状态 | `Boolean` | `false` | | readonly | 是否为只读状态 | `Boolean` | `false` | 1.3.0 |
| disabled | 是否禁用评分 | `Boolean` | `false` | | disabled | 是否禁用评分 | `Boolean` | `false` | - |
| disabled-color | 禁用时的颜色 | `String` | `#bdbdbd` | | disabled-color | 禁用时的颜色 | `String` | `#bdbdbd` | - |
### Event ### Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当前分值变化时触发的事件 | 当前分值 | | change | 当前分值变化时触发的事件 | 当前分值 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | feature | 新增 readonly 属性
| 1.1.5 | feature | 新增 change 事件
| 1.1.2 | feature | 新增组件

View File

@ -59,7 +59,7 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
Search support all native properties of input tagsuch as `maxlength``placeholder``readonly``autofocus` Search support all native properties of input tagsuch as `maxlength``placeholder``readonly``autofocus`
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| placeholder | Input placeholder | `String` | - | | placeholder | Input placeholder | `String` | - |
| background | Background color | `String` | `#f2f2f2` | | background | Background color | `String` | `#f2f2f2` |
| show-action | Whether to show right button | `Boolean` | `false` | | show-action | Whether to show right button | `Boolean` | `false` |
@ -68,12 +68,12 @@ Search support all native properties of input tagsuch as `maxlength`、`place
Search support all native events of input tagsuch as `focus``blur``keypress` Search support all native events of input tagsuch as `focus``blur``keypress`
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| cancel | Triggered when click cancel button | - | | cancel | Triggered when click cancel button | - |
| search | Triggered when confirm search | - | | search | Triggered when confirm search | - |
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| action | Custom right button, displayed when `showAction` is true | | action | Custom right button, displayed when `showAction` is true |

View File

@ -48,31 +48,26 @@ Tips: 在 `van-search` 外层增加 form 标签,并且 action 不为空,即
``` ```
### API ### API
Search 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``readony``autofocus`
| 参数 | 说明 | 类型 | 默认值 | Search 默认支持 Input 标签所有的原生属性,比如 `maxlength``placeholder``autofocus`
|-----------|-----------|-----------|-------------|
| background | 搜索框背景色 | `String` | `#f2f2f2` | | 参数 | 说明 | 类型 | 默认值 | 版本 |
| show-action | 是否在搜索框右侧显示取消按钮 | `Boolean` | `false` | |------|------|------|------|------|
| background | 搜索框背景色 | `String` | `#f2f2f2` | - |
| show-action | 是否在搜索框右侧显示取消按钮 | `Boolean` | `false` | - |
| readonly | 是否只读 | `Boolean` | `false` | - |
### Event ### Event
Search 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress` Search 默认支持 Input 标签所有的原生事件,如 `focus``blur``keypress`
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| cancel | 取消搜索 | - | | cancel | 取消搜索 | - |
| search | 确定搜索 | - | | search | 确定搜索 | - |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 | | action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.13 | feature | 点击搜索按钮后自动收起键盘 |
| 1.1.2 | bugfix | 修复错误展示边框的问题 |
| 1.1.1 | bugfix | 修复在 iOS 下文字被遮挡的问题 |

View File

@ -84,7 +84,7 @@ Vue.use(Sku);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Whether to show sku | `Boolean` | `false` | | v-model | Whether to show sku | `Boolean` | `false` |
| sku | Sku data | `Object` | - | | sku | Sku data | `Object` | - |
| goods | Goods info | `Object` | - | | goods | Goods info | `Object` | - |
@ -105,7 +105,7 @@ Vue.use(Sku);
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| add-cart | Triggered when click cart button | data: Object | | add-cart | Triggered when click cart button | data: Object |
| buy-clicked | Triggered when click buy button | data: Object | | buy-clicked | Triggered when click buy button | data: Object |
| stepper-change | Triggered when stepper value changed | value: number | | stepper-change | Triggered when stepper value changed | value: number |
@ -116,13 +116,13 @@ Vue.use(Sku);
Use ref to get sku instance and call instance methods Use ref to get sku instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| getSkuData | - | skuData | Get current skuData | | getSkuData | - | skuData | Get current skuData |
### Slot ### Slot
| Name | Description | | Name | Description |
|-----------|-----------| |------|------|
| sku-header | Custom header | | sku-header | Custom header |
| sku-header-price | Custom header price area | | sku-header-price | Custom header price area |
| sku-body-top | Custom content before sku-group | | sku-body-top | Custom content before sku-group |

View File

@ -81,32 +81,31 @@ Vue.use(Sku);
</van-sku> </van-sku>
``` ```
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 是否显示sku | `Boolean` | `false` | | v-model | 是否显示sku | `Boolean` | `false` | - |
| sku | 商品sku数据 | `Object` | - | | sku | 商品sku数据 | `Object` | - | - |
| goods | 商品信息 | `Object` | - | | goods | 商品信息 | `Object` | - | - |
| goods-id | 商品id | `String | Number` | - | | goods-id | 商品 id | `String | Number` | - | - |
| hide-stock | 是否显示商品剩余库存 | `Boolean` | `false` | | hide-stock | 是否显示商品剩余库存 | `Boolean` | `false` | - |
| show-add-cart-btn | 是否显示加入购物车按钮 | `Boolean` | `true` | | show-add-cart-btn | 是否显示加入购物车按钮 | `Boolean` | `true` | - |
| quota | 限购数(0表示不限购) | `Number` | `0` | | quota | 限购数0 表示不限购 | `Number` | `0` | - |
| quota-used | 已经购买过的数量 | `Number` | `0` | | quota-used | 已经购买过的数量 | `Number` | `0` | - |
| reset-stepper-on-hide | 窗口隐藏时重置选择的商品数量 | `Boolean` | `false` | | reset-stepper-on-hide | 隐藏时重置选择的商品数量 | `Boolean` | `false` | - |
| reset-selected-sku-on-hide | 窗口隐藏时重置已选择的sku | `Boolean` | `false` | | reset-selected-sku-on-hide | 隐藏时重置已选择的 sku | `Boolean` | `false` | - |
| disable-stepper-input | 是否禁用sku中stepper的input框 | `Boolean` | `false` | | disable-stepper-input | 是否禁用步进器输入 | `Boolean` | `false` | - |
| close-on-click-overlay | 点击popup的overlay后是否关闭弹窗 | `Boolean` | `false` | | close-on-click-overlay | 是否在点击蒙层后关闭 | `Boolean` | `false` | - |
| stepper-title | 数量选择组件左侧文案 | `String` | `购买数量` | | stepper-title | 数量选择组件左侧文案 | `String` | `购买数量` | - |
| custom-stepper-config | 步进器相关自定义配置 | `Object` | `{}` | | custom-stepper-config | 步进器相关自定义配置 | `Object` | `{}` | - |
| message-config | 留言相关配置 | `Object` | `{}` | | message-config | 留言相关配置 | `Object` | `{}` | - |
| get-container | 指定挂载的节点,可以传入 CSS 选择器,<br>或一个返回 DOM 节点的函数 | `String | () => HTMLElement` | - | | get-container | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `String | () => HTMLElement` | - | - |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| add-cart | 点击添加购物车回调 | skuData: Object | | add-cart | 点击添加购物车回调 | skuData: Object |
| buy-clicked | 点击购买回调 | skuData: Object | | buy-clicked | 点击购买回调 | skuData: Object |
| stepper-change | 购买数量变化时触发 | value: number | | stepper-change | 购买数量变化时触发 | value: number |
@ -116,7 +115,7 @@ Vue.use(Sku);
通过 ref 可以获取到 sku 实例并调用实例方法 通过 ref 可以获取到 sku 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| getSkuData | - | skuData | 获取当前 skuData | | getSkuData | - | skuData | 获取当前 skuData |
### Slot ### Slot
@ -124,7 +123,7 @@ Vue.use(Sku);
Sku 组件默认划分好了若干区块,这些区块都定义成了插槽,可以按需进行替换。区块顺序见下表: Sku 组件默认划分好了若干区块,这些区块都定义成了插槽,可以按需进行替换。区块顺序见下表:
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| sku-header | 商品信息展示区,包含商品图片、名称、价格等信息 | | sku-header | 商品信息展示区,包含商品图片、名称、价格等信息 |
| sku-header-price | 自定义sku头部价格展示 | | sku-header-price | 自定义sku头部价格展示 |
| sku-body-top | sku展示区上方的slot无默认展示内容按需使用 | | sku-body-top | sku展示区上方的slot无默认展示内容按需使用 |
@ -269,17 +268,3 @@ skuData: {
} }
} }
``` ```
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | breaking change | 考虑到可维护性和实际需求,组件不再支持 i18n 国际化
| 1.3.0 | feature | 支持自定义 validator
| 1.3.0 | feature | 增加对手机号留言的格式校验
| 1.1.10 | feature | 新增 stepper-change 事件
| 1.1.10 | bugfix | 修复图片截断问题
| 1.1.8 | feature | 限制留言最大长度
| 1.0.4 | bugfix | 修复 row 行高错误
| 1.0.2 | bugfix | 修复默认选中不生效的问题
| 1.0.0 | feature | 新增 sku-header-price 插槽

View File

@ -51,7 +51,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------|-------------| |------|------|------|------|------|
| value | Current value | `Number` | `0` | | value | Current value | `Number` | `0` |
| disabled | Whether to disable slider | `Boolean` | `false` | | disabled | Whether to disable slider | `Boolean` | `false` |
| max | Max value | `Number` | `100` | | max | Max value | `Number` | `100` |
@ -62,5 +62,5 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered after value change | value: current rate | | change | Triggered after value change | value: current rate |

View File

@ -49,23 +49,17 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| value | 当前进度百分比 | `Number` | `0` | | value | 当前进度百分比 | `Number` | `0` | 1.1.0 |
| disabled | 是否禁用滑块 | `Boolean` | `false` | | disabled | 是否禁用滑块 | `Boolean` | `false` | 1.1.0 |
| max | 最大值 | `Number` | `100` | | max | 最大值 | `Number` | `100` | 1.1.0 |
| min | 最小值 | `Number` | `0` | | min | 最小值 | `Number` | `0` | 1.1.0 |
| step | 步长 | `Number` | `1` | | step | 步长 | `Number` | `1` | 1.1.0 |
| bar-height | 进度条高度 | `String` | `2px` | | bar-height | 进度条高度 | `String` | `2px` | 1.1.0 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 进度值改变后触发 | value: 当前进度 | | change | 进度值改变后触发 | value: 当前进度 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.0 | feature | 新增组件 |

View File

@ -47,7 +47,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Current value | `String | Number` | Min value | | v-model | Current value | `String | Number` | Min value |
| min | Min value | `String | Number` | `1` | | min | Min value | `String | Number` | `1` |
| max | Max value | `String | Number` | - | | max | Max value | `String | Number` | - |
@ -59,7 +59,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when value change | value: current value | | change | Triggered when value change | value: current value |
| overlimit | Triggered when click disabled button | - | | overlimit | Triggered when click disabled button | - |
| plus | Triggered when click plus button | - | | plus | Triggered when click plus button | - |

View File

@ -48,32 +48,22 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前输入值 | `String | Number` | 最小值 | | v-model | 当前输入值 | `String | Number` | 最小值 | - |
| min | 最小值 | `String | Number` | `1` | | min | 最小值 | `String | Number` | `1` | - |
| max | 最大值 | `String | Number` | - | | max | 最大值 | `String | Number` | - | - |
| step | 步数 | `String | Number` | `1` | | step | 步数 | `String | Number` | `1` | - |
| integer | 是否只允许输入整数 | `Boolean` | `false` | | integer | 是否只允许输入整数 | `Boolean` | `false` | 1.1.1 |
| disabled | 是否禁用 | `Boolean` | `false` | | disabled | 是否禁用步进器 | `Boolean` | `false` | - |
| disable-input | 是否禁用input框 | `Boolean` | `false` | | disable-input | 是否禁用输入框 | `Boolean` | `false` | - |
### Event ### Event
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 | | change | 当绑定值变化时触发的事件 | 当前组件的值 |
| overlimit | 点击不可用的按钮时触发 | - | | overlimit | 点击不可用的按钮时触发 | - |
| plus | 点击增加按钮时触发 | - | | plus | 点击增加按钮时触发 | - |
| minus | 点击减少按钮时触发 | - | | minus | 点击减少按钮时触发 | - |
| blur | 输入框失焦时触发 | - | | blur | 输入框失焦时触发 | - |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.2.1 | bugfix | 修复初始值不能为 0 的问题 |
| 1.1.14 | bugfix | 修复 integer 属性在 Android 上无法生效的问题 |
| 1.1.9 | feature | 输入框失焦且内容为空时,自动补全为最小值 |
| 1.1.2 | bugfix | 修复 integer 属性拼写错误 |
| 1.1.1 | feature | 新增 integer 属性 |

View File

@ -68,7 +68,7 @@ export default {
### Steps API ### Steps API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| active | Active step | `Number` | 0 | | active | Active step | `Number` | 0 |
| icon | Action step icon | `String` | - | | icon | Action step icon | `String` | - |
| icon-class | Icon class | `String` | - | | icon-class | Icon class | `String` | - |
@ -80,6 +80,6 @@ export default {
### Steps Slot ### Steps Slot
| Name | Description | | Name | Description |
|-----------|-----------| |------|------|
| icon | Custom icon | | icon | Custom icon |
| message-extra | Extra content | | message-extra | Extra content |

View File

@ -70,19 +70,19 @@ export default {
### Steps API ### Steps API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| active | 当前步骤 | `Number` | 0 | | active | 当前步骤 | `Number` | 0 | - |
| title | 描述栏标题 | `String` | - | | title | 描述栏标题 | `String` | - | - |
| description | 描述栏文字 | `String` | - | | description | 描述栏文字 | `String` | - | - |
| icon | 描述栏图标 | `String` | - | | icon | 描述栏图标 | `String` | - | - |
| icon-class | 图标额外类名 | `String` | - | | icon-class | 图标额外类名 | `String` | - | - |
| direction | 显示方向,可选值为 `horizontal` `vertical` | `String` | `horizontal` | | direction | 显示方向,可选值为 `vertical` | `String` | `horizontal` | - |
| active-color | 激活状态颜色 | `String` | `#06bf04` | | active-color | 激活状态颜色 | `String` | `#06bf04` | - |
### Steps Slot ### Steps Slot
| Name | 说明 | | Name | 说明 |
|-----------|-----------| |------|------|
| icon | 自定义icon区域 | | icon | 自定义icon区域 |
| message-extra | 状态栏添加额外的元素 | | message-extra | 状态栏添加额外的元素 |

View File

@ -63,7 +63,7 @@ Use slot to add custom contents.
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| price | Price | `Number` | - | | price | Price | `Number` | - |
| label | Price label | `String` | `合计:` | | label | Price label | `String` | `合计:` |
| button-text | Button text | `String` | - | | button-text | Button text | `String` | - |
@ -76,13 +76,13 @@ Use slot to add custom contents.
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| submit | Triggerd when click submit button | - | | submit | Triggerd when click submit button | - |
### Slot ### Slot
| Name | Description | | Name | Description |
|-----------|-----------| |------|------|
| - | Custom left content | | - | Custom left content |
| top | Custom top content | | top | Custom top content |
| tip | Custom tips | | tip | Custom tips |

View File

@ -20,6 +20,7 @@ Vue.use(SubmitBar);
``` ```
#### 禁用状态 #### 禁用状态
禁用状态下不会触发`submit`事件 禁用状态下不会触发`submit`事件
```html ```html
@ -33,6 +34,7 @@ Vue.use(SubmitBar);
``` ```
#### 加载状态 #### 加载状态
加载状态下不会触发`submit`事件 加载状态下不会触发`submit`事件
```html ```html
@ -45,6 +47,7 @@ Vue.use(SubmitBar);
``` ```
#### 高级用法 #### 高级用法
通过插槽插入自定义内容 通过插槽插入自定义内容
```html ```html
@ -62,35 +65,27 @@ Vue.use(SubmitBar);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| price | 价格(单位分) | `Number` | - | | price | 价格(单位分) | `Number` | - | - |
| label | 价格文案 | `String` | `合计:` | | label | 价格文案 | `String` | `合计:` | - |
| button-text | 按钮文字 | `String` | - | | button-text | 按钮文字 | `String` | - | - |
| button-type | 按钮类型 | `String` | `danger` | | button-type | 按钮类型 | `String` | `danger` | - |
| tip | 提示文案 | `String` | - | | tip | 提示文案 | `String` | - | - |
| disabled | 是否禁用按钮 | `Boolean` | `false` | | disabled | 是否禁用按钮 | `Boolean` | `false` | - |
| loading | 是否显示加载中的按钮 | `Boolean` | `false` | | loading | 是否显示加载中的按钮 | `Boolean` | `false` | - |
| currency | 货币符号 | `String` | `¥` | | currency | 货币符号 | `String` | `¥` | 1.0.6 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| submit | 按钮点击事件回调 | - | | submit | 按钮点击事件回调 | - |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义订单栏左侧内容 | | - | 自定义订单栏左侧内容 |
| top | 自定义订单栏上方内容 | | top | 自定义订单栏上方内容 |
| tip | 提示文案中的额外操作和说明 | | tip | 提示文案中的额外操作和说明 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.0.6 | feature | 新增 currency 属性 |
| 1.0.5 | bugfix | 修复字体大小继承错误的问题 |
| 1.0.4 | bugfix | 修复金额保留位数错误的问题 |

View File

@ -59,7 +59,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| left-width | Width of the left scrollable area | `Number` | `0` | | left-width | Width of the left scrollable area | `Number` | `0` |
| right-width | Width of the right scrollable area | `Number` | `0` | | right-width | Width of the right scrollable area | `Number` | `0` |
| on-close | Callback function before close | `Function` | - | | on-close | Callback function before close | `Function` | - |
@ -68,7 +68,7 @@ export default {
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | custom content | | - | custom content |
| left | content of left scrollable area | | left | content of left scrollable area |
| right | content of right scrollabe area | | right | content of right scrollabe area |
@ -76,13 +76,13 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) | | click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) |
### onClose Params ### onClose Params
| Argument | Type | Description | | Argument | Type | Description |
|-----------|-----------|-----------| |------|------|------|
| clickPosition | `String` | Click positon (`left` `right` `cell` `outside`) | | clickPosition | `String` | Click positon (`left` `right` `cell` `outside`) |
| instance | `Object` | SwipeCell instance | | instance | `Object` | SwipeCell instance |
@ -91,6 +91,6 @@ export default {
Use ref to get SwipeCell instance and call instance methods Use ref to get SwipeCell instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| open | position: 'left' \| 'right' | - | open SwipeCell | | open | position: 'left' \| 'right' | - | open SwipeCell |
| close | - | - | close SwipeCell | | close | - | - | close SwipeCell |

View File

@ -58,17 +58,17 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| left-width | 左侧滑动区域宽度 | `Number` | `0` | | left-width | 左侧滑动区域宽度 | `Number` | `0` | - |
| right-width | 右侧滑动区域宽度 | `Number` | `0` | | right-width | 右侧滑动区域宽度 | `Number` | `0` | - |
| on-close | 关闭时的回调函数 | `Function` | - | | on-close | 关闭时的回调函数 | `Function` | - | - |
| disabled | 是否禁用滑动 | `Boolean` | `false` | | disabled | 是否禁用滑动 | `Boolean` | `false` | 1.3.4 |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义显示内容 | | - | 自定义显示内容 |
| left | 左侧滑动内容 | | left | 左侧滑动内容 |
| right | 右侧滑动内容 | | right | 右侧滑动内容 |
@ -76,13 +76,13 @@ export default {
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) | | click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
### onClose 参数 ### onClose 参数
| 参数 | 类型 | 说明 | | 参数 | 类型 | 说明 |
|-----------|-----------|-----------| |------|------|------|
| clickPosition | `String` | 关闭时的点击位置 (`left` `right` `cell` `outside`) | | clickPosition | `String` | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
| instance | `Object` | SwipeCell 实例 | | instance | `Object` | SwipeCell 实例 |
@ -91,16 +91,6 @@ export default {
通过 ref 可以获取到 SwipeCell 实例并调用实例方法 通过 ref 可以获取到 SwipeCell 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| open | position: 'left' \| 'right' | - | 打开单元格侧边栏 | | open | position: `left | right` | - | 打开单元格侧边栏 |
| close | - | - | 收起单元格侧边栏 | | close | - | - | 收起单元格侧边栏 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.4 | feature | 新增 disabled 属性 |
| 1.3.3 | feature | 新增 click 事件 |
| 1.2.0 | breaking change | 组件命名由 CellSwipe 修改为 SwipeCell |
| 1.1.15 | feature | 新增 open 方法 |
| 1.0.5 | bugfix | 修复在垂直滑动时也会触发 Swipe 的问题 |

View File

@ -123,7 +123,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| autoplay | Autoplay interval (ms) | `Number` | - | | autoplay | Autoplay interval (ms) | `Number` | - |
| duration | Animation duration (ms) | `Number` | `500` | | duration | Animation duration (ms) | `Number` | `500` |
| loop | Whether to enable loop | `Boolean` | `true` | | loop | Whether to enable loop | `Boolean` | `true` |
@ -137,7 +137,7 @@ export default {
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when current swipe change | index: index of current swipe | | change | Triggered when current swipe change | index: index of current swipe |
### Methods ### Methods
@ -145,12 +145,12 @@ export default {
Use ref to get swipe instance and call instance methods Use ref to get swipe instance and call instance methods
| Name | Attribute | Return value | Description | | Name | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| swipeTo | index: target index | void | Swipe to target index | | swipeTo | index: target index | void | Swipe to target index |
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Content | | - | Content |
| indicator | Custom indicator | | indicator | Custom indicator |

View File

@ -122,22 +122,22 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| autoplay | 自动轮播间隔,单位为 ms | `Number` | - | | autoplay | 自动轮播间隔,单位为 ms | `Number` | - | - |
| duration | 动画时长,单位为 ms | `Number` | `500` | | duration | 动画时长,单位为 ms | `Number` | `500` | - |
| loop | 是否开启循环播放 | `Boolean` | `true` | | initial-swipe | 初始位置索引值 | `Number` | `0` | - |
| vertical | 是否为纵向滚动 | `Boolean` | `false` | | loop | 是否开启循环播放 | `Boolean` | `true` | - |
| touchable | 是否可以通过手势滑动 | `Boolean` | `true` | | show-indicators | 是否显示指示器 | `Boolean` | `true` | - |
| show-indicators | 是否显示指示器 | `Boolean` | `true` | | vertical | 是否为纵向滚动 | `Boolean` | `false` | 1.1.1 |
| initial-swipe | 初始位置,从 0 开始算 | `Number` | `0` | | touchable | 是否可以通过手势滑动 | `Boolean` | `true` | 1.1.1 |
| width | 设置滑块宽度 | `Number` | `0` | | width | 滑块宽度 | `Number` | `0` | 1.2.1 |
| height | 设置滑块高度 | `Number` | `0` | | height | 滑块高度 | `Number` | `0` | 1.2.1 |
### 事件 ### 事件
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 每一页轮播结束后触发 | index, 当前页的索引 | | change | 每一页轮播结束后触发 | index, 当前页的索引 |
### 方法 ### 方法
@ -145,26 +145,12 @@ export default {
通过 ref 可以获取到 swipe 实例并调用实例方法 通过 ref 可以获取到 swipe 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 | | 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| swipeTo | index: 目标位置的索引 | void | 滚动到目标位置 | | swipeTo | index: 目标位置的索引 | void | 滚动到目标位置 |
### 插槽 ### 插槽
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 轮播内容 | | - | 轮播内容 |
| indicator | 自定义指示器 | | indicator | 自定义指示器 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | bugfix | 修复特定手势下可能出现位置错误的问题
| 1.2.1 | feature | 新增 width、height 属性
| 1.1.15 | feature | 新增 open 方法
| 1.1.13 | bugfix | 修复多指触控时导致空白的问题
| 1.1.12 | bugfix | 修复浏览器滚动时会触发轮播左右滚动的问题
| 1.1.12 | feature | 屏幕大小变化时自动调整宽度
| 1.1.7 | feature | 新增 swipeTo 方法
| 1.1.1 | feature | 新增 touchable 属性
| 1.1.1 | feature | 新增 vertical 属性,支持垂直布局

View File

@ -51,7 +51,7 @@ use `loading` property to keep component in loading state
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | on-off state of the switch | `Boolean` | - | | v-model | on-off state of the switch | `Boolean` | - |
| title | the leftside title | `String` | `''` | | title | the leftside title | `String` | `''` |
| loading | whether switch is loading | `Boolean` | `false` | | loading | whether switch is loading | `Boolean` | `false` |
@ -61,5 +61,5 @@ use `loading` property to keep component in loading state
### Event ### Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | triggered when the on-off state is changed | checked: switch is on or not | | change | triggered when the on-off state is changed | checked: switch is on or not |

View File

@ -50,23 +50,16 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 开关状态 | `Boolean` | - | | v-model | 开关状态 | `Boolean` | - | - |
| title | 左侧标题 | `String` | `''` | | title | 左侧标题 | `String` | `''` | - |
| loading | 是否为加载状态 | `Boolean` | `false` | | loading | 是否为加载状态 | `Boolean` | `false` | - |
| disabled | 是否为禁用状态 | `Boolean` | `false` | | disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| size | 开关尺寸 | `String` | `26px` | | size | 开关尺寸 | `String` | `26px` | 1.1.11 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 开关状态切换回调 | checked: 是否选中开关 | | change | 开关状态切换回调 | checked: 是否选中开关 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.1.11 | feature | 新增 size 属性 |
| 1.0.5 | bugfix | 修复文字未垂直居中的问题 |

View File

@ -68,7 +68,7 @@ export default {
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Check status of Switch | `Boolean` | `false` | | v-model | Check status of Switch | `Boolean` | `false` |
| loading | Whether to show loading icon | `Boolean` | `false` | | loading | Whether to show loading icon | `Boolean` | `false` |
| disabled | Whether to disable switch | `Boolean` | `false` | | disabled | Whether to disable switch | `Boolean` | `false` |
@ -77,5 +77,5 @@ export default {
### Event ### Event
| Event | Description | Parameters | | Event | Description | Parameters |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when check status changed | checked: is switch checked | | change | Triggered when check status changed | checked: is switch checked |

View File

@ -63,21 +63,15 @@ export default {
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 开关选中状态 | `Boolean` | `false` | | v-model | 开关选中状态 | `Boolean` | `false` | - |
| loading | 是否为加载状态 | `Boolean` | `false` | | loading | 是否为加载状态 | `Boolean` | `false` | - |
| disabled | 是否为禁用状态 | `Boolean` | `false` | | disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| size | 开关尺寸 | `String` | `30px` | | size | 开关尺寸 | `String` | `30px` | 1.0.0 |
### Event ### Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 开关状态切换回调 | checked: 是否选中开关 | | change | 开关状态切换回调 | checked: 是否选中开关 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.0.0 | feature | 新增 size 属性 |

View File

@ -137,7 +137,7 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
### Tabs API ### Tabs API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Index of active tab | `String` `Number` | `0` | | v-model | Index of active tab | `String` `Number` | `0` |
| color | Tab color | `String` | `#f44` | | color | Tab color | `String` | `#f44` |
| type | Can be set to `line` `card` | `String` | `line` | | type | Can be set to `line` `card` | `String` | `line` |
@ -151,21 +151,21 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
### Tab API ### Tab API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| title | Title | `String` | - | | title | Title | `String` | - |
| disabled | Whether to disable tab | `Boolean` | `false` | | disabled | Whether to disable tab | `Boolean` | `false` |
### Tab Slot ### Tab Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Content | | - | Content |
| title | Custom tab | | title | Custom tab |
### Tabs Event ### Tabs Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| click | Triggered when click tab | indexindex of current tabtitle: tab title | | click | Triggered when click tab | indexindex of current tabtitle: tab title |
| change | Triggered when active tab changed | indexindex of current tabtitle: tab title | | change | Triggered when active tab changed | indexindex of current tabtitle: tab title |
| disabled | Triggered when click disabled tab | indexindex of current tab, title: tab title | | disabled | Triggered when click disabled tab | indexindex of current tab, title: tab title |

View File

@ -140,63 +140,37 @@ export default {
### Tabs API ### Tabs API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前激活标签的索引 | `String` `Number` | `0` | | v-model | 当前标签的索引 | `String` `Number` | `0` | 1.0.6 |
| color | 标签颜色 | `String` | `#f44` | | color | 标签颜色 | `String` | `#f44` | 1.2.0 |
| type | 样式类型,可选值为`card` | `String` | `line` | | type | 样式类型,可选值为`card` | `String` | `line` | - |
| duration | 动画时间 (单位秒) | `Number` | `0.2` | | duration | 动画时间,单位秒 | `Number` | `0.2` | - |
| line-width | 底部条宽度 (px) | `Number` | 与当前标签等宽 | | line-width | 底部条宽度,单位 px | `Number` | - | 1.1.1 |
| swipe-threshold | 滚动阈值,设置标签数量超过多少个可滚动 | `Number` | `4` | | swipeable | 是否开启手势滑动切换 | `Boolean` | `false` | 1.0.0 |
| sticky | 是否使用粘性定位布局 | `Boolean` | `false` | | sticky | 是否使用粘性定位布局 | `Boolean` | `false` | - |
| offset-top | 粘性定位布局下与顶部的最小距离 (px) | `Number` | `0` | | offset-top | 粘性定位布局下与顶部的最小距离,单位 px | `Number` | `0` | 1.1.15 |
| swipeable | 是否可以滑动内容切换 | `Boolean` | `false` | | swipe-threshold | 滚动阈值,标签数量超过多少个可滚动 | `Number` | `4` | - |
### Tab API ### Tab API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| title | 标题 | `String` | - | | title | 标题 | `String` | - | - |
| disabled | 是否禁用标签 | `Boolean` | `false` | | disabled | 是否禁用标签 | `Boolean` | `false` | - |
### Tab Slot ### Tab Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 标签页内容 | | - | 标签页内容 |
| title | 自定义标签 | | title | 自定义标签 |
### Tabs Event ### Tabs Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| click | 点击标签时触发 | index标签索引title标题 | | click | 点击标签时触发 | index标签索引title标题 |
| change | 当前激活的标签改变时触发 | index标签索引title标题 | | change | 当前激活的标签改变时触发 | index标签索引title标题 |
| disabled | 点击被禁用的标签时触发 | index标签索引title标题 | | disabled | 点击被禁用的标签时触发 | index标签索引title标题 |
| scroll | 滚动时触发 | Object: { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } | | scroll | 滚动时触发 | { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.1 | bugfix | 修复使用 card 主题时 color 属性不生效的问题
| 1.3.0 | feature | 新增 scroll 事件
| 1.3.0 | bugfix | 修复能通过手势滑动至禁用标签的问题
| 1.2.1 | bugfix | 修复使用 color 属性时下划线样式错误的问题
| 1.2.0 | feature | 新增 color 属性
| 1.1.15 | feature | 新增 offset-top 属性
| 1.1.14 | feature | 新增 change 事件
| 1.1.14 | bugfix | 修复路由切换时标签位置错误的问题
| 1.1.14 | bugfix | 修复 sticky 属性在局部滚动元素下无法生效的问题
| 1.1.12 | bugfix | 修复同时进行插入和删除时顺序错误的问题
| 1.1.11 | bugfix | 修复动态渲染时顺序错误的问题
| 1.1.9 | bugfix | 修复屏幕尺寸变化时未重新渲染的问题
| 1.1.8 | bugfix | 修复标题长度变化时底部条未重新渲染的问题
| 1.1.6 | bugfix | 修复 title 插槽渲染无法更新的问题
| 1.1.2 | bugfix | 修复初始化时的渲染问题
| 1.1.1 | feature | 新增 line-width 属性
| 1.0.6 | feature | 支持 v-model 绑定当前 active 标签
| 1.0.3 | feature | 布局方式由 table 升级为 flex-box
| 1.0.3 | feature | click 事件回调新增 title 参数
| 1.0.2 | bugfix | 修复内容无法点击的问题
| 1.0.0 | feature | 支持通过滑动手势进行切换

View File

@ -65,7 +65,7 @@ export default {
### Tabbar API ### Tabbar API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| v-model | Index of current tab | `Number` | - | | v-model | Index of current tab | `Number` | - |
| fixed | Whether to fixed bottom | `Boolean` | `true` | | fixed | Whether to fixed bottom | `Boolean` | `true` |
| z-index | Z-index | `Number` | `1` | | z-index | Z-index | `Number` | `1` |
@ -73,13 +73,13 @@ export default {
### Tabbar Event ### Tabbar Event
| Event | Description | Arguments | | Event | Description | Arguments |
|-----------|-----------|-----------| |------|------|------|
| change | Triggered when change active tab | active: index of current tab | | change | Triggered when change active tab | active: index of current tab |
### TabbarItem API ### TabbarItem API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| icon | Icon name | `String` | - | | icon | Icon name | `String` | - |
| dot | Whether to show red dot | `Boolean` | - | | dot | Whether to show red dot | `Boolean` | - |
| info | Info message | `String | Number` | - | | info | Info message | `String | Number` | - |
@ -90,5 +90,5 @@ export default {
### TabbarItem Slot ### TabbarItem Slot
| Name | Description | slot-scope | | Name | Description | slot-scope |
|-----------|-----------|-----------| |------|------|------|
| icon | Custom icon | active | | icon | Custom icon | active |

View File

@ -67,39 +67,31 @@ export default {
### Tabbar API ### Tabbar API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| v-model | 当前选中标签的索引 | `Number` | - | | v-model | 当前选中标签的索引 | `Number` | - | - |
| fixed | 是否固定在底部 | `Boolean` | `true` | | fixed | 是否固定在底部 | `Boolean` | `true` | - |
| z-index | 元素 z-index | `Number` | `1` | | z-index | 元素 z-index | `Number` | `1` | 1.1.9 |
### Tabbar Event ### Tabbar Event
| 事件名 | 说明 | 参数 | | 事件名 | 说明 | 参数 |
|-----------|-----------|-----------| |------|------|------|
| change | 切换标签时触发 | active: 当前选中标签 | | change | 切换标签时触发 | active: 当前选中标签 |
### TabbarItem API ### TabbarItem API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-----------| |------|------|------|------|------|
| icon | 图标名称 (可选值见 Icon 组件) | `String` | - | | icon | 图标名称 (可选值见 Icon 组件) | `String` | - | - |
| dot | 是否显示小红点 | `Boolean` | - | | dot | 是否显示小红点 | `Boolean` | - | - |
| info | 图标右上角提示信息 | `String | Number` | - | | info | 图标右上角提示信息 | `String | Number` | - | - |
| url | 跳转链接 | `String` | - | | url | 跳转链接 | `String` | - | - |
| to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | | to | 路由跳转对象,同 `vue-router` 的 to | `String | Object` | - | - |
| replace | 跳转时是否替换当前 history | `String` | `false` | | replace | 跳转时是否替换当前 history | `String` | `false` | - |
### TabbarItem Slot ### TabbarItem Slot
| 名称 | 说明 | slot-scope | | 名称 | 说明 | slot-scope |
|-----------|-----------|-----------| |------|------|------|
| icon | 自定义图标 | active: 是否为选中标签 | | icon | 自定义图标 | active: 是否为选中标签 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.0 | bugfix | 修复使用 icon 插槽时 info 属性不生效的问题 |
| 1.1.15 | bugfix | 修复点击当前标签时依然会触发 change 事件的问题 |
| 1.1.9 | feature | 新增 z-index 属性 |

View File

@ -65,7 +65,7 @@ Vue.use(Tag);
### API ### API
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| type | Type, can be set to `primary` `success` `danger` | `String` | - | | type | Type, can be set to `primary` `success` `danger` | `String` | - |
| size | Size, can be set to `large` `medium` | `String` | - | | size | Size, can be set to `large` `medium` | `String` | - |
| color | Custom color | `String` | - | | color | Custom color | `String` | - |
@ -76,5 +76,5 @@ Vue.use(Tag);
### Slot ### Slot
| name | Description | | name | Description |
|-----------|-----------| |------|------|
| - | Default slot | | - | Default slot |

View File

@ -68,24 +68,17 @@ Vue.use(Tag);
### API ### API
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|-----------|-----------|-----------|-------------| |------|------|------|------|------|
| type | 类型,可选值为`primary` `success` `danger` | `String` | - | | type | 类型,可选值为`primary` `success` `danger` | `String` | - | - |
| size | 大小, 可选值为`large` `medium` | `String` | - | | size | 大小, 可选值为`large` `medium` | `String` | - | 1.3.8 |
| color | 自定义标签颜色 | `String` | - | | color | 自定义标签颜色 | `String` | - | 1.3.8 |
| plain | 是否为空心样式 | `Boolean` | `false` | | plain | 是否为空心样式 | `Boolean` | `false` | - |
| round | 是否为圆角样式 | `Boolean` | `false` | | round | 是否为圆角样式 | `Boolean` | `false` | 1.3.8 |
| mark | 是否为标记样式 | `Boolean` | `false` | | mark | 是否为标记样式 | `Boolean` | `false` | - |
### Slot ### Slot
| 名称 | 说明 | | 名称 | 说明 |
|-----------|-----------| |------|------|
| - | 自定义 Tag 显示内容 | | - | 自定义 Tag 显示内容 |
### 更新日志
| 版本 | 类型 | 内容 |
|-----------|-----------|-----------|
| 1.3.3 | bugfix | 修复边框颜色错误的问题 |
| 1.0.3 | bugfix | 修复文字在部分安卓手机上未垂直居中的问题 |

View File

@ -84,7 +84,7 @@ toast2.clear();
### Methods ### Methods
| Methods | Attribute | Return value | Description | | Methods | Attribute | Return value | Description |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| Toast | `options | message` | toast instance | Show toast | | Toast | `options | message` | toast instance | Show toast |
| Toast.loading | `options | message` | toast instance | Show loading toast | | Toast.loading | `options | message` | toast instance | Show loading toast |
| Toast.success | `options | message` | toast instance | Show success toast | | Toast.success | `options | message` | toast instance | Show success toast |
@ -97,7 +97,7 @@ toast2.clear();
### Options ### Options
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|-----------|-----------|-----------|-------------| |------|------|------|------|
| type | Can be set to `loading` `success` `fail` `html` | `String` | `text` | | type | Can be set to `loading` `success` `fail` `html` | `String` | `text` |
| position | Can be set to `top` `middle` `bottom` | `String` | `middle` | | position | Can be set to `top` `middle` `bottom` | `String` | `middle` |
| message | Message | `String` | `''` | | message | Message | `String` | `''` |

Some files were not shown because too many files have changed in this diff Show More