Commit 3a5638a7 by 李伟康

commit 拦截物理返回

1 parent a961cbfc
......@@ -26,7 +26,8 @@
"path": "pages/detail/detail",
"style": {
"navigationStyle": "custom",
"onReachBottonDistance":50
"onReachBottonDistance":50,
"disableSwipeBack":true
}
},
{
......
......@@ -102,7 +102,7 @@ export default {
drawStatus: false,
finishVisible: false,
defaulePen: require('../../assets/images/media/pen.png'),
activePen: require('../../assets/images/media/pen-active.png')
activePen: require('../../assets/images/media/pen-active.png'),
};
},
onLoad(options) {
......@@ -111,6 +111,16 @@ export default {
this.id = options.id;
this.getFindSoureDetail(options.id);
},
onBackPress(options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
if (this.type != "preview") this.$refs.finish.open()
return true;
}
// 其他情况允许正常返回
return false;
},
async onReachBottom() {
this.$refs.history.getQuotationList();
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!