From f63590c11645cb45e9dde8e5b41a469f02ed7b0e Mon Sep 17 00:00:00 2001 From: Ricky Date: Fri, 18 Jun 2021 11:37:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC=E8=A1=8C?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extensions/reorder-rows/jquery.tablednd.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js index 7f9f04c6..08f9a128 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/reorder-rows/jquery.tablednd.js @@ -152,11 +152,16 @@ jQuery.tableDnD = { config.dragHandle // We only need to add the event to the specified cells && $(config.dragHandle, table).each(function() { - // The cell is bound to "this" - $(this).bind(startEvent, function(e) { - $.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config); - return false; - }); + if (! $(this).hasClass("nodrag")) { + // The cell is bound to "this" + $(this).bind(startEvent, function(e) { + if (e.target.tagName === "TD" && event.target.className !== "nodrag") { + $.tableDnD.initialiseDrag($(this).parents('tr')[0], table, this, e, config); + return false; + } + return true; + }); + } }) // For backwards compatibility, we add the event to the whole row // get all the rows as a wrapped set