iview/types/notice.d.ts

94 lines
2.2 KiB
TypeScript
Raw Normal View History

// Type definitions for iview 3.3.1
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
import Vue, { VNode, CreateElement } from "vue";
export declare interface Notice {
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
*/
open(config?: NoticeConfig | string): void;
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
*/
info(config?: NoticeConfig | string): void;
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
*/
success(config?: NoticeConfig | string): void;
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
*/
warning(config?: NoticeConfig | string): void;
/**
*
* @param config NoticeConfig为相关配置,string为待显示的内容
*/
error(config?: NoticeConfig): void;
/**
*
*/
config(options?: NoticeGlobalConfig): void;
/**
*
*/
close(name?: string): void;
/**
*
*/
destroy(): void;
}
export declare interface NoticeConfig {
/**
*
*/
title?: string;
/**
*
*/
desc?: string;
/**
* 使 Vue Render
* @param h Render函数
*/
render?: (h?: CreateElement) => VNode;
/**
* 0 4.5
*/
duration?: number;
/**
*
*/
name?: string;
/**
*
*/
onClose?: Function;
}
export declare interface NoticeGlobalConfig {
/**
* 24
*/
top?: number;
/**
* 4.5
*/
duration?: number;
}
declare module "vue/types/vue" {
interface Vue {
/**
*
*/
$Notice: Notice;
}
}