0
点赞
收藏
分享

微信扫一扫

uniapp安卓平台uni.showModal按钮顺序

一叶轻舟okok 2022-01-06 阅读 131

在这里插入图片描述

const __showModal = uni.showModal;
uni.showModal = function(options) {
	// console.log('options-1', options);
	let opt = {}
	// #ifdef APP-PLUS
	if (uni.getSystemInfoSync().platform == 'android' && typeof options.showCancel == 'undefined') {
		options.cancelText = '确认';
		options.confirmText = '取消';
		opt.success = function(e) {
			// console.log('__opt.success', e);
			e.confirm = !e.confirm;
			e.cancel = !e.cancel;
			options.success(e);
		};
	}
	// #endif
	__showModal({
		...options,
		...opt,
	})
};
举报

相关推荐

0 条评论