【问题标题】:Dropzone.js - to call or use 2 init functionDropzone.js - 调用或使用2个init函数
【发布时间】:2015-06-29 05:29:53
【问题描述】:

我正在为我的项目使用 dropzone.js。 是否可以在那里使用或调用两(2)个“init:function”?

感谢您的帮助。

我有这个

    Dropzone.options.filedrop = {
       maxFilesize: 4096,
       init: function () {
           this.on("complete", function (file) {
               doSomething();
          });
       }
    };

【问题讨论】:

    标签: dropzone.js


    【解决方案1】:

    当然,你可以这样做:

    Dropzone.options.filedrop = {
        maxFilesize: 4096,
        init: function () {
            this.on("complete", function (file) {
                doSomething();
            }),
            this.on('sending', function () {
                doSomethingElse();
            })
        }
    };
    

    【讨论】:

      猜你喜欢
      • 2019-11-12
      • 2021-12-04
      • 2020-08-13
      • 2013-08-07
      • 2015-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-27
      相关资源
      最近更新 更多