Init在框架7中不起作用 我已经尝试了以下链接中给出的所有解决方案 framework7 Page Init Event Not Firing
Text
答案 0 :(得分:0)
添加初始化为假
var myApp = new Framework7({
animateNavBackIcon: true,
// Enable templates auto precompilation
precompileTemplates: true,
// Enabled pages rendering using Template7
swipeBackPage: false,
swipeBackPageThreshold: 1,
swipePanel: "left",
swipePanelCloseOpposite: true,
pushState: true,
pushStateRoot: undefined,
pushStateNoAnimation: false,
pushStateSeparator: '#!/',
template7Pages: true,
init:false
});
然后手动初始化
// Export selectors engine
var $ = Dom7;
// Add main View
var mainView = myApp.addView('.view-main', {
// Enable dynamic Navbar
dynamicNavbar: false
});
$(document).on('page:init', function (e) {
console.log("Please Run");
});
myApp.init();
您正在使用哪个版本的框架