手风琴的 framework7 问题
framework7 issue with a accordion
我正在使用 framework7 最新版本,我的应用层次结构是这样的:
- vue router-view,
- vue children 在 router-view,
内加载
- 其中一个 children 是 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;
}
}
2 天 搜索后:
我发现当您使用 Framework7 和 Vue.js 组件时,最好避免使用带 (DOM 缓存) 的内联页面,最好使用动态页面。
正如我从我读过的论坛和帖子中了解到的那样 - 通过将 内联页面 转换为 动态页面 可以解决问题。
我正在使用 framework7 最新版本,我的应用层次结构是这样的:
- vue router-view,
- vue children 在 router-view, 内加载
- 其中一个 children 是 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;
}
}
2 天 搜索后:
我发现当您使用 Framework7 和 Vue.js 组件时,最好避免使用带 (DOM 缓存) 的内联页面,最好使用动态页面。
正如我从我读过的论坛和帖子中了解到的那样 - 通过将 内联页面 转换为 动态页面 可以解决问题。