From 1088f8ac0552112fe9609931dd3b2f4f767cacb0 Mon Sep 17 00:00:00 2001 From: augushong Date: Tue, 30 Nov 2021 16:19:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BCopeart?= =?UTF-8?q?=E7=9A=84field=E5=9B=9E=E8=B0=83=E5=8A=9F=E8=83=BD;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/plugs/easy-admin/easy-admin.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index ae4537a..10fa49d 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -543,7 +543,7 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine return cols; }, tool: function (data, option) { - option.operat = option.operat || ['edit', 'delete']; + option.operat = option.operat || ['edit', 'delete']; var elem = option.init.table_elem || init.table_elem; var html = ''; $.each(option.operat, function (i, item) { @@ -603,7 +603,12 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine operat.title = data[operat.extra] + ' - ' + operat.title; } - operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data); + if (typeof operat.field != 'function') { + operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data); + } else { + operat.url = operat.field(operat.url, data, operat) + } + if (admin.checkAuth(operat.auth, elem)) { html += admin.table.buildOperatHtml(operat); }