<template>
<view>
<button @tap="exitAppClick">退出应用</button>
<text>注:iOS仅在uni-app x SDK模式中支持应用退出</text>
</view>
</template>
<script>
export default {
methods: {
exitAppClick: function () {
uni.exit({
success: function (res) {
console.log(res)
},
fail: function(error){
console.log(error)
}
})
}
}
}
</script>
<style>
</style>