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

1.3.5 • Public • Published

message

消息信息

Usage

import {initMsg} from @gaopeng123/message”;

// 初始化message 避免全局变量
const message = initMsg();

// 全局设置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);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.5
    3
    • latest

Version History

Package Sidebar

Install

npm i @gaopeng123/message

Weekly Downloads

3

Version

1.3.5

License

MIT

Unpacked Size

60.4 kB

Total Files

9

Last publish

Collaborators

  • gaopeng123