作者 李云龙
提交者 GitHub

列表无图的时候,使用一个透明图片替代

@@ -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 },
@@ -306,6 +307,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table @@ -306,6 +307,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
306 var arr = value.split(','); 307 var arr = value.split(',');
307 var html = []; 308 var html = [];
308 $.each(arr, function (i, value) { 309 $.each(arr, function (i, value) {
  310 + value=value?value:'/assets/img/blank.gif';
309 html.push('<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />'); 311 html.push('<img class="' + classname + '" src="' + Fast.api.cdnurl(value) + '" />');
310 }); 312 });
311 return html.join(' '); 313 return html.join(' ');