Permalink
Browse files

fix: fieldFlag变量不起作用

  • Loading branch information...
whizbz11 committed Dec 5, 2016
1 parent aba9594 commit 8acf508bd0182cfcc78e198c36370588844bd6ff
Showing with 15 additions and 7 deletions.
  1. +15 −7 js/dataTable/row-data.js
View
@@ -94,17 +94,25 @@ const setChildSimpleDataByRowId = function(rowId, data){
*/
const _setData = function(rowObj, sourceData, targetData, subscribe, parentKey, options){
for (var key in sourceData) {
// 判断是否要放到dataTable中
if (options && !options.fieldFlag ) {
if (!rowObj.parent.getMeta(key)){
continue;
}
}
var _parentKey = parentKey || null;
//if (targetData[key]) {
targetData[key] = targetData[key] || {};
var valueObj = sourceData[key]
if (typeof valueObj != 'object'){
if(typeof options == 'object'){
if(options.fieldFlag) {
rowObj.parent.createField(key);
}
}
}
// if (typeof valueObj != 'object'){
// if(typeof options == 'object'){
// if(options.fieldFlag) {
// rowObj.parent.createField(key);
// }
// }
// }
//if (typeof this.parent.meta[key] === 'undefined') continue;
if (valueObj == null || typeof valueObj != 'object'){

0 comments on commit 8acf508

Please sign in to comment.