mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
修复 dialog 自定义按钮时出现的bug (#72)
This commit is contained in:
parent
deddb8df6f
commit
c77f90c883
@ -28,6 +28,7 @@ module.exports = {
|
|||||||
|
|
||||||
// 处理默认按钮的展示
|
// 处理默认按钮的展示
|
||||||
// 纵向排布确认按钮在上方
|
// 纵向排布确认按钮在上方
|
||||||
|
let showCustomBtns = false;
|
||||||
if (buttons.length === 0) {
|
if (buttons.length === 0) {
|
||||||
if (showConfirm) {
|
if (showConfirm) {
|
||||||
buttons.push({
|
buttons.push({
|
||||||
@ -49,12 +50,15 @@ module.exports = {
|
|||||||
buttons.unshift(cancelButton);
|
buttons.unshift(cancelButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showCustomBtns = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.setData({
|
this.setData({
|
||||||
zanDialog: {
|
zanDialog: {
|
||||||
show: true,
|
show: true,
|
||||||
|
showCustomBtns,
|
||||||
buttons,
|
buttons,
|
||||||
title,
|
title,
|
||||||
content,
|
content,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user