Neatly Packaged Magic

    @gaopeng123/message
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.6 • Public • Published

    message

    消息信息

    Usage

    import initMessage from @gaopeng123/message”;
    
    // 初始化message 避免全局变量
    const message = initMessage();
    
    // 全局设置message的属性
    message.config = {
    
    };
    
    type MsgConfig = {
        type?: 'info' | 'warning' | 'success' | 'error' | 'loading',
        showClose?: boolean,
        timeout?: number,
        animation?: boolean,
        autoClose?: boolean,
        content?: string,
        onClose?: any,
        maxNums?: number,
        html?: string;
    };
    
    // API
    message.info('', config as MsgConfig);
    message.warning('', config as MsgConfig);
    message.success('', config as MsgConfig);
    message.error('', config as MsgConfig);
    message.loading('', config as MsgConfig);

    Keywords

    none

    Install

    npm i @gaopeng123/message

    DownloadsWeekly Downloads

    23

    Version

    0.4.6

    License

    MIT

    Unpacked Size

    60.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • gaopeng123