From 0ba1bcd7260f37949f26bfd79d5da9847f002848 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 18 Jul 2019 14:33:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=A0=B9=E6=8D=AE=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E8=84=9A=E6=9C=AC=E8=AE=BE=E7=BD=AEIsResource?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/wwwroot/js/menus.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/js/menus.js b/Bootstrap.Admin/wwwroot/js/menus.js index 42ff103e..b2427f1d 100644 --- a/Bootstrap.Admin/wwwroot/js/menus.js +++ b/Bootstrap.Admin/wwwroot/js/menus.js @@ -22,6 +22,7 @@ $(function () { }; var state = []; + var menuResource = ['菜单', '资源', '按钮']; var $table = $('table'); $table.lgbTable({ url: Menu.url, @@ -127,10 +128,7 @@ $(function () { }, { title: "菜单类型", field: "IsResource", sortable: true, formatter: function (value, row, index) { - var ret = "菜单"; - if (value === "1") ret = "资源"; - else if (value === "2") ret = "按钮"; - return ret; + return menuResource[value]; } }, {