JS部分
// 初始化一个弹出框
// 生成dom元素
// 插到页面中
// 显示
(function(window, document) {
let Msg = function(options) {
this._init(options);
}
Msg.prototype._init = function({
content = '' }) {
this.content = content;
this._createElement();
this._show(this._el);
}
Msg.prototype._createElement = function() {
let wrap = document.createElement('d