2.1.6 • Published 8 years ago
new_dialog v2.1.6
New_dialog
这是一个生成弹出层的js文件
用法
# 安装
npm install new_dialog --save-dev
# 引入
使用script标签:
<script src="./node_modules/new_dialog/index.js"></script>
<link rel="stylesheet" href="./node_modules/new_dialog/dialog.css">
使用ES6模块
import Dialog from 'new_dialog';
# 使用
let dialog = new Dialog(option);
# 配置option
{
type:"info",//类型
text:"welcome",//提示框内容
title:"hello world!",//提示框标题
context:"",//弹出框的上下文,默认body
style:{//提示框样式
width : "400px",//宽度
height : "100px",//高度
left : "400px",//位置x
top : "300px"//位置y
}
}