chore: update type switch (#2695)

pull/2692/head^2
binhaoCen 2020-08-17 18:13:39 +08:00 committed by GitHub
parent f34a5d962f
commit 203e8c6b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 45 additions and 43 deletions

88
types/switch.d.ts vendored
View File

@ -3,62 +3,64 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
import { VNodeChild } from 'vue';
export declare class Switch extends AntdComponent {
/**
$props: {
/**
* get focus when component mounted
* @default false
* @type boolean
*/
autofocus: boolean;
autofocus?: boolean;
/**
* determine whether the Switch is checked
* @default false
* @type boolean
*/
checked: boolean;
/**
* determine whether the Switch is checked
* @default false
* @type boolean
*/
checked?: boolean;
/**
* content to be shown when the state is checked
* @type any (string | slot)
*/
checkedChildren: any;
/**
* content to be shown when the state is checked
* @type any (string | slot)
*/
checkedChildren?: VNodeChild | JSX.Element;
/**
* to set the initial state
* @default false
* @type boolean
*/
defaultChecked: boolean;
/**
* to set the initial state
* @default false
* @type boolean
*/
defaultChecked?: boolean;
/**
* Disable switch
* @default false
* @type boolean
*/
disabled: boolean;
/**
* Disable switch
* @default false
* @type boolean
*/
disabled?: boolean;
/**
* loading state of switch
* @default false
* @type boolean
*/
loading: boolean;
/**
* loading state of switch
* @default false
* @type boolean
*/
loading?: boolean;
/**
* the size of the Switch, options: default small
* @default 'default'
* @type string
*/
size: 'small' | 'default' | 'large';
/**
* the size of the Switch, options: default small
* @default 'default'
* @type string
*/
size?: 'small' | 'default' | 'large';
/**
* content to be shown when the state is unchecked
* @type any (string | slot)
*/
unCheckedChildren: any;
/**
* content to be shown when the state is unchecked
* @type any (string | slot)
*/
unCheckedChildren?: VNodeChild | JSX.Element;
}
/**
* remove focus
*/