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
+18
View File
@@ -108,3 +108,21 @@ export default {
| ------ | --------------------------------- | -------------- |
| change | Emitted when check status changed | _value: any_ |
| click | Emitted when component is clicked | _event: Event_ |
### Less Variables
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| --- | --- | --- |
| @switch-size | `30px` | - |
| @switch-width | `2em` | - |
| @switch-height | `1em` | - |
| @switch-node-size | `1em` | - |
| @switch-node-background-color | `@white` | - |
| @switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
| @switch-background-color | `@white` | - |
| @switch-on-background-color | `@blue` | - |
| @switch-transition-duration | `@animation-duration-base` | - |
| @switch-disabled-opacity | `@disabled-opacity` | - |
| @switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |
+18
View File
@@ -124,3 +124,21 @@ export default {
| ------ | ------------------ | -------------- |
| change | 开关状态切换时触发 | _value: any_ |
| click | 点击时触发 | _event: Event_ |
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
| 名称 | 默认值 | 描述 |
| --- | --- | --- |
| @switch-size | `30px` | - |
| @switch-width | `2em` | - |
| @switch-height | `1em` | - |
| @switch-node-size | `1em` | - |
| @switch-node-background-color | `@white` | - |
| @switch-node-box-shadow | `0 3px 1px 0 rgba(0, 0, 0, 0.05)` | - |
| @switch-background-color | `@white` | - |
| @switch-on-background-color | `@blue` | - |
| @switch-transition-duration | `@animation-duration-base` | - |
| @switch-disabled-opacity | `@disabled-opacity` | - |
| @switch-border | `@border-width-base solid rgba(0, 0, 0, 0.1)` | - |