iview/dist/types/notice.d.ts

92 lines
2 KiB
TypeScript
Raw Normal View History

2018-08-31 18:04:17 +08:00
// Type definitions for iview 3.1.0
2018-08-30 18:11:37 +08:00
// Project: https://github.com/iview/iview
// Definitions by: yangdan
// Definitions: https://github.com/yangdan8/iview.git
import Vue, { VNode, CreateElement } from "vue";
export declare class 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 class NoticeConfig {
/**
*
*/
title?: string;
/**
*
*/
desc?: string;
/**
* 使 Vue Render
*/
render?: (h: CreateElement) => VNode;
/**
* 0 4.5
*/
duration?: number;
/**
*
*/
name?: string;
/**
*
*/
onClose?: Function;
}
export declare class NoticeGlobalConfig {
/**
* 24
*/
top?: number;
/**
* 4.5
*/
duration?: number;
}
declare module 'vue/types/vue' {
interface Vue {
/**
*
*/
$Notice?: Notice;
}
}