From e73da7abcd2f076447a7666336ced169cd9b25d5 Mon Sep 17 00:00:00 2001 From: augushong Date: Wed, 31 Aug 2022 11:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4operat=E7=9A=84=5Fif=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/plugs/easy-admin/easy-admin.js | 30 +++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index 9a56466..b6a8350 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -751,23 +751,6 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick operat.titleField = operat.titleField || 'title'; operat.title = operat.title || operat.text; operat.text = operat.text || operat.title; - operat._if = operat._if || function () { return true }; - - - if (typeof operat._if == 'function') { - - if (operat._if(data, operat) !== true) { - return ''; - } - } else if (typeof operat._if == 'string') { - - var ifValue = admin.table.returnColumnValue(data, operat._if, false); - - if (!ifValue) { - return '' - } - - } var titleEndfix = ''; @@ -973,6 +956,19 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick operat.text = operat.text || operat.title; operat.extend = operat.extend || ''; + operat._if = operat._if || function () { return true }; + + if (typeof operat._if == 'function') { + if (operat._if(data, operat) !== true) { + return ''; + } + } else if (typeof operat._if == 'string') { + var ifValue = admin.table.returnColumnValue(data, operat._if, false); + if (!ifValue) { + return '' + } + } + // 自定义表格opreat按钮的弹窗标题风格,extra是表格里的欲加入标题中的字段 operat.extra = operat.extra || ''; if (data[operat.extra] !== undefined) {