diff --git a/style/web/components/tree/_index.less b/style/web/components/tree/_index.less index fa6303531c..ca515f9c18 100644 --- a/style/web/components/tree/_index.less +++ b/style/web/components/tree/_index.less @@ -197,7 +197,7 @@ align-items: center; // 图标居中 text-align: center; - width: 16px; + width: @icon-default; // 当子元素只有一个且为image类型时,会有隐藏占位,因此将font-size设0 font-size: 0; user-select: none; diff --git a/style/web/components/tree/_var.less b/style/web/components/tree/_var.less index f27d2813d2..6ab2d697c7 100644 --- a/style/web/components/tree/_var.less +++ b/style/web/components/tree/_var.less @@ -39,7 +39,7 @@ @tree-node-icon-svg-size: @icon-default; @tree-node-item-line-height: 22px; @tree-line-before-width: 12px; -@tree-line-leaf-width: 12px; +@tree-line-leaf-width: 12px + @icon-default; @tree-line-first-height: 22px; @tree-node-item-origin-height: calc(@tree-node-item-height * var(--hscale) + 0px);