hybrid-app - weex ios Android How to disable right swiping in the information filling interface
迷茫
迷茫 2017-07-04 13:45:11
0
1
1362

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???

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
巴扎黑

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...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template