Fork me on GitHub
<table id="tab" class="easyui-datagrid" style="width: 100%; height: 500px"
                        data-options="url:'JZ.ashx?can=0',onClickRow: onClickRow,
                singleSelect:true,fit:true,pagination:true,pageSize:10,rownumbers:true
            ">
</table>
function onClickRow(rowdata) {
            var row = $('#tab').datagrid('getSelected');
            if (row) {
                var cc = row.ZONG;
                cc = parseFloat(cc);
                cc = cc.toFixed(2);
                $('#Text1').val(cc);
                cc = cc / 254.77;
                $('#Text2').val(cc.toFixed(2));
            }
        }

 

问题一:如何将easyui的west面板上的收缩箭头隐藏?
如图效果:
easyui问题小结

做法:
    <div data-options="region:'west'" style="width:200px;">
        <div class="easyui-panel" data-options="title:'功能导航',border:false,fit:true">
            <div class="easyui-accordion" data-options="fit:true,border:false">
                <div title="系统菜单" data-options="iconCls:'icon-save'">
<ul class="easyui-tree" data-options=
"url:'${pageContext.request.contextPath}/menuAction!allTreeNode.action',
parentField:'pid',lines:true,onClick:function(node){
                   var url = '${pageContext.request.contextPath}'+node.attributes.url;
                  addTab({title:node.text,href:url});}">
              </ul> 
                </div>
            </div>
        </div>
</div>
  easyui问题小结

   1.不指定west面板的title属性就得到上一张图的效果:
    <div data-options="region:'west'" style="width:200px;"></div>
 easyui问题小结

  2.在west面板内增加一个panel面板来实现west面板的相似界面,从而影藏了箭头:title属性给panel写上即可;
 border:false让边框变窄,fit:true让面板自适应窗口变化;所得界面如上图:
    <div data-options="region:'west'" style="width:200px;">
        <div class="easyui-panel" data-options="title:'功能导航',border:false,fit:true">
        </div>
    </div>
layout小扩展:设置是否显示region的收缩按钮
http://www.easyui.info/archives/1279.html

问题二:如何让layout面板中任何一个面板失去这个标题显示横条?
待处理图:
 easyui问题小结

做法:
<div data-options="region:'east'" style="height:60px;"></div>
不指定面板的title属性即可;
 
问题三;如何显示一个filedSet?
效果如图:
 easyui问题小结

做法:使用<fieldset>标签
      <form id="user_login_loginForm" method="post">
       <fieldset>
        <legend>用户登录</legend>
       <table>
 <tr><</th>用户名</th><</td><input name="name" class="easyui-validatebox"
         data-options="required:true,missingMessage:'用户名为必填项'"/></>td></</tr>
            <tr></th>密码<th><td><input name="pwd" type="password"  class="easyui-validatebox"
                   data-options="required:true,missingMessage:'密码为必填项'"/></td></</tr>
       </table>
      </fieldset>
     </form>
问题四:点击tree节点通过panel的href属性在center中载入一个页面?
  注意:panel的href属性引入的页面内容只能为该 jsp页面<body>标签内的内容,所以引入页面就不要写其它标签了,直接写需要的代码片段。Javascript直接写上即可。
问题五:如何画一条虚线?
 效果图如下:

easyui问题小结
代码:
<div style="width:380px; border-top:1px silver dashed;border-color:#99BBE8;"></div>
问题六:如何动态改变center面板下data-options中的title属性的值?
效果:
easyui问题小结

代码:
 $('#index_layout').layout('panel','center').panel('setTitle','当前位置》'+options.title);
 
 
问题七:如何让combobox高度自适应:
  panelHeight: 'auto'
 
问题八:获取data-option的宽度:
 $('#index_layout').layout('panel','east').panel("options").width;

 

posted on 2014-04-12 21:09  lingfeng95  阅读(20904)  评论(0编辑  收藏  举报