easyui-combox 下拉框面板高度
- 设置.combo-panel {max-height:200px;} 设置面板最大值
- 在用到easyui-combobox时,设置panelHeight:'auto' 面板高度自适应。
easyui-textbox 设置值
$("#txtrName").textbox("setValue", "xxx");
界面加载无样式,闪烁问题
1.加载之前加个进度条
2.设置元素的 visibility=hidden 加载完成后 改成visibile
easyui-layout的布局增加隐藏布局的情况下,显示title
在源码中加入以下代码
//easyui-layout的布局增加隐藏布局的情况下,显示title
var buttonDir = {north:'down',south:'up',east:'left',west:'right'};
$.extend($.fn.layout.paneldefaults,{
onBeforeCollapse:function(){
/**/
var popts = $(this).panel('options');
var dir = popts.region;
var btnDir = buttonDir[dir];
if(!btnDir) return false;
setTimeout(function(){
var pDiv = $('.layout-button-'+btnDir).closest('.layout-expand').css({
textAlign:'center',lineHeight:'18px',fontWeight:'bold'
});
if(popts.title){
var vTitle = popts.title;
if(dir == "east" || dir == "west"){
var vTitle = popts.title.split('').join('<br/>');
pDiv.find('.panel-body').html(vTitle);
}else{
$('.layout-button-'+btnDir).closest('.layout-expand').find('.panel-title')
.css({textAlign:'left'})
.html(vTitle)
}
}
},100);
}
});
tree-datagrid数据展开-合并显示速度慢
因为如果不给列指定宽度的话,页面加载数据的时候,会调用EasyUI中的autosizecolumn方法,这样会很耗时间的,因为之前这列是隐藏的所以没有设定宽度,但是页面加载很慢,
easyui-window调整大小
var w = $('#selectOrder');
w.window('header').css('width','');
w.window('body').css('width','');
w.window('resize',{width:'auto',height:'auto'});
其他
像checkbox,radio和select这样的元素,选中属性对应“checked”和“selected”,这些也属于固有属性,因此需要使用prop方法去操作才能获得正确的结果。
$("#chk1").prop("checked") == false
$("#chk2").prop("checked") == true
如果上面使用attr方法,则会出现:
$("#chk1").attr("checked") == undefined
$("#chk2").attr("checked") == "checked"
未解决:
1.两个tab页都有tree-grid 数据多时,tab切换卡顿。(估计是表格高度宽度计算有关)
2.多个window 之间调用 ,有时候easyui样式加载不上。(估计和加载顺序有关系。)