docs: display all less variables (#7604)

This commit is contained in:
neverland
2020-11-22 16:02:46 +08:00
committed by GitHub
parent 0b2b3a91b5
commit 862adcd8eb
126 changed files with 2330 additions and 14 deletions
+22
View File
@@ -168,3 +168,25 @@ Toast.resetDefaultOptions('loading');
| onClose | Callback function after close | _Function_ | - |
| transition | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` |
| getContainer | Return the mount node for Toast | _string \| () => Element_ | `body` |
### Less Variables
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| ------------------------------- | ------------------------- | ----------- |
| @toast-max-width | `70%` | - |
| @toast-font-size | `@font-size-md` | - |
| @toast-text-color | `@white` | - |
| @toast-loading-icon-color | `@white` | - |
| @toast-line-height | `@line-height-md` | - |
| @toast-border-radius | `@border-radius-lg` | - |
| @toast-background-color | `fade(@black, 70%)` | - |
| @toast-icon-size | `36px` | - |
| @toast-text-min-width | `96px` | - |
| @toast-text-padding | `@padding-xs @padding-sm` | - |
| @toast-default-padding | `@padding-md` | - |
| @toast-default-width | `88px` | - |
| @toast-default-min-height | `88px` | - |
| @toast-position-top-distance | `20%` | - |
| @toast-position-bottom-distance | `20%` | - |
+22
View File
@@ -183,3 +183,25 @@ Toast.resetDefaultOptions('loading');
| onClose | 关闭时的回调函数 | _Function_ | - |
| transition | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | `van-fade` |
| getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | `body` |
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
| 名称 | 默认值 | 描述 |
| ------------------------------- | ------------------------- | ---- |
| @toast-max-width | `70%` | - |
| @toast-font-size | `@font-size-md` | - |
| @toast-text-color | `@white` | - |
| @toast-loading-icon-color | `@white` | - |
| @toast-line-height | `@line-height-md` | - |
| @toast-border-radius | `@border-radius-lg` | - |
| @toast-background-color | `fade(@black, 70%)` | - |
| @toast-icon-size | `36px` | - |
| @toast-text-min-width | `96px` | - |
| @toast-text-padding | `@padding-xs @padding-sm` | - |
| @toast-default-padding | `@padding-md` | - |
| @toast-default-width | `88px` | - |
| @toast-default-min-height | `88px` | - |
| @toast-position-top-distance | `20%` | - |
| @toast-position-bottom-distance | `20%` | - |