提交者
GitHub
Merge pull request #14 from iuyes/master
列表无图的时候,使用一个透明图片替代
正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
@@ -298,6 +298,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table | @@ -298,6 +298,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table | ||
298 | return '<i class="' + value + '"></i> ' + value; | 298 | return '<i class="' + value + '"></i> ' + value; |
299 | }, | 299 | }, |
300 | image: function (value, row, index) { | 300 | image: function (value, row, index) { |
301 | + value=value?value:'/assets/img/blank.gif'; | ||
301 | var classname = typeof this.classname !== 'undefined' ? this.classname : 'img-sm img-center'; | 302 | var classname = typeof this.classname !== 'undefined' ? this.classname : 'img-sm img-center'; |
302 | return '<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />'; | 303 | return '<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />'; |
303 | }, | 304 | }, |
@@ -307,6 +308,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table | @@ -307,6 +308,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table | ||
307 | var arr = value.split(','); | 308 | var arr = value.split(','); |
308 | var html = []; | 309 | var html = []; |
309 | $.each(arr, function (i, value) { | 310 | $.each(arr, function (i, value) { |
311 | + value=value?value:'/assets/img/blank.gif'; | ||
310 | html.push('<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />'); | 312 | html.push('<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />'); |
311 | }); | 313 | }); |
312 | return html.join(' '); | 314 | return html.join(' '); |
-
请 注册 或 登录 后发表评论