From ee17c83ac273f69ace1be1beff621422f61d5975 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 25 Oct 2022 14:03:39 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-13158=20feat:=20=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A0=91=E5=92=8C=E5=88=97=E8=A1=A8=E6=A0=91=E7=AD=89=E6=AF=94?= =?UTF-8?q?=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/tree/ztree.less | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index 1eb5896a6..97d0e4cbb 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -1,5 +1,10 @@ @import "../../index.less"; +.use-scale(@property, @pix) { + @{property} : @pix; //不支持css变量的浏览器 + @{property} : calc(var(--css-scale, 1) * @pix); +} + .ztree * { padding: 0; margin: 0; @@ -50,7 +55,7 @@ &:before { border-left: 1px solid @border-color-dark-gray-line; height: 100%; - left: 14px; + .use-scale(left, 14px); margin-top: 0; } } @@ -113,7 +118,8 @@ } .ztree.solid li a { - height: 30px; + //height: 30px; + .use-scale(height, 30px); } .ztree li a.curSelectedNode { @@ -163,7 +169,8 @@ } .ztree.solid li span { - line-height: 30px; + //line-height: 30px; + .use-scale(line-height, 30px); } .ztree li span.icon { @@ -218,8 +225,8 @@ .ztree li span.button.chk { position: relative; - width: 14px; - height: 14px; + .use-scale(width, 14px); + .use-scale(height, 14px); margin: 0 3px 0 0; cursor: auto } @@ -302,8 +309,10 @@ } .ztree.solid li span.button.switch { - width: 30px; - height: 30px + .use-scale(width, 30px); + .use-scale(height, 30px); + //width: 30px; + //height: 30px; } .ztree li span.button.switch.noline_open {