下面例子演示,代码放在InitGridHeader方法中
return new List<GridColumn<School_View>>{
this.MakeGridColumn(x=>x.Photo,GetPhoto),
this.MakeGridHeader(x => x.SchoolCode),
this.MakeGridHeader(x => x.SchoolName),
this.MakeGridHeader(x => x.SchoolType),
this.MakeGridHeader(x => "test").SetFormat((a,b)=>{
return this.UIService.MakeScriptButton(ButtonTypesEnum.Button,"测试","alert('aaa');");
}).SetHeader("测试"),
this.MakeGridColumn(x=>x.Remark,(a,b)=>{ return "<img src='/layuiadmin/style/res/logo.png' />"; }).SetHeader("图像"),
this.MakeGridHeaderAction(width: 500)
};
不能直接显示吗,类美团外面那个模式 显示菜品照片
类似美团外卖那样显示照片
应该可以,官方里是可以的
你可以在ListVM处,使用SetFormat方法,让他直接输出图片就可以了。