mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-30 10:10:16 +00:00
2 lines
1.7 KiB
JavaScript
2 lines
1.7 KiB
JavaScript
import{T as n}from"./event-f85d77b0.js";import{d as s,b as i,e as r,v as p,x as l,h as g,C as m,b5 as f,u as y,_ as c}from"./plugin-vue_export-helper-85a4d40b.js";const T=s({name:"ElCollapseTransition"}),h=s({...T,setup(o){const e=i("collapse-transition"),d={beforeEnter(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0},enter(t){t.dataset.oldOverflow=t.style.overflow,t.scrollHeight!==0?(t.style.maxHeight=`${t.scrollHeight}px`,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.maxHeight=0,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow},beforeLeave(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.maxHeight=`${t.scrollHeight}px`,t.style.overflow="hidden"},leave(t){t.scrollHeight!==0&&(t.style.maxHeight=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave(t){t.style.maxHeight="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}};return(t,v)=>(r(),p(n,m({name:y(e).b()},f(d)),{default:l(()=>[g(t.$slots,"default")]),_:3},16,["name"]))}});var a=c(h,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);a.install=o=>{o.component(a.name,a)};const _=a,x=_;export{x as E,_};
|