|
一、案例效果
表单上传的图片,在列表上展示出图片效果二、实现思路
1.注册案例附件字段列内容格式化事件
2.编写代码
三、操作步骤 1. 找到图片字段事件,注册列内容格式化事件 2.编写代码 四、相关代码
- function(value,metaData,record,rowIndex,colIndex,store,view){
- var grid = this,
- column = grid.columnManager.getHeaderAtIndex(colIndex);//当前列
- //定义样式
- var css = [
- '.scaleImg:hover{transform: scale(3);}',
- '.prev:hover{transform:scale(8);}'
- ].join(' ');
- Ext.util.CSS.createStyleSheet(css,'pro-sale-header');
- //判断是否有值
- if(JE.isNotEmpty(value)){
- var path = value.split("*")[1];
- return "<a href='#' onclick='JE.getFileUrl(""+path+"")' style='width:100px;height:200px;' ><img class='pro-sale-header scaleImg' src="+JE.getFileUrl(path)+" style='width:70px;height:60px;' /></a>"
- }else{
- return value;
- }
- }
复制代码
五、关键字,相关问题
列表展示图片
附件 |
|
|