mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-13 06:39:41 +08:00
fix: 更新 Excel.loadAll 为 Excel.bindLoadDone ,绑定事件并加载完成后再回调
This commit is contained in:
parent
c9601938c9
commit
1617be2961
@ -42,7 +42,7 @@ define(function () {
|
|||||||
Excel.prototype.bind = function (done, filename, selector, options) {
|
Excel.prototype.bind = function (done, filename, selector, options) {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.options = options || {}
|
this.options = options || {}
|
||||||
this.loadAll(function (data) {
|
this.bindLoadDone(function (data) {
|
||||||
that.export(data, this.dataset.filename || filename, options);
|
that.export(data, this.dataset.filename || filename, options);
|
||||||
}, selector);
|
}, selector);
|
||||||
};
|
};
|
||||||
@ -52,7 +52,7 @@ define(function () {
|
|||||||
* @param done
|
* @param done
|
||||||
* @param selector
|
* @param selector
|
||||||
*/
|
*/
|
||||||
Excel.prototype.loadAll = function (done, selector) {
|
Excel.prototype.bindLoadDone = function (done, selector) {
|
||||||
let that = this;
|
let that = this;
|
||||||
$('body').off('click', selector || '[data-form-export]').on('click', selector || '[data-form-export]', function () {
|
$('body').off('click', selector || '[data-form-export]').on('click', selector || '[data-form-export]', function () {
|
||||||
let button = this, form = $(button).parents('form');
|
let button = this, form = $(button).parents('form');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user