我试图在侧边栏切换时添加过渡效果,使其看起来像是从 w-0 滑动到 w-64。有没有不用vue过渡的方法?
<a href="#" @click="isOpenSidebar=!isOpenSidebar">Toggle</a>
<div class="flex flex-row max-w-7xl mx-auto">
<div class="flex flex-col shadow-xl sm:rounded-lg my-12" :class="isOpenSidebar? 'md:w-64 w-full':'w-0' ">
<Sidebar/>
</div>
<div class="flex w-full">
<slot></slot>
</div>
</div>