mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Switch): incorrect size prop type (#5229)
This commit is contained in:
parent
308c0a9a92
commit
41824d7afa
@ -65,7 +65,7 @@ use `loading` property to keep component in loading state
|
||||
| cell-size | Cell size,can be set to `large` | *string* | - | - |
|
||||
| loading | whether switch is loading | *boolean* | `false` | - |
|
||||
| disabled | whether to disable switch | *boolean* | `false` | - |
|
||||
| size | Size of switch | *string* | `24px` | - |
|
||||
| size | Size of switch | *string \| number* | `24px` | - |
|
||||
| active-color | Background of switch color when active | *string* | `#1989fa` | - |
|
||||
| inactive-color | Background of switch color when inactive | *string* | `#fff` | - |
|
||||
| active-value | Value when active | *any* | `true` | - |
|
||||
|
@ -65,7 +65,7 @@ export default {
|
||||
| cell-size | 单元格大小,可选值为 `large` | *string* | - |
|
||||
| loading | 是否为加载状态 | *boolean* | `false` | - |
|
||||
| disabled | 是否为禁用状态 | *boolean* | `false` | - |
|
||||
| size | 开关尺寸 | *string* | `24px` | - |
|
||||
| size | 开关尺寸 | *string \| number* | `24px` | - |
|
||||
| active-color | 开关时的背景色 | *string* | `#1989fa` | - |
|
||||
| inactive-color | 开关时的背景色 | *string* | `#fff` | - |
|
||||
| active-value | 打开时的值 | *any* | `true` | - |
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
export type SharedSwitchProps = {
|
||||
size: string;
|
||||
size?: string | number;
|
||||
value?: any;
|
||||
loading?: boolean;
|
||||
disabled?: boolean;
|
||||
@ -14,7 +14,7 @@ export type SharedSwitchProps = {
|
||||
};
|
||||
|
||||
export const switchProps = {
|
||||
size: String,
|
||||
size: [String, Number],
|
||||
value: null as any,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
|
Loading…
x
Reference in New Issue
Block a user