//路由進入之前,相當於攔截器
router.beforeEach((to, from, next) => {
Vue.nextTick(function(){//dom已加載完成
let timingInputs = $("input[name=timing]");
//加載時間選擇器
lay('input[name="timing"]').each(function(){
laydate.render({elem: this,type: 'datetime',btns: ['confirm']});
})
})
next();
});