重构代码:menus.js脚本菜单图标函数重构,精简代码

This commit is contained in:
Argo Zhang 2019-03-20 18:12:44 +08:00
parent 77f7340e7d
commit e1d91bd889
1 changed files with 1 additions and 4 deletions

View File

@ -96,10 +96,7 @@ $(function () {
{ title: "菜单序号", field: "Order", sortable: true },
{
title: "菜单图标", field: "Icon", sortable: false, align: 'center', formatter: function (value, row, index) {
if (value) {
return $.format('<i class="text-info {0}"></i>', value);
}
return "";
return value ? $.format('<i class="text-info {0}"></i>', value) : "";
}
},
{ title: "菜单路径", field: "Url", sortable: false },