1***@qq.com
1***@qq.com
  • 发布:2021-04-14 20:13
  • 更新:2021-04-22 22:20
  • 阅读:735

#插件讨论# 【 PopUp 弹出层 - DCloud前端团队 】confirm事件无响应怎么回事?

分类:uni-app

如题,使用uni-popup-dialog,close事件生效,但是confirm事件不生效。


     <uni-popup-dialog type="error" content="是否确定删除该组门店?" :before-close="true"  
            @close="close"  
            @confirm="dialogConfirm"></uni-popup-dialog>  
 </uni-popup>```  

close(done){  
            console.info("close::::::")  
            done();  
        },  
        dialogConfirm:function(done){  
            console.info("confirem::::::")  
            done();  
}
2021-04-14 20:13 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com (作者)

<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" content="是否确定删除该组门店?" :before-close="true"
@close="close"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>

1***@qq.com

1***@qq.com (作者)

 <uni-popup ref="popup" type="dialog">  
     <uni-popup-dialog type="error" content="是否确定删除该组门店?" :before-close="true"  
            @close="close"  
            @confirm="dialogConfirm"></uni-popup-dialog>  
 </uni-popup>  
2104_DLS

2104_DLS

比较一下两个事件的定义,我看你dialogConfirm:function这样写的,换成dialogConfirm(done){}试试

c***@foxmail.com

c***@foxmail.com

说下我的解决办法,我是在nvue中使用的,用的时候提示了display等属性在nvue中不可用,按提示在
uni-popup-dialog.vue子组件的样式中加了#ifndef APP-PLUS-NVUE 条件才生效的,但是我知道这个肯定是治标不治本,还是需要作者更新才行。

我看插件评论里已经有人自己解决了

该问题目前已经被锁定, 无法添加新回复