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