【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
						}
					}
			});
},
相关推荐
遗憾随她而去.16 小时前
uniapp 折叠动画 <transition> 踩坑记录
css·uni-app
百锦再1 天前
Elements Plus 跨设备自适应显示问题综合解决方案
python·flutter·小程序·uni-app·k8s·tornado·net
坚持学习前端日记1 天前
UniApp APK打包与Android深度集成能力解析
android·vue.js·uni-app
wetyuo2 天前
【随手记】uniapp + V3 使用TailwindCss3
uni-app·vue·css3·vite
小恒恒4 天前
2025 Vibe Coding 有感
前端·uni-app·trae
一颗小青松4 天前
uniapp使用uni-im
uni-app
2501_916007474 天前
iPhone APP 性能测试怎么做,除了Instruments还有什么工具?
android·ios·小程序·https·uni-app·iphone·webview
2501_915106324 天前
Windows 环境下有哪些可用的 iOS 上架工具, iOS 上架工具的使用方式
android·ios·小程序·https·uni-app·iphone·webview
一颗小青松4 天前
uniapp vue3中app端使用腾讯云点播上传
uni-app·云计算·腾讯云
玄尺_0074 天前
uniapp h5端使浏览器弹出下载框
前端·javascript·uni-app