1.在字段中加image和imageSize两个属性
<t:dgCol title="头像" field="userImg" image="true" imageSize="112,100" queryMode="single" width="120"></t:dgCol>2.上述已经可以了,如果还要显示url,则加上formatterjs:
<t:dgCol title="头像" field="userImg" queryMode="single" width="250" image="true" imageSize="50,50" formatterjs="formatImg" ></t:dgCol>3.js
function formatImg(value,row,index){ //alert(value); var con = "<img src="+value+" style='width:50px;height:50px;'/>"+value; //alert(con); return con; }