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 (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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user