当组件是 fragment view 时添加 props 和 transition
Add props and transition when component is a fragment view
我正在尝试使用 vue.js 和扩展 vue-router 制作一个应用程序,所以在我的主 HTML 页面中我有:
<router-view v-transition="test" transition-mode="out-in"></router-view>
但是后来我得到了错误
Attribute v-transition is ignored on component router-view because the component is a fragment instance.
对于我使用 vueify 的组件,它看起来像这样:
<template>
<nav>
<div class="blabla">
blabla
</div>
</nav>
<div>
second div
</div>
</template>
<script>
module.exports = {
data: function() {
return {}
}
}
</script>
你知道我如何使用 vue-router 向我的组件添加过渡和道具吗?
我不知道组件必须是唯一的 div。所以我将它包装在一个独特的 div 中并且它正在工作。
<template>
<div> <!-- this is important -->
<nav>
<div class="blabla">
blabla
</div>
</nav>
<div>
second div
</div>
</div>
</template>
v-transition 在 vue 1.0.transition
中的变化
我正在尝试使用 vue.js 和扩展 vue-router 制作一个应用程序,所以在我的主 HTML 页面中我有:
<router-view v-transition="test" transition-mode="out-in"></router-view>
但是后来我得到了错误
Attribute v-transition is ignored on component router-view because the component is a fragment instance.
对于我使用 vueify 的组件,它看起来像这样:
<template>
<nav>
<div class="blabla">
blabla
</div>
</nav>
<div>
second div
</div>
</template>
<script>
module.exports = {
data: function() {
return {}
}
}
</script>
你知道我如何使用 vue-router 向我的组件添加过渡和道具吗?
我不知道组件必须是唯一的 div。所以我将它包装在一个独特的 div 中并且它正在工作。
<template>
<div> <!-- this is important -->
<nav>
<div class="blabla">
blabla
</div>
</nav>
<div>
second div
</div>
</div>
</template>
v-transition 在 vue 1.0.transition
中的变化