docs: update method table (#4511)

This commit is contained in:
neverland 2019-09-20 10:26:54 +08:00 committed by GitHub
parent 0c38d4af6e
commit 76ac9f71d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 103 additions and 103 deletions

View File

@ -103,9 +103,9 @@ export default {
Use ref to get address-edit instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| setAddressDetail | addressDetail: string | - | Set address detail |
| setAddressDetail | Set address detail | addressDetail: string | - |
### AddressInfo Data Structure

View File

@ -103,9 +103,9 @@ export default {
通过 ref 可以获取到 address-edit 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| setAddressDetail | addressDetail: string | - | 设置详细地址 |
| setAddressDetail | 设置详细地址 | addressDetail: string | - |
### AddressInfo 数据格式

View File

@ -69,9 +69,9 @@ Set `columns-num` with 2, you'll have a 2 level picker.
Use ref to get area instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| reset | code: string | - | Reset all options by code |
| reset | Reset all options by code | code: string | - |
### areaList Data Structure

View File

@ -68,9 +68,9 @@ Vue.use(Area);
通过 ref 可以获取到 area 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| reset | code: string | - | 根据 code 重置所有选项,若不传 code则重置到第一项 |
| reset | 根据 code 重置所有选项,若不传 code则重置到第一项 | code: string | - |
### 省市区列表数据格式

View File

@ -188,6 +188,6 @@ export default {
Use ref to get checkbox instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| toggle | - | - | Toggle check status |
| toggle | Toggle check status | - | - |

View File

@ -190,6 +190,6 @@ export default {
通过 ref 可以获取到 checkbox 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| toggle | - | - | 切换选中状态 |
| toggle | 切换选中状态 | - | - |

View File

@ -144,8 +144,8 @@ export default {
Use ref to get CountDown instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| start | - | - | Start count down |
| pause | - | - | Pause count down |
| reset | - | - | Reset count down |
| start | Start count down | - | - |
| pause | Pause count down | - | - |
| reset | Reset count down | - | - |

View File

@ -154,8 +154,8 @@ export default {
通过 ref 可以获取到 CountDown 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| start | - | - | 开始倒计时 |
| pause | - | - | 暂停倒计时 |
| reset | - | - | 重设倒计时,若`auto-start``true`,重设后会自动开始倒计时 |
| start | 开始倒计时 | - | - |
| pause | 暂停倒计时 | - | - |
| reset | 重设倒计时,若`auto-start``true`,重设后会自动开始倒计时 | - | - |

View File

@ -105,14 +105,14 @@ export default {
### Methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| Dialog | `options` | `Promise` | Show dialog |
| Dialog.alert | `options` | `Promise` | Show alert dialog |
| Dialog.confirm | `options` | `Promise` | Show confim dialog |
| Dialog.setDefaultOptions | `options` | `void` | Set default options of all dialogs |
| Dialog.resetDefaultOptions | - | `void` | Reset default options of all dialogs |
| Dialog.close | - | `void` | Close dialog |
| Dialog | Show dialog | `options` | `Promise` |
| Dialog.alert | Show alert dialog | `options` | `Promise` |
| Dialog.confirm | Show confim dialog | `options` | `Promise` |
| Dialog.setDefaultOptions | Set default options of all dialogs | `options` | `void` |
| Dialog.resetDefaultOptions | Reset default options of all dialogs | - | `void` |
| Dialog.close | Close dialog | - | `void` |
### Options

View File

@ -132,14 +132,14 @@ export default {
### 方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| Dialog | `options` | `Promise` | 展示弹窗 |
| Dialog.alert | `options` | `Promise` | 展示消息提示弹窗 |
| Dialog.confirm | `options` | `Promise` | 展示消息确认弹窗 |
| Dialog.setDefaultOptions | `options` | `void` | 修改默认配置,对所有 Dialog 生效 |
| Dialog.resetDefaultOptions | - | `void` | 重置默认配置,对所有 Dialog 生效 |
| Dialog.close | - | `void` | 关闭弹窗 |
| Dialog | 展示弹窗 | `options` | `Promise` |
| Dialog.alert | 展示消息提示弹窗 | `options` | `Promise` |
| Dialog.confirm | 展示消息确认弹窗 | `options` | `Promise` |
| Dialog.setDefaultOptions | 修改默认配置,对所有 Dialog 生效 | `options` | `void` |
| Dialog.resetDefaultOptions | 重置默认配置,对所有 Dialog 生效 | - | `void` |
| Dialog.close | 关闭弹窗 | - | `void` |
### Options
@ -153,10 +153,10 @@ export default {
| className | 自定义类名 | *any* | - | - |
| showConfirmButton | 是否展示确认按钮 | *boolean* | `true` | - |
| showCancelButton | 是否展示取消按钮 | *boolean* | `false` | - |
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
| confirmButtonText | 确认按钮文案 | *string* | `确认` | - |
| confirmButtonColor | 确认按钮颜色 | *string* | `#1989fa` | - |
| cancelButtonText | 取消按钮文案 | *string* | `取消` | - |
| cancelButtonColor | 取消按钮颜色 | *string* | `#000` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| closeOnPopstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| closeOnClickOverlay | 点击遮罩层时是否关闭弹窗 | *boolean* | `false` | - |
@ -172,14 +172,14 @@ export default {
|------|------|------|------|------|
| v-model | 是否显示弹窗 | *boolean* | - | - |
| title | 标题 | *string* | - | - |
| message | 内容 | *string* | - | - |
| message | 文本内容,支持通过`\n`换行 | *string* | - | - |
| message-align | 内容对齐方式,可选值为`left` `right` | *string* | `center` | - |
| show-confirm-button | 是否展示确认按钮 | *boolean* | `true` | - |
| show-cancel-button | 是否展示取消按钮 | *boolean* | `false` | - |
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
| confirm-button-text | 确认按钮文案 | *string* | `确认` | - |
| confirm-button-color | 确认按钮颜色 | *string* | `#1989fa` | - |
| cancel-button-text | 取消按钮文案 | *string* | `取消` | - |
| cancel-button-color | 取消按钮颜色 | *string* | `#000` | - |
| overlay | 是否展示遮罩层 | *boolean* | `true` | - |
| close-on-popstate | 是否在页面回退时自动关闭 | *boolean* | `false` | 2.0.5 |
| close-on-click-overlay | 是否在点击遮罩层后关闭 | *boolean* | `false` | - |

View File

@ -143,9 +143,9 @@ Use `active-color` prop to custom active color of the title and options
Use ref to get DropdownItem instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| toggle | show: boolean | - | Toggle display |
| toggle | Toggle display | show: boolean | - |
### Data Structure of Option

View File

@ -147,9 +147,9 @@ export default {
通过 ref 可以获取到 DropdownItem 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| toggle | show: boolean | - | 切换菜单是否展示 |
| toggle | 切换菜单是否展示 | show: boolean | - |
### Option 数据结构

View File

@ -165,10 +165,10 @@ Field support all native events of input tag
Use ref to get field instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| focus | - | - | Trigger input focus |
| blur | - | - | Trigger input blur |
| focus | Trigger input focus | - | - |
| blur | Trigger input blur | - | - |
### Slots

View File

@ -169,10 +169,10 @@ Vue.use(Field);
通过 ref 可以获取到 field 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| focus | - | - | 获取输入框焦点 |
| blur | - | - | 取消输入框焦点 |
| focus | 获取输入框焦点 | - | - |
| blur | 取消输入框焦点 | - | - |
### Slots

View File

@ -122,9 +122,9 @@ export default {
Use ref to get list instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| check | - | - | Check scroll position |
| check | Check scroll position | - | - |
### Slots

View File

@ -158,9 +158,9 @@ List 初始化后会触发一次 load 事件,用于加载第一屏的数据,
通过 ref 可以获取到 list 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| check | - | - | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 |
| check | 检查当前的滚动位置,若已滚动至底部,则会触发 load 事件 | - | - |
### Slots

View File

@ -68,12 +68,12 @@ export default {
### 方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| Notify | `options | message` | notify 实例 | 展示提示 |
| Notify.clear | - | `void` | 关闭提示 |
| Notify.setDefaultOptions | `options` | `void` | 修改默认配置,对所有 Notify 生效 |
| Notify.resetDefaultOptions | - | `void` | 重置默认配置,对所有 Notify 生效 |
| Notify | 展示提示 | `options | message` | notify 实例 |
| Notify.clear | 关闭提示 | - | `void` |
| Notify.setDefaultOptions | 修改默认配置,对所有 Notify 生效 | `options` | `void` |
| Notify.resetDefaultOptions | 重置默认配置,对所有 Notify 生效 | - | `void` |
### Options

View File

@ -227,15 +227,15 @@ Picker events will pass different parameters according to the columns are single
Use ref to get picker instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| getValues | - | values | Get current values of all columns |
| setValues | values | - | Set current values of all columns |
| getIndexes | - | indexes | Get current indexes of all columns |
| setIndexes | indexes | - | Set current indexes of all columns |
| getColumnValue | columnIndex | value | Get current value of the column |
| setColumnValue | columnIndex, value | - | Set current value of the column |
| getColumnIndex | columnIndex | optionIndex | Get current index of the column |
| setColumnIndex | columnIndex, optionIndex | - | Set current index of the column |
| getColumnValues | columnIndex | values | Get columns data of the column |
| setColumnValues | columnIndex, values | - | Set columns data of the column |
| getValues | Get current values of all columns | - | values |
| setValues | Set current values of all columns | values | - |
| getIndexes | Get current indexes of all columns | - | indexes |
| setIndexes | Set current indexes of all columns | indexes | - |
| getColumnValue | Get current value of the column | columnIndex | value |
| setColumnValue | Set current value of the column | columnIndex, value | - |
| getColumnIndex | Get current index of the column | columnIndex | optionIndex |
| setColumnIndex | Set current index of the column | columnIndex, optionIndex | - |
| getColumnValues | Get columns data of the column | columnIndex | values |
| setColumnValues | Set columns data of the column | columnIndex, values | - |

View File

@ -237,15 +237,15 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
通过 ref 可以获取到 picker 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| getValues | - | values | 获取所有列选中的值 |
| setValues | values | - | 设置所有列选中的值 |
| getIndexes | - | indexes | 获取所有列选中值对应的索引 |
| setIndexes | indexes | - | 设置所有列选中值对应的索引 |
| getColumnValue | columnIndex | value | 获取对应列选中的值 |
| setColumnValue | columnIndex, value | - | 设置对应列选中的值 |
| getColumnIndex | columnIndex | optionIndex | 获取对应列选中项的索引 |
| setColumnIndex | columnIndex, optionIndex | - | 设置对应列选中项的索引 |
| getColumnValues | columnIndex | values | 获取对应列中所有选项 |
| setColumnValues | columnIndex, values | - | 设置对应列中所有选项 |
| getValues | 获取所有列选中的值 | - | values |
| setValues | 设置所有列选中的值 | values | - |
| getIndexes | 获取所有列选中值对应的索引 | - | indexes |
| setIndexes | 设置所有列选中值对应的索引 | indexes | - |
| getColumnValue | 获取对应列选中的值 | columnIndex | value |
| setColumnValue | 设置对应列选中的值 | columnIndex, value | - |
| getColumnIndex | 获取对应列选中项的索引 | columnIndex | optionIndex |
| setColumnIndex | 设置对应列选中项的索引 | columnIndex, optionIndex | - |
| getColumnValues | 获取对应列中所有选项 | columnIndex | values |
| setColumnValues | 设置对应列中所有选项 | columnIndex, values | - |

View File

@ -157,9 +157,9 @@ export default {
Use ref to get sku instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| getSkuData | - | skuData | Get current skuData |
| getSkuData | Get current skuData | - | skuData |
### Slots

View File

@ -161,9 +161,9 @@ export default {
通过 ref 可以获取到 sku 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| getSkuData | - | skuData | 获取当前 skuData |
| getSkuData | 获取当前 skuData | - | skuData |
### Slots

View File

@ -106,7 +106,7 @@ export default {
Use ref to get SwipeCell instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| open | position: `left | right` | - | open SwipeCell |
| close | - | - | close SwipeCell |
| open | open SwipeCell | position: `left | right` | - |
| close | close SwipeCell | - | - |

View File

@ -111,7 +111,7 @@ export default {
通过 ref 可以获取到 SwipeCell 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| open | position: `left | right` | - | 打开单元格侧边栏 |
| close | - | - | 收起单元格侧边栏 |
| open | 打开单元格侧边栏 | position: `left | right` | - |
| close | 收起单元格侧边栏 | - | - |

View File

@ -155,9 +155,9 @@ export default {
Use ref to get swipe instance and call instance methods
| Name | Attribute | Return value | Description |
| Name | Description | Attribute | Return value |
|------|------|------|------|
| swipeTo | index: target index, options: Options | void | Swipe to target index |
| swipeTo | Swipe to target index | index: target index, options: Options | void |
### swipeTo Options

View File

@ -161,9 +161,9 @@ export default {
通过 ref 可以获取到 swipe 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| swipeTo | index: 目标位置的索引, options: 选项 | void | 滚动到目标位置 |
| swipeTo | 滚动到目标位置 | index: 目标位置的索引, options: 选项 | void |
### swipeTo Options 格式

View File

@ -99,16 +99,16 @@ toast2.clear();
### 方法
| 方法名 | 参数 | 返回值 | 介绍 |
| 方法名 | 说明 | 参数 | 返回值 |
|------|------|------|------|
| Toast | `options | message` | toast 实例 | 展示提示 |
| Toast.loading | `options | message` | toast 实例 | 展示加载提示 |
| Toast.success | `options | message` | toast 实例 | 展示成功提示 |
| Toast.fail | `options | message` | toast 实例 | 展示失败提示 |
| Toast.clear | `clearAll: boolean` | `void` | 关闭提示 |
| Toast.allowMultiple | - | `void` | 允许同时存在多个 Toast |
| Toast.setDefaultOptions | `options` | `void` | 修改默认配置,对所有 Toast 生效 |
| Toast.resetDefaultOptions | - | `void` | 重置默认配置,对所有 Toast 生效 |
| Toast | 展示提示 | `options | message` | toast 实例 |
| Toast.loading | 展示加载提示 | `options | message` | toast 实例 |
| Toast.success | 展示成功提示 | `options | message` | toast 实例 |
| Toast.fail | 展示失败提示 | `options | message` | toast 实例 |
| Toast.clear | 关闭提示 | `clearAll: boolean` | `void` |
| Toast.allowMultiple | 允许同时存在多个 Toast | - | `void` |
| Toast.setDefaultOptions | 修改默认配置,对所有 Toast 生效 | `options` | `void` |
| Toast.resetDefaultOptions | 重置默认配置,对所有 Toast 生效 | - | `void` |
### Options