1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

修复 dialog 自定义按钮时出现的bug ()

This commit is contained in:
Yao 2017-12-04 20:39:52 +08:00 committed by GitHub
parent deddb8df6f
commit c77f90c883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,6 +28,7 @@ module.exports = {
// 处理默认按钮的展示
// 纵向排布确认按钮在上方
let showCustomBtns = false;
if (buttons.length === 0) {
if (showConfirm) {
buttons.push({
@ -49,12 +50,15 @@ module.exports = {
buttons.unshift(cancelButton);
}
}
} else {
showCustomBtns = true;
}
return new Promise((resolve, reject) => {
this.setData({
zanDialog: {
show: true,
showCustomBtns,
buttons,
title,
content,