mirror of https://gitee.com/karson/fastadmin.git
优化上传图片后预览事件
parent
c2460a3241
commit
e097ae2429
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -254,8 +254,9 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
|||
var exportDataType = options.exportDataType;
|
||||
// 处理选中筛选框后按钮的状态统一变更
|
||||
table.on('check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table post-body.bs.table', function (e) {
|
||||
var allIds = table.bootstrapTable("getData").map(function (item) {
|
||||
return item[options.pk];
|
||||
var allIds = [];
|
||||
$.each(table.bootstrapTable("getData"), function (i, item) {
|
||||
allIds.push(typeof item[options.pk] != 'undefined' ? item[options.pk] : '');
|
||||
});
|
||||
var selectedIds = Table.api.selectedids(table, true),
|
||||
selectedData = Table.api.selecteddata(table, true);
|
||||
|
|
|
|||
|
|
@ -344,10 +344,12 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
|
|||
}
|
||||
var suffix = /[\.]?([a-zA-Z0-9]+)$/.exec(j);
|
||||
suffix = suffix ? suffix[1] : 'file';
|
||||
var data = {url: j, fullurl: Fast.api.cdnurl(j), data: $(that).data(), key: i, index: i, value: (json && typeof json[i] !== 'undefined' ? json[i] : null), suffix: suffix};
|
||||
var value = (json && typeof json[i] !== 'undefined' ? json[i] : null);
|
||||
var data = {url: j, fullurl: Fast.api.cdnurl(j), data: $(that).data(), key: i, index: i, value: value, row: value, suffix: suffix};
|
||||
var html = tpl ? Template(tpl, data) : Template.render(Upload.config.previewtpl, data);
|
||||
$("#" + preview_id).append(html);
|
||||
});
|
||||
refresh($("#" + preview_id).data("name"));
|
||||
});
|
||||
$("#" + input_id).trigger("change");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue