bklLiudl
2025-04-07 4e8f58cb41c7b6d570fd1979d80f74ab8a4d00c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// 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 class Notice extends Vue {
    /**
     * 打开
     * @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 函数
     * @param h 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;
    }
}