【uniapp】确认弹出框,选择确定和取消

代码如下:
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
						}
					}
			});
},
相关推荐
云上凯歌8 小时前
01_AI工具平台项目概述.md
人工智能·python·uni-app
郑州光合科技余经理8 小时前
O2O上门预约小程序:全栈解决方案
java·大数据·开发语言·人工智能·小程序·uni-app·php
2501_916008899 小时前
在不越狱前提下导出 iOS 应用文件的过程,访问应用沙盒目录,获取真实数据
android·macos·ios·小程序·uni-app·cocoa·iphone
2501_915106329 小时前
Android和IOS 移动应用App图标生成与使用 Assets.car生成
android·ios·小程序·https·uni-app·iphone·webview
木子啊9 小时前
UNIAPP移动端瀑布流列表,支持APP、微信小程序、H5
uni-app·瀑布流·两列排序
2501_915918419 小时前
Mac 抓包软件有哪些?Charles、mitmproxy、Wireshark和Sniffmaster哪个更合适
android·ios·小程序·https·uni-app·iphone·webview
2501_915106329 小时前
iOS 抓包绕过 SSL 证书认证, HTTPS 暴力抓包、数据流分析
android·ios·小程序·https·uni-app·iphone·ssl
WeiAreYoung9 小时前
uni-app xcode 制作iOS Notification Service Extension 远程推送图文原生插件
ios·uni-app·xcode
2501_9159214318 小时前
iOS App 电耗管理 通过系统电池记录、Xcode Instruments 与克魔(KeyMob)组合使用
android·ios·小程序·https·uni-app·iphone·webview
2501_915918411 天前
iOS App 测试方法,Xcode、TestFlight与克魔(KeyMob)等工具组合使用
android·macos·ios·小程序·uni-app·iphone·xcode