exit.uvue 476 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <view>
  3. <button @tap="exitAppClick">退出应用</button>
  4. <text>注:iOS仅在uni-app x SDK模式中支持应用退出</text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. methods: {
  10. exitAppClick: function () {
  11. uni.exit({
  12. success: function (res) {
  13. console.log(res)
  14. },
  15. fail: function(error){
  16. console.log(error)
  17. }
  18. })
  19. }
  20. }
  21. }
  22. </script>
  23. <style>
  24. </style>