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
+14 -14
View File
@@ -114,17 +114,17 @@ toast2.clear();
| Attribute | Description | Type | Default | Version |
|------|------|------|------|------|
| type | Can be set to `loading` `success` `fail` `html` | `string` | `text` | - |
| position | Can be set to `top` `middle` `bottom` | `string` | `middle` | - |
| message | Message | `string` | `''` | - |
| icon | Custom icon | `string` | - | 2.0.1 |
| iconPrefix | Icon className prefix | `string` | `van-icon` | 2.0.9 |
| mask | Whether to show mask | `boolean` | `false` | - |
| forbidClick | Whether to forbid click background | `boolean` | `false` | - |
| closeOnClick | Whether to close after clicked | `boolean` | `false` | 2.1.5 |
| loadingType | Loading icon type, can be set to `spinner` | `string` | `circular` | - |
| duration | Toast duration(ms), won't disappear if value is 0 | `number` | `3000` | - |
| className | Custom className | `any` | - | - |
| onOpened | Callback function after opened | `Function` | - | - |
| onClose | Callback function after close | `Function` | - | - |
| getContainer | Return the mount node for Toast | `string | () => HTMLElement` | `body` | - |
| type | Can be set to `loading` `success` `fail` `html` | *string* | `text` | - |
| position | Can be set to `top` `middle` `bottom` | *string* | `middle` | - |
| message | Message | *string* | `''` | - |
| icon | Custom icon | *string* | - | 2.0.1 |
| iconPrefix | Icon className prefix | *string* | `van-icon` | 2.0.9 |
| mask | Whether to show mask | *boolean* | `false` | - |
| forbidClick | Whether to forbid click background | *boolean* | `false` | - |
| closeOnClick | Whether to close after clicked | *boolean* | `false` | 2.1.5 |
| loadingType | Loading icon type, can be set to `spinner` | *string* | `circular` | - |
| duration | Toast duration(ms), won't disappear if value is 0 | *number* | `3000` | - |
| className | Custom className | *any* | - | - |
| onOpened | Callback function after opened | *Function* | - | - |
| onClose | Callback function after close | *Function* | - | - |
| getContainer | Return the mount node for Toast | *string \| () => HTMLElement* | `body` | - |
+14 -14
View File
@@ -114,17 +114,17 @@ toast2.clear();
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| type | 提示类型,可选值为 `loading` `success`<br>`fail` `html` | `string` | `text` | - |
| position | 位置,可选值为 `top` `bottom` | `string` | `middle` | - |
| message | 文本内容,支持通过`\n`换行 | `string` | `''` | - | - |
| icon | 自定义图标,支持传入图标名称或图片链接,可选值见 Icon 组件 | `string` | - | 2.0.1 |
| iconPrefix | 图标类名前缀 | `string` | `van-icon` | 2.0.9 |
| mask | 是否显示背景遮罩层 | `boolean` | `false` | - |
| forbidClick | 是否禁止背景点击 | `boolean` | `false` | - |
| closeOnClick | 是否在点击后关闭 | `boolean` | `false` | 2.1.5 |
| loadingType | 加载图标类型, 可选值为 `spinner` | `string` | `circular` | - |
| duration | 展示时长(ms),值为 0 时,toast 不会消失 | `number` | `3000` | - |
| className | 自定义类名 | `any` | - | - |
| onOpened | 完全展示后的回调函数 | `Function` | - | - |
| onClose | 关闭时的回调函数 | `Function` | - | - |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `string | () => HTMLElement` | `body` | - |
| type | 提示类型,可选值为 `loading` `success`<br>`fail` `html` | *string* | `text` | - |
| position | 位置,可选值为 `top` `bottom` | *string* | `middle` | - |
| message | 文本内容,支持通过`\n`换行 | *string* | `''` | - | - |
| icon | 自定义图标,支持传入图标名称或图片链接,可选值见 Icon 组件 | *string* | - | 2.0.1 |
| iconPrefix | 图标类名前缀 | *string* | `van-icon` | 2.0.9 |
| mask | 是否显示背景遮罩层 | *boolean* | `false` | - |
| forbidClick | 是否禁止背景点击 | *boolean* | `false` | - |
| closeOnClick | 是否在点击后关闭 | *boolean* | `false` | 2.1.5 |
| loadingType | 加载图标类型, 可选值为 `spinner` | *string* | `circular` | - |
| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `3000` | - |
| className | 自定义类名 | *any* | - | - |
| onOpened | 完全展示后的回调函数 | *Function* | - | - |
| onClose | 关闭时的回调函数 | *Function* | - | - |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | *string \| () => HTMLElement* | `body` | - |