我使用的是framework7上一个版本的,我的应用层次结构是这样的:
当我在“作为组件的framework7的根”和任何其他组件之间导航时,手风琴动画开始卡住并意外地运行,没有控制台错误。其他framework7动画工作良好,除了手风琴后导航。但是在开始导航之前,它工作得很好。
我试图在这里重置vue
组件中的所有内容,该组件充当framework7
应用程序的根:
export default {
data() {
return {
appIsRdy: false
}
},
mounted() {
this.$store.state.f7.f7Obj = new Framework7({
root: '.f7root'
});
this.$store.state.f7.$$ = Dom7;
this.$store.state.f7.mView = this.$store.state.f7.f7Obj.addView('.view-main', { domCache: true });
this.appIsRdy = true;
},
components: {
MainPage,
RedditPage
},
beforeDestroy() {
this.$store.state.f7.f7Obj = null;
this.$store.state.f7.$$ = null;
this.$store.state.f7.mView = null;
this.appIsRdy = false;
}
}
发布于 2017-08-19 05:04:58
2天后搜索:
我发现,在使用Framework7和Vue.js组件时,最好避免使用内联页面(DOM缓存),最好使用动态页面。
正如我从论坛和文章中了解到的,这个问题是通过将内联页面转换为动态页面来解决的。
https://stackoverflow.com/questions/45717862
复制