代码如下:
javascript
<view style="display: flex; justify-content: space-around;">
<button class="button" @click="submit">t提交</button>
</view>
submit(){
let that=this
uni.showModal({
title: '提示:',
content: '请确认是否要提交?',
success: function(res) {
if (res.confirm) {
// console.log('确定');
//TODO
} else if (res.cancel) {
// console.log('取消');
//TODO
}
}
});
},