Skip to content

Commit

Permalink
perf(collapse-panel): 不计算dom节点高度来实现动画效果 (#1939)
Browse files Browse the repository at this point in the history
* perf(collapse-panel): 不计算dom节点高度来实现动画效果

* pefr(collapse-panel): lint

* pefr(collapse-panel): 修改class名称

---------

Co-authored-by: hxh <1047739781>
  • Loading branch information
huxinhai authored Nov 18, 2024
1 parent b7bd5de commit 483aae0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion style/mobile/components/collapse/v2/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

background-color: @collapse-panel-bg-color;
overflow: hidden;
transition: height ease 240ms;

&--top {
display: flex;
Expand Down Expand Up @@ -76,6 +75,15 @@
}
}

&__body {
display: grid;
transition: grid-template-rows ease 240ms;
}

&__inner {
overflow: hidden;
}

&__content {
color: @collapse-content-text-color;
font-size: @collapse-content-font-size;
Expand Down

0 comments on commit 483aae0

Please sign in to comment.