Use weex to develop a hybrid app. When filling in the information page, the user may accidentally click the return key in the lower left corner (android) or swipe right (iOS), and the interface will exit
Question: The interface will exit, but we need the user to confirm the exit before allowing the interface to exit. How to achieve this???
1 answers
You need to intercept the return event
Android has it
<template>
<p @androidback="back">
</p>
</template>
<script>
export default {
methods: {
back () {
//dosomething
}
}
}
</script>
I don’t know about iOS, but using the right swipe operation should not be an accidental operation... But if you want to implement it, you can use the native fireEvent and then monitor it on the front-end page
You can refer to /a/11...
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20529
7
13638
4






