代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="plugins/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="plugins/easyui/themes/icon.css" />
<script type="text/javascript" src="plugins/easyui/jquery.min.js"></script>
<script type="text/javascript" src="plugins/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="plugins/easyui/plugins/jquery.sidemenu.js"></script>
<script type="text/javascript" src="js/holder.min.js"></script>
<title>iEasyUI</title>
<style>
ul,
li {
padding: 0;
margin: 0;
}
.dragger_point {
background: moccasin;
width: 40px;
height: 15px;
font-size: 12px;
float: right;
cursor: move;
}
</style>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'north'" style="height:50px;line-height: 50px;">
<image src="holder.js/128x40" style="margin-top:4px;margin-left:10px;float: left;" />
<div class="easyui-panel" style="float: left;border: none;">
<a href="#" class="easyui-linkbutton" onclick="save()" data-options="plain:true,iconCls:'icon-cancel'">取消</a>
<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-save'"></a>
<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-back'"></a>
</div>
</div>
<div data-options="region:'center'" id="centerRegion">
<div style="width:15%;float:left;height:100%">
<ul>
<li>
菜单和按钮
<ul style="margin-left:20px;list-style: none;">
<li class="draggerMain" type="linkbutton">
链接按钮
<div class="dragger_point">拖动</div>
</li>
<li>按钮开关<div class="dragger_point">拖动</div>
</li>
</ul>
</li>
</ul>
</div>
<div id="draggableContent" style="width:65%;float:left;height:100%">
</div>
<div style="width:10%;float:left;">
<table id="pg" class="easyui-propertygrid" style="width:300px" data-options="showGroup:true,scrollbarSize:0"></table>
<a href="#" class="easyui-linkbutton">保存</a>
</div>
</div>
</div>
</body>
<script>
var target = undefined;
$(function () {
$('.draggerMain').draggable({
handle: '.dragger_point',
revert: true,
proxy: function (source) {
var p = $('<div style="border:1px solid #ccc;width:80px"></div>');
p.html($(source).html()).appendTo('body');
return p;
},
onStopDrag: function (e) {
var type = e.data.target.type;
var html = "";
switch (type) {
case 'linkbutton':
{
html =
'<a href="#" class="easyui-linkbutton" data-options="iconCls:\'icon-search\'">easyui</a>';
break;
}
}
$("#draggableContent").append(html);
$.parser.parse("#draggableContent");
$("#draggableContent").children().click(function (e) {
target = e.currentTarget;
$(target).text("你好");
$.parser.parse("#draggableContent");
})
}
});
$('#pg').propertygrid({
showGroup: true,
scrollbarSize: 0,
data: {
"total": 4,
"rows": [{
"name": "text",
"value": "",
"group": "基本设置",
"editor": "text"
},
{
"name": "iconCls",
"value": "",
"group": "基本设置",
"editor": "text"
},
{
"name": "iconAlign",
"value": "",
"group": "基本设置",
"editor": "text"
}
]
}
});
});
function save() {
alert($("#draggableContent").html());
}
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。