首页 > 其他 > 详细

EasyUI panel

时间:2017-10-29 10:34:43      阅读:390      评论:0      收藏:0      [点我收藏+]

1.脚本生成panel

2.panel属性

3.panel事件

4.panel方法

一 脚本生成panel

  <div id="tt"></div>
    <script>
        $(function () {
            $(‘#tt‘).panel({
                width: ‘100%‘,
                height: ‘200‘
            });
        });

二 panel属性

参考:http://www.jeasyui.net/plugins/159.html

 $(function () {           
            $(‘#tt‘).panel({
                width: ‘100%‘,
                height: ‘200‘,
                fit: true,    //适应父容器大小
                border: false,//不显示边框
                minimizable: true,
                maximizable: true,
                closable: true,
                collapsible: true,
                title: ‘My Panel‘,
                href: ‘WebForm1.aspx‘,
                onLoad: function () { },
                tools: [{
                    iconCls: ‘icon-add‘,
                    handler: function () { alert(‘new‘) }
                }, {
                    iconCls: ‘icon-save‘,
                    handler: function () { alert(‘save‘) }
                }]
            });
        });

三 panel 事件

例如:onLoad  onOpen,还有其他事件,参考官网注解

 $(function () {
            $(‘#tt‘).panel({
                width: ‘100%‘,
                height: ‘200‘,
                fit: true,    //适应父容器大小
                border: false,//不显示边框
                minimizable: true,
                maximizable: true,
                closable: true,
                collapsible: true,
                title: ‘My Panel‘,
                href: ‘WebForm1.aspx‘,
                onLoad: function () { },
                onOpen: function () { },
                tools: [{
                    iconCls: ‘icon-add‘,
                    handler: function () { alert(‘new‘) }
                }, {
                    iconCls: ‘icon-save‘,
                    handler: function () { alert(‘save‘) }
                }]
            });
        });

 

四 panel 方法

$("#tt").panel("open");
        $("#tt").panel("close");
        $("#tt").panel("refresh");   //刷新内容,当href有值时,页面重新加载
        $("#tt").panel("maximize");  //最大化
        $("#tt").panel("minimize");  //最小化

 

EasyUI panel

原文:http://www.cnblogs.com/ligenyun/p/7749377.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!