作者 Karson
提交者 GitHub

Merge pull request #14 from iuyes/master

列表无图的时候,使用一个透明图片替代
@@ -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(' ');