0.4.0 • Published 1 day ago

tinymsg v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

tinymsg

a small message plugin

demo

preview

Install

npm install tinymsg

Use

import Tinymsg from 'tinymsg'
var msg = new Tinymsg('a message');
var msg = new Tinymsg({
    type:'success',
    content:'a message',
});

Options

参数说明可选值默认值
type类型info/success/warning/dangerinfo
content消息内容--
offset距离窗口顶部的偏移量-20
duration显示时间, 秒。0表示不关闭-3
custClass自定义类名--
showClose是否显示关闭按钮-false
useHtml是否把content作为html渲染-false

Method

调用 new Tinymsg()会返回当前 msg 的实例。如果需要手动关闭实例,可以调用它的 close 方法。 | 方法名 | 说明 | | - | - | | close | 关闭当前的 Message |

0.4.0

1 day ago

0.2.0

2 months ago

0.1.0

1 year ago