1、行高設置
因爲datagrid中沒有專門設置行高的屬性,所以這裏通過修改 easyui.css 樣式格式來修改行高。
方法:在 easyui.css中搜索“.datagrid-row”屬性,將默認的 行高 height:25px 修改爲想要的高度,即可。
.datagrid-row {
height: 42px;
text-align:center;
}
2、文字超寬換行
在<table>中設置 nowrap:false ,即可換行
<table id="dg" class="easyui-datagrid"
data-options="pagination:true,
singleSelect:true,
fitColumns:true,
nowrap:false">
注意datagrid行中設置 fitColumns:true 的單元格無法換行。
<th data-options="field:'contractDate',fitColumns:true">登記時間</th>