Skip to content

Commit 08d31d7

Browse files
zhouhuan751312gitee-org
authored andcommitted
!13 修复页面多表格 回调函数问题
Merge pull request !13 from 周周/dev
2 parents f0a023a + 5b3f95b commit 08d31d7

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

fast-framework/src/main/resources/static/js/fastJS.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* @author ZhouHuan 二次封装 新增若干方法优化部分BUG
55
* @date 2020-02-20
66
* 2020-05-17 修复导出报表问题
7-
* @version v1.0.10
7+
* 2020-06-24 修复表格控件 页面多表格 回调函数错乱问题
8+
* @version v1.0.11
89
*/
910
if (typeof jQuery === "undefined") {
1011
throw new Error("fastJS JavaScript requires jQuery")
@@ -18,7 +19,7 @@ if (typeof jQuery === "undefined") {
1819
_tabIndex:-999,
1920
tindex:0,
2021
pushMenu:null,
21-
version:'1.0.1',
22+
version:'1.0.11',
2223
debug:true,
2324
//表格类型
2425
table_type : {
@@ -2457,6 +2458,7 @@ if (typeof jQuery === "undefined") {
24572458
opt.table.config[options.id] = options;
24582459
$.table.initEvent();
24592460
$('#' + options.id).bootstrapTable({
2461+
id: options.id, // 对象ID
24602462
url: options.url, // 请求后台的URL(*)
24612463
contentType: "application/x-www-form-urlencoded", // 发送到服务器的数据编码类型
24622464
method: 'post', // 请求方式(*)
@@ -2568,8 +2570,8 @@ if (typeof jQuery === "undefined") {
25682570
},
25692571
// 请求获取数据后处理回调函数
25702572
responseHandler: function(res) {
2571-
if (typeof opt.table.options.responseHandler == "function") {
2572-
opt.table.options.responseHandler(res);
2573+
if (typeof opt.table.get(this.id).responseHandler == "function") {
2574+
opt.table.get(this.id).responseHandler(res);
25732575
}
25742576
if (res.code == 0) {
25752577
if (opt.common.isNotEmpty(opt.table.options.sidePagination) && opt.table.options.sidePagination == 'client') {

0 commit comments

Comments
 (0)