From 203e8c6b92a4140b78f55317508cf380919d06eb Mon Sep 17 00:00:00 2001 From: binhaoCen Date: Mon, 17 Aug 2020 18:13:39 +0800 Subject: [PATCH] chore: update type switch (#2695) --- types/switch.d.ts | 88 ++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/types/switch.d.ts b/types/switch.d.ts index c91817fca..b80d36044 100644 --- a/types/switch.d.ts +++ b/types/switch.d.ts @@ -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 */