Framework7:打开同一个页面并将其堆叠在页面历史记录中
Framework7: Open the same page and stack it in page history
我有一个使用 Framework7 的 Cordova Android 应用程序。
我可以在页面历史记录中反复堆叠相同的页面吗?
假设我在第 "category.html" 页上。
我想浏览嵌套的子类别。由于类别树的深度是先验未知的,我将重复使用具有更新内容的相同 "category.html" 页面。
不幸的是,如果我调用:
app.router.navigate("/category.html");
Framework7 未加载页面(因为我已经在 "category.html" 中)。
我尝试重新加载页面:
app.router.navigate(app.views.main.router.url, {reloadCurrent: true, history:true, ignoreCache:true});
有效,但 "new" category.html 页面不会堆叠在页面历史记录中(如果我从子类别返回,我想返回父类别)
我怎样才能做到这一点?
History Urls 存储在 router.history 数组中,可以在 Jsx 级别访问它。
可以参考路径下的lib文件
node_modules/framework7/modules/router/clear-previous-history.js
看看他们如何处理历史数组。
希望对您有所帮助。
我有一个使用 Framework7 的 Cordova Android 应用程序。
我可以在页面历史记录中反复堆叠相同的页面吗?
假设我在第 "category.html" 页上。
我想浏览嵌套的子类别。由于类别树的深度是先验未知的,我将重复使用具有更新内容的相同 "category.html" 页面。
不幸的是,如果我调用:
app.router.navigate("/category.html");
Framework7 未加载页面(因为我已经在 "category.html" 中)。 我尝试重新加载页面:
app.router.navigate(app.views.main.router.url, {reloadCurrent: true, history:true, ignoreCache:true});
有效,但 "new" category.html 页面不会堆叠在页面历史记录中(如果我从子类别返回,我想返回父类别)
我怎样才能做到这一点?
History Urls 存储在 router.history 数组中,可以在 Jsx 级别访问它。
可以参考路径下的lib文件
node_modules/framework7/modules/router/clear-previous-history.js
看看他们如何处理历史数组。
希望对您有所帮助。