From bdd1c1c2c739847e08b29f3bc2cf16f161057e4e Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 16 Apr 2022 16:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC=E8=BD=AC?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E5=BA=95=E5=B1=82=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=8D=A0=E7=94=A8=E8=A1=A8=E6=A0=BC=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/plugs/easy-admin/easy-admin.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/public/static/plugs/easy-admin/easy-admin.js b/public/static/plugs/easy-admin/easy-admin.js index b25b654..e83e6eb 100644 --- a/public/static/plugs/easy-admin/easy-admin.js +++ b/public/static/plugs/easy-admin/easy-admin.js @@ -209,7 +209,8 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine extend: 'data-table-id="' + options.id + '"' }]; - options.done = function () { + var table2card = function () { + if (admin.checkMobile()) { var domTable = $('[lay-id="' + options.id + '"]'); @@ -231,9 +232,17 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine $('
' + colsHeader[indexTd] + '
').insertBefore($(domTd).find('.layui-table-cell')) }) }) - - } + + } + + var optionDone = function (){} + if (options.done != undefined) { + optionDone = options.done; + } + options.done = function(){ + optionDone() + table2card() } // 判断是否为移动端