【发布时间】:2022-02-07 23:47:11
【问题描述】:
我有一个带有简单子/孙 2 层嵌套的应用程序,我正在尝试在 nuxt-child(ren) 的两层上进行转换。奇怪的是,过渡在孙子上工作得很好,但由于某种原因,即使它是相同的过渡,对孩子也不起作用。我可以在检查器中检查并验证它是否正确应用了这些类。最终发生的是,它不是平滑过渡 500 毫秒,而是暂停 500 毫秒并呈现子页面。
Here's the simple repo 演示了这个问题。 Here's the code sandbox 已部署的应用程序。
我是这样进行转换的:
模板:
<transition name="jade" mode="out-in">
<nuxt-child></nuxt-child>
</transition>
风格:
.jade-enter-active {
transition: all .3s ease;
}
.jade-leave-active {
transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.jade-enter, .jade-leave-to
{
transform: translateX(10px);
opacity: 0;
}
【问题讨论】:
标签: vue.js nuxt.js css-transitions