关于EasyUI的Layout总结
2024-08-31 20:27:19
版权声明:本文为博主原创文章,未经博主允许不得转载。
1、layout以html标签方式建立的
- <div id="content" region="center" border="false" class="easyui-layout">
- <div id="divPage1"
- data-options="region:'west'"
- style="width: 150px;"></div>
- <div id="divPage2"
- data-options="region:'center',href:'${basePath}/userManage_main.jspx'"></div>
- </div>
这样,如果我想重新修改 div id="divPage1"这个layout的href属性,应该怎么实行?
实现方法:
- $("#divPage1").panel({region:'west',href:'${basePath}/userManage_left.jspx?width='+width});
- $("#divPage1").panel('refresh');
必须执行panel的‘refresh’方法才会生效,因此这个‘userManage_left.jspx’页面会被执行2次。目前我的解决办法是使用js脚本建立的方式来解决。
2、用js脚本方式建立的
先建立一个div标签,用于生成layout。
- <div id="content" />
js脚本创建
- $('#content').layout('add',{
- region: 'west',
- width: 180,
- title: 'West Title',
- split: true,
- href:'${basePath}/userManage_left.jspx?width='+width,
- tools: [{
- iconCls:'icon-add',
- handler:function(){alert('add')}
- },{
- iconCls:'icon-remove',
- handler:function(){alert('remove')}
- }]
- });
- $('#content').layout('add',{
- region: 'center',
- width: 580,
- title: 'center Title',
- split: true,
- href:'${basePath}/userManage_main.jspx',
- tools: [{
- iconCls:'icon-add',
- handler:function(){alert('add')}
- },{
- iconCls:'icon-remove',
- handler:function(){alert('remove')}
- }]
- });
最新文章
- Thinking in Unity3D:渲染管线中的Rendering Path
- TransmitFile函数的简单使用
- resin启动报错:guava-15.0.jar!/META-INF/beans.xml:5: <;beans xmlns=";http://xmlns.jcp.org/xml/ns/javaee";>; is an unexpected top-level tag. 异常
- 小技巧,关于OC打印指针地址和arc下的retaincount
- Cpdetector编码识别
- Socket异步通信学习三
- yii2图片验证码
- 调皮的QQ音乐API:修复无法获取歌单
- 办公楼[POI2007]
- geotrellis使用(三十五)Cesium加载geotrellis TMS瓦片
- Windows控制台下绘制简单图形
- Mac 下 查看 使用某端口的进程和关闭该进程的命令
- SIM7600C读写本机号码
- linux下的crontab安装及简单使用
- Android Studio 调用夜神模拟器
- Java 中的 int 型转为 long 型
- ThreadLocal的学习
- Django _VIEW视图_源码分析
- Json对象和字符串互相转换 数据拼接 JSON使用方式
- RN九宫格