easyui table 组件使用时候 列头居中显示,内容不居中显示

 代码:

 

 

$('#bidDataGrid').treegrid({   
       striped : true,
       rownumbers: true,
       autoRowHeight: true,
       idField:'id',
       treeField: 'planName',
       singleSelect: false,
       checkOnSelect: true,
       method: 'GET',
       url: '${Config.baseURL}prj/pgslibrary/getBidDatasByMilesID?parentLibraryID='+parentLibraryID,
       columns:[[   
     {field:'id',title:'id',checkbox:true},
           {field:'planName',title:'计划名称',width:'30%',halign:'center'},   
           {field:'planType',title:'分项类型',align:'center',width:'14%', formatter: function(value) {
            for(var p in planTypeDict){
             if(planTypeDict[p].itemCode==value){return planTypeDict[p].itemName}
               } 
           }},
           {field:'taskType',title:'分类',align:'center',width:'15%',formatter: function(value) {
            for(var p in taskTypeDict){
             if(taskTypeDict[p].itemCode==value){return taskTypeDict[p].itemName}
               } 
           }},
           {field:'isVisual',title:'是否形象进度',align:'center',width:'10%',formatter: function(value) {
            for(var p in isVisualDict){
             if(isVisualDict[p].itemCode==value){return isVisualDict[p].itemName}
               } 
           }},
           {field:'unit',title:'工程量单位',width:'28%',align:'center',formatter: function(value) {
            for(var p in unitDict){
             if(unitDict[p].itemCode==value){return unitDict[p].itemName}
               } 
           }}
       ]],

 

你可能感兴趣的:(JavaScript)