message-tiny
v1.0.1
Published
轻量全局消息提示
Downloads
11
Maintainers
Readme
message-tiny
轻量全局消息提示
安装 install
npm install message-tiny
yarn add message-tiny
快速开始 quick start
import message from 'message-tiny'
message('hello world')
/* 4s 后消失 */
message('hello world', 4000)
/* 5s 后消失 */
message('hello world', 5000)
/* 自定义插入DOM */
const div = document.createElement('div')
div.innerHTML = '<div style="color:red;">hello world</div>'
message(div, 6000)
说明
不提供不同类型的消息提示,例如: success、error、warn等类型,可以自行再该包上继续再封装一层。