We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
Android 会给 前端抛一个 homeBack 的 globaEvent 事件。 你可以监听下这个事件,然后在事件里处理你的返回逻辑, 比如 再按一次退出(调用 router.finish)
Sorry, something went wrong.
demo 示例如下
androidFinishApp () { const globalEvent = weex.requireModule('globalEvent') globalEvent.addEventListener('homeBack', options => { (this.curHomeBackTriggerTimes === this.maxHomeBackTriggerTimes) && this.$router.finish() this.curHomeBackTriggerTimes++ this.$notice.toast({ message: `点击返回${this.maxHomeBackTriggerTimes}次之后,会关闭应用,当前点击第${this.curHomeBackTriggerTimes}次` }) }) },
首页 methods 里绑定这个方法,然后在 created 里面执行即可。
No branches or pull requests
如题,Android具体如何实现
The text was updated successfully, but these errors were encountered: