mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 11:02:48 +08:00
解决layui的templet不传入lay_col的问题
This commit is contained in:
@@ -865,9 +865,9 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 如果未定义则默认使用value
|
// 如果未定义则默认使用value
|
||||||
// if (val.templet === undefined) {
|
if (val.templet === undefined) {
|
||||||
// cols[i][index]['templet'] = admin.table.value;
|
cols[i][index]['templet'] = admin.table.value;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (val.fieldFormat == undefined) {
|
if (val.fieldFormat == undefined) {
|
||||||
|
|
||||||
@@ -894,6 +894,20 @@ define(["jquery", "tableSelect", "ckeditor", 'miniTheme', 'tableData', 'citypick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重新整理配置参数,兼容templet在edit时缺少LAY_COL的问题,如果在layui2.8解决,那么应当删除这些代码
|
||||||
|
|
||||||
|
var endVal = {...col[index]};
|
||||||
|
endVal.endTemplet = endVal.templet;
|
||||||
|
endVal.templet = function(data){
|
||||||
|
if(!data.LAY_COL){
|
||||||
|
data.LAY_COL = this
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.endTemplet(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
cols[i][index] = endVal;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user