From 14c7c63bbf5ec7e55d186c29a44fe54ed933732a Mon Sep 17 00:00:00 2001 From: Wuxh Date: Thu, 14 Jul 2022 18:03:11 +0800 Subject: [PATCH] fix: fixed the non draggable element did not hide the draggable icon (#36511) fix #33708 --- components/tree/style/mixin.less | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/components/tree/style/mixin.less b/components/tree/style/mixin.less index 3a502753cd..a86e237284 100644 --- a/components/tree/style/mixin.less +++ b/components/tree/style/mixin.less @@ -117,6 +117,21 @@ color: @tree-node-hightlight-color; font-weight: 500; } + + &-draggable { + .@{custom-tree-prefix-cls}-draggable-icon { + width: @tree-title-height; + line-height: @tree-title-height; + text-align: center; + visibility: visible; + opacity: 0.2; + transition: opacity @animation-duration-slow; + + .@{custom-tree-node-prefix-cls}:hover & { + opacity: 0.45; + } + } + } } // >>> Indent @@ -133,15 +148,7 @@ // >>> Drag Handler &-draggable-icon { - width: @tree-title-height; - line-height: @tree-title-height; - text-align: center; - opacity: 0.2; - transition: opacity @animation-duration-slow; - - .@{custom-tree-node-prefix-cls}:hover & { - opacity: 0.45; - } + visibility: hidden; } // >>> Switcher