组件里面data设置了一个数组对象,发现调用setData方法无法更新,应该是这里的问题
// Recurse if we're merging plain objects or arrays
if (deep && copy && (is.hash(copy) || (copyIsArray = is.array(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && is.array(src) ? copy : [];
} else {
clone = src && is.hash(src) ? src : {};
}
// Never move original objects, clone them
target[name] = extend(deep, clone, copy);
// Don't bring in undefined values
} else if (typeof copy !== 'undefined') {
target[name] = copy;
}
组件里面data设置了一个数组对象,发现调用setData方法无法更新,应该是这里的问题
// Recurse if we're merging plain objects or arrays
if (deep && copy && (is.hash(copy) || (copyIsArray = is.array(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && is.array(src) ? copy : [];
} else {
clone = src && is.hash(src) ? src : {};
}