使用LayerConfirm方法确定回调方法不能传参。如果传参了,会直接执行不会等到点击确定在执行

Layer.confirm("确定执行此操作?", "执行该操作将不能撤回", "确定", AuditRemit, "取消", null);

 

confirm: function (content, title, sureText, sureFunction, closeText, closeFunction) {
  title = title || "";
  layer.confirm(
    content, { title: title, icon: 3, btn: [sureText, closeText], resize: false },
    function (index) {//确定回调
    if (sureFunction) {
      sureFunction();
    }
    layer.close(index);
  }, function (index) {//cancel回调
  if (closeFunction) {
    closeFunction();
  }
    layer.close(index);
  });
},

 

相关文章:

  • 2022-12-23
  • 2021-04-20
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案