add
parent
f8f0b15800
commit
33b3bfe149
|
|
@ -86,11 +86,6 @@
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"spread": false,
|
"spread": false,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
|
||||||
"title": "测试用的不用管",
|
|
||||||
"href": "pages/help/test.html",
|
|
||||||
"spread": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"title": "插件目录",
|
"title": "插件目录",
|
||||||
"href": "pages/help/plugDirectory.html",
|
"href": "pages/help/plugDirectory.html",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,261 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"title": "后台首页",
|
||||||
|
"fontFamily": "ok-icon",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/home.html",
|
||||||
|
"isClose": false,
|
||||||
|
"spread": true,
|
||||||
|
"isCheck": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "字体图标",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/other/okfont.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "图表管理",
|
||||||
|
"icon": "",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "地图",
|
||||||
|
"fontFamily": "my-icon",
|
||||||
|
"icon": "my-iconditu",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "中国地图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/mapchina2.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "地区地图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/mapchina.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "数据图",
|
||||||
|
"fontFamily": "my-icon",
|
||||||
|
"icon": "my-icontubiao",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "统计图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/map1.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "折线图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/map2.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "馅饼图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/map4.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "圆形图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/map5.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "指数图",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/echarts/map6.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "框架使用说明",
|
||||||
|
"fontFamily": "ok-icon",
|
||||||
|
"icon": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "测试用的不用管",
|
||||||
|
"href": "pages/help/test.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "插件目录",
|
||||||
|
"href": "pages/help/plugDirectory.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "内部添加导航",
|
||||||
|
"href": "pages/help/navOperate.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "导航的图标",
|
||||||
|
"href": "pages/help/navIcon.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "导航的参数",
|
||||||
|
"href": "pages/help/navParameter.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "第三方js库",
|
||||||
|
"icon": "",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "二维码",
|
||||||
|
"href": "pages/tripartite/qrcode.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "会员管理",
|
||||||
|
"icon": "",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "用户列表",
|
||||||
|
"fontFamily": "layui-icon",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/user/user.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "角色列表",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/role/role.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "权限列表",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/permission/permission.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "新闻管理",
|
||||||
|
"icon": "",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "文章列表",
|
||||||
|
"fontFamily": "layui-icon",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/article/article.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "多级导航",
|
||||||
|
"fontFamily": "ok-icon",
|
||||||
|
"icon": "ok-iconnavigation-2",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "二级导航",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "三级导航1",
|
||||||
|
"fontFamily": "ok-icon",
|
||||||
|
"icon": "ok-iconairplay",
|
||||||
|
"href": "pages/home.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "三级导航2",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "四级导航1",
|
||||||
|
"href": "",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "四级导航2",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "五级导航",
|
||||||
|
"fontFamily": "ok-icon",
|
||||||
|
"icon": "",
|
||||||
|
"href": "",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "五级导航",
|
||||||
|
"href": "",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "登录",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/login.html",
|
||||||
|
"spread": false,
|
||||||
|
"target": "_blank"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "系统管理",
|
||||||
|
"icon": "",
|
||||||
|
"href": "",
|
||||||
|
"spread": false,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"title": "登录",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/login.html",
|
||||||
|
"spread": false,
|
||||||
|
"target": "_blank"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "403页面",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/common/403.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "404页面",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/common/404.html",
|
||||||
|
"spread": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "500页面",
|
||||||
|
"icon": "",
|
||||||
|
"href": "pages/common/500.html",
|
||||||
|
"spread": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Title</title>
|
|
||||||
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
|
|
||||||
<link rel="stylesheet" href="../../css/common.css">
|
|
||||||
<style>
|
|
||||||
.ok-body {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="childrenBody">
|
|
||||||
<div>
|
|
||||||
<button class="btn-alert layui-btn">
|
|
||||||
弹出
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<script src="../../lib/layui/layui.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
layui.config({
|
|
||||||
base: "/lib/okplugins/"
|
|
||||||
}).use(['jquery', 'layer'], function () {
|
|
||||||
var regPositive = /^[0-9]\d*$/;
|
|
||||||
$ = layui.jquery;
|
|
||||||
$.serializeObject = function (formElem) {//form表单序列化值返回json对象key为input的name,值为input的值
|
|
||||||
var o = {};
|
|
||||||
var a = this(formElem.serializeArray());
|
|
||||||
$.each(a, function () {
|
|
||||||
if (o[this.name] !== undefined) {
|
|
||||||
if (!o[this.name].push) {
|
|
||||||
o[this.name] = [o[this.name]];
|
|
||||||
}
|
|
||||||
o[this.name].push(this.value || '');
|
|
||||||
} else {
|
|
||||||
o[this.name] = this.value || '';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return o;
|
|
||||||
};
|
|
||||||
|
|
||||||
var page_url = "/pages/help/testalter.html";
|
|
||||||
$(".btn-alert").click(function () {
|
|
||||||
layer.open({
|
|
||||||
type: 2,
|
|
||||||
btn: ['确定', '取消'],
|
|
||||||
title: '输入值',
|
|
||||||
area: ['350px', '200px'],
|
|
||||||
content: page_url,
|
|
||||||
shade: 0,
|
|
||||||
yes: function (index, layero) {
|
|
||||||
var body = layer.getChildFrame('body', index);
|
|
||||||
var data = $.serializeObject($(body).find("form"));
|
|
||||||
if (regPositive.test(data.valNumber)) {
|
|
||||||
$("#numericalVal").val(data.valNumber);
|
|
||||||
} else {
|
|
||||||
$(body).find("form").find('input[name="valNumber"]').focus();//获取焦点
|
|
||||||
layer.msg("输入的值不能小于零");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,88 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Title</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
||||||
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
|
|
||||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_1200484_qt9lobvqg9.css">
|
|
||||||
<meta>
|
|
||||||
<style>
|
|
||||||
.childrenBody {
|
|
||||||
background: #FFF;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
input[type=number]::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
input[type=number]::-webkit-outer-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
.layui-btn-xs {
|
|
||||||
padding: 0;
|
|
||||||
height: 38px;
|
|
||||||
line-height: 38px;
|
|
||||||
width: 38px;
|
|
||||||
}
|
|
||||||
.layui-input-inline {
|
|
||||||
margin-left: 10px !important;
|
|
||||||
display: inline-block!important;
|
|
||||||
}
|
|
||||||
.btn-box {
|
|
||||||
width: 38px !important;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="childrenBody">
|
|
||||||
<form class="layui-form">
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-input-inline btn-box">
|
|
||||||
<button type="button" class="layui-btn layui-btn-xs numerical" data-type="-1"><i class="icon iconfont iconjianshao"></i></button>
|
|
||||||
</label>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="" name="valNumber" id="numericalVal" lay-verify="required|positive" placeholder="请输入值" autocomplete="off"
|
|
||||||
class="layui-input">
|
|
||||||
</div>
|
|
||||||
<label class="layui-input-inline btn-box">
|
|
||||||
<button type="button" class="layui-btn layui-btn-xs numerical" data-type="1"><i class="icon iconfont iconjia"></i></button>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<!--<div class="layui-form-item btn-box">-->
|
|
||||||
<!--<button class="layui-btn" lay-submit lay-filter="formSsubmit">确定</button>-->
|
|
||||||
<!--</div>-->
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<script src="../../lib/layui/layui.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
layui.config({
|
|
||||||
base: "/lib/okplugins/"
|
|
||||||
}).use(['jquery', 'layer', 'form'], function () {
|
|
||||||
var regPositive = /^[0-9]\d*$/;
|
|
||||||
var layer = layui.layer,
|
|
||||||
form = layui.form,
|
|
||||||
$ = layui.jquery;
|
|
||||||
form.verify({
|
|
||||||
positive: [regPositive, "此处的值不能小于零"]
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".numerical").click(function () {
|
|
||||||
var type = $(this).attr('data-type');
|
|
||||||
var val = $("#numericalVal").val() * 1 + type * 1;
|
|
||||||
console.log(val);
|
|
||||||
if (regPositive.test(val)) {
|
|
||||||
$("#numericalVal").val(val);
|
|
||||||
} else {
|
|
||||||
layer.msg("此处的值不能小于零");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
form.on("submit(formSsubmit)", function (res) {
|
|
||||||
var field = res.field;
|
|
||||||
console.log(field);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
Loading…
Reference in New Issue