chore: update type alert (#2688)

pull/2695/head
xrkffgg 2020-08-17 13:51:44 +08:00 committed by GitHub
parent 9f90d4cc55
commit 61ec4adafa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 51 additions and 48 deletions

99
types/alert.d.ts vendored
View File

@ -3,62 +3,65 @@
// 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 Alert extends AntdComponent { export declare class Alert extends AntdComponent {
/** $props: {
* Called when close animation is finished /**
* @type Function * Called when close animation is finished
*/ * @type Function
afterClose: () => void; */
afterClose?: () => void;
/** /**
* Whether to show as banner * Whether to show as banner
* @default false * @default false
* @type boolean * @type boolean
*/ */
banner: boolean; banner?: boolean;
/** /**
* Whether Alert can be closed * Whether Alert can be closed
* @type boolean * @type boolean
*/ */
closable: boolean; closable?: boolean;
/** /**
* Close text to show * Close text to show
* @type any (string | slot) * @type any (string | slot)
*/ */
closeText: any; closeText?: VNodeChild | JSX.Element;
/** /**
* additional content of Alert * additional content of Alert
* @type any (string | slot) * @type any (string | slot)
*/ */
description: any; description?: VNodeChild | JSX.Element;
/** /**
* Custom icon, effective when showIcon is true * Custom icon, effective when showIcon is true
* @type any (VNode | slot) * @type any (VNode | slot)
*/ */
icon: any; icon?: VNodeChild | JSX.Element;
/** /**
* Content of Alert * Content of Alert
* @type any (string | slot) * @type any (string | slot)
*/ */
message: any; message?: VNodeChild | JSX.Element;
/** /**
* Whether to show icon * Whether to show icon
* @default false, in banner mode default is true * @default false, in banner mode default is true
* @type boolean * @type boolean
*/ */
showIcon: boolean; showIcon?: boolean;
/** /**
* Type of Alert styles, options: success, info, warning, error * Type of Alert styles, options: success, info, warning, error
* @default info, in banner mode default is warning * @default info, in banner mode default is warning
* @type string * @type string
*/ */
type: 'success' | 'info' | 'warning' | 'error'; type?: 'success' | 'info' | 'warning' | 'error';
};
} }