docs: type highlight (#4264)

This commit is contained in:
neverland
2019-08-27 22:09:21 +08:00
committed by GitHub
parent a79750d00c
commit ecbdc2bede
129 changed files with 1493 additions and 1484 deletions
+15 -15
View File
@@ -137,10 +137,10 @@ export default {
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| type | Can be set to `add` `edit` | `string` | `add` | - |
| name | Name | `string` | - | - |
| tel | Phone | `string` | - | - |
| add-text | Add card text | `string` | `Add contact info` | - |
| type | Can be set to `add` `edit` | *string* | `add` | - |
| name | Name | *string* | - | - |
| tel | Phone | *string* | - | - |
| add-text | Add card text | *string* | `Add contact info` | - |
### ContactCard Events
@@ -152,9 +152,9 @@ export default {
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| v-model | Id of chosen contact | `string | number` | - | - |
| list | Contact list | `Contact[]` | `[]` | - |
| add-text | Add button text | `string` | `Add new contact` | - |
| v-model | Id of chosen contact | *string \| number* | - | - |
| list | Contact list | *Contact[]* | `[]` | - |
| add-text | Add button text | *string* | `Add new contact` | - |
### ContactList Events
@@ -168,11 +168,11 @@ export default {
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| contact-info | Contact Info | `object` | `[]` | - |
| is-edit | Whether is editing | `boolean` | `false` | - |
| is-saving | Whether to show save button loading status | `boolean` | `false` | - |
| is-deleting | Whether to show delete button loading status | `boolean` | `false` | - |
| tel-validator | The method to validate tel | `(tel: string) => boolean` | - | - |
| contact-info | Contact Info | *object* | `[]` | - |
| is-edit | Whether is editing | *boolean* | `false` | - |
| is-saving | Whether to show save button loading status | *boolean* | `false` | - |
| is-deleting | Whether to show delete button loading status | *boolean* | `false` | - |
| tel-validator | The method to validate tel | *(tel: string) => boolean* | - | - |
### ContactEdit Events
@@ -185,6 +185,6 @@ export default {
| key | Description | Type |
|------|------|------|
| id | ID | `string | number` |
| name | Name | `string` |
| tel | Phone | `string` |
| id | ID | *string \| number* |
| name | Name | *string* |
| tel | Phone | *string* |
+15 -15
View File
@@ -141,10 +141,10 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| type | 类型,可选值为 `add` `edit` | `string` | `add` | - |
| name | 联系人姓名 | `string` | - | - |
| tel | 联系人手机号 | `string` | - | - |
| add-text | 添加时的文案提示 | `string` | `添加订单联系人信息` | - |
| type | 类型,可选值为 `add` `edit` | *string* | `add` | - |
| name | 联系人姓名 | *string* | - | - |
| tel | 联系人手机号 | *string* | - | - |
| add-text | 添加时的文案提示 | *string* | `添加订单联系人信息` | - |
### ContactCard Events
@@ -156,9 +156,9 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| v-model | 当前选中联系人的 id | `string | number` | - | - |
| list | 联系人列表 | `Contact[]` | `[]` | - |
| add-text | 新建按钮文案 | `string` | `新建联系人` | - |
| v-model | 当前选中联系人的 id | *string \| number* | - | - |
| list | 联系人列表 | *Contact[]* | `[]` | - |
| add-text | 新建按钮文案 | *string* | `新建联系人` | - |
### ContactList Events
@@ -172,11 +172,11 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| contact-info | 联系人信息 | `object` | `[]` | - |
| is-edit | 是否为编辑联系人 | `boolean` | `false` | - |
| is-saving | 是否显示保存按钮加载动画 | `boolean` | `false` | - |
| is-deleting | 是否显示删除按钮加载动画 | `boolean` | `false` | - |
| tel-validator | 手机号格式校验函数 | `(tel: string) => boolean` | - | - |
| contact-info | 联系人信息 | *object* | `[]` | - |
| is-edit | 是否为编辑联系人 | *boolean* | `false` | - |
| is-saving | 是否显示保存按钮加载动画 | *boolean* | `false` | - |
| is-deleting | 是否显示删除按钮加载动画 | *boolean* | `false` | - |
| tel-validator | 手机号格式校验函数 | *(tel: string) => boolean* | - | - |
### ContactEdit Events
@@ -189,6 +189,6 @@ export default {
| 键名 | 说明 | 类型 |
|------|------|------|
| id | 每位联系人的唯一标识 | `string | number` |
| name | 联系人姓名 | `string` |
| tel | 联系人手机号 | `string | number` |
| id | 每位联系人的唯一标识 | *string \| number* |
| name | 联系人姓名 | *string* |
| tel | 联系人手机号 | *string \| number* |