zoukankan      html  css  js  c++  java
  • 使用Layer Confirm弹窗没有点击确定按钮就执行了确定方法

    使用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);
      });
    },

  • 相关阅读:
    Chrome快捷键统计
    数据封装
    数据抽象
    linux c++ 服务器端开发面试必看书籍(转载)
    闭包和高阶函数
    this,call,apply,bind
    DOM浏览器window对象模型
    jquery滚动条
    xml教程
    多态
  • 原文地址:https://www.cnblogs.com/opts/p/9027967.html
Copyright © 2011-2022 走看看