用 webpack 和 postcss 打包的,直接引用 JS 即可,自动插♂入 CSS 。
眼见为实,在线演示: http://egoist.github.io/notie
NPM and Webpack ready:
import notie from 'notie'
// tell notie to show `hello world` info and auto-hide it.
notie('info', 'hello world', true)
// or use object as argument
notie({
  type: 'info',
  text: 'hello world',
  autoHide: true
})
当然开源的: GitHub
|      1DIYgod      2015-11-03 22:00:20 +08:00 又见到你了(*´∇`*) | 
|  |      2gilgamesh      2015-11-03 22:00:42 +08:00 楼主最棒了,好久不见哟! | 
|  |      4hqs123      2015-11-04 08:34:30 +08:00 楼主很厉害啊 | 
|      5yws112358      2015-11-04 09:09:16 +08:00 感觉效果不错 不过不知道用在哪些场景合适   登陆成功?有一条新信息? 另外可以规范些 叫做 notice 吧 | 
|      6tomoya92      2015-11-04 10:03:28 +08:00 好东西,喜欢 | 
|  |      8paledream      2015-11-04 15:00:56 +08:00 via Android 感谢楼主的轮子 | 
|  |      9crayygy      2015-11-04 22:19:46 +08:00 收藏一个~感谢 |