2019-01-01 12:13:51 +08:00
|
|
|
// Project: https://github.com/vueComponent/ant-design-vue
|
|
|
|
// Definitions by: akki-jat <https://github.com/akki-jat>
|
|
|
|
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
|
|
|
|
2020-08-31 14:59:56 +08:00
|
|
|
import { AntdComponent, AntdProps } from './component';
|
2020-08-17 18:13:39 +08:00
|
|
|
import { VNodeChild } from 'vue';
|
2019-01-01 12:13:51 +08:00
|
|
|
export declare class Switch extends AntdComponent {
|
2020-08-31 14:59:56 +08:00
|
|
|
$props: AntdProps & {
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
2020-08-30 22:59:47 +08:00
|
|
|
* get focus when component mounted
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
2020-08-17 18:13:39 +08:00
|
|
|
autofocus?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* determine whether the Switch is checked
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
checked?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* content to be shown when the state is checked
|
|
|
|
* @type any (string | slot)
|
|
|
|
*/
|
|
|
|
checkedChildren?: VNodeChild | JSX.Element;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* to set the initial state
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
defaultChecked?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* Disable switch
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
disabled?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* loading state of switch
|
|
|
|
* @default false
|
|
|
|
* @type boolean
|
|
|
|
*/
|
|
|
|
loading?: boolean;
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* the size of the Switch, options: default small
|
|
|
|
* @default 'default'
|
|
|
|
* @type string
|
|
|
|
*/
|
|
|
|
size?: 'small' | 'default' | 'large';
|
2019-01-01 12:13:51 +08:00
|
|
|
|
2020-08-17 18:13:39 +08:00
|
|
|
/**
|
|
|
|
* content to be shown when the state is unchecked
|
|
|
|
* @type any (string | slot)
|
|
|
|
*/
|
|
|
|
unCheckedChildren?: VNodeChild | JSX.Element;
|
2020-08-30 22:59:47 +08:00
|
|
|
};
|
2019-01-01 12:13:51 +08:00
|
|
|
/**
|
|
|
|
* remove focus
|
|
|
|
*/
|
|
|
|
blur(): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* get focus
|
|
|
|
*/
|
|
|
|
focus(): void;
|
|
|
|
}
|