/autolog.js

轻量化小弹窗

Primary LanguageJavaScriptMIT LicenseMIT

autolog

autolog.js

一个轻量化小弹窗,无需任何依赖,一行代码即可弹出,并自动管理状态。

安装

npm i autolog.js

使用

import autolog from "autolog.js";

autolog.log("Hello World", "success", 2500);
// 其中 "success" 和 2500 都是可选项

自定义 icon

支持 svg 字符串,iconfont 类名

import alog from "autolog.js";
const autolog = alog.create({
 svgIcons: {
     customSvg: `<svg>...</svg>`,
     iconfont: "icon-xxx"
 }
});