From 375215a031f19f7097d3d254f92bbeeb3dde29bf Mon Sep 17 00:00:00 2001 From: WangHao <43278047@qq.com> Date: Sun, 7 Nov 2021 02:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=87=E7=AD=BE=E7=9A=84?= =?UTF-8?q?=E6=80=BB=E6=95=B0=E9=87=8F=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/bookmark/index/index.vue | 13 ++++++++++++- ruoyi-ui/src/views/bookmark/tag/usertag.vue | 13 +++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/bookmark/index/index.vue b/ruoyi-ui/src/views/bookmark/index/index.vue index 0eb6f8852..9695e6149 100644 --- a/ruoyi-ui/src/views/bookmark/index/index.vue +++ b/ruoyi-ui/src/views/bookmark/index/index.vue @@ -293,7 +293,7 @@ } }, callback: { - // beforeClick: this.BeforeClick, + beforeClick: this.BeforeClick, onClick: this.OnClickzTree, // onCheck: this.zTreeOnCheck, //补获展开和折叠 @@ -316,6 +316,8 @@ } }, zNodes: [], + //当前ztree 点击选中的 treeNode 值 + treeNodeClick:undefined, bookmark: [], inputVisible: false, //标签 inputValue: '', //标签 @@ -759,6 +761,11 @@ }, addHoverDom: function (treeId, treeNode) { + // console.log("addHoverDom...........") + if (this.treeNodeClick !=null && this.treeNodeClick !=undefined){ + //解决节点选中后 移出鼠标无法触发 removeHoverDom 方法的问题 + this.removeHoverDom(null,this.treeNodeClick); + } var confCount = $("." + treeNode.tId + "_sz").length; if (confCount > 0) return; $("." + treeNode.tId + "_sz").unbind().remove(); @@ -771,6 +778,8 @@ }, removeHoverDom: function (treeId, treeNode) { + // console.log("removeHoverDom...........") + $("." + treeNode.tId + "_count").unbind().remove(); $("." + treeNode.tId + "_sz").unbind().remove(); var switchObjspan = $("#" + treeNode.tId + "_span"); @@ -781,6 +790,8 @@ //点击展开 BeforeClick: function (treeId, treeNode) { console.log("展开---") + this.treeNodeClick = treeNode; + // removeHoverDom (treeId, treeNode); //if (treeNode.level != 19990 ) { // var zTree = $.fn.zTree.getZTreeObj("treeDemo"); // zTree.expandNode(treeNode); diff --git a/ruoyi-ui/src/views/bookmark/tag/usertag.vue b/ruoyi-ui/src/views/bookmark/tag/usertag.vue index 7eac321c1..b4d5132b1 100644 --- a/ruoyi-ui/src/views/bookmark/tag/usertag.vue +++ b/ruoyi-ui/src/views/bookmark/tag/usertag.vue @@ -3,11 +3,12 @@