wx-component icon indicating copy to clipboard operation
wx-component copied to clipboard

组件里面更新数组对象失败

Open zhongzepeng opened this issue 7 years ago • 0 comments

组件里面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;
    }

zhongzepeng avatar Jul 14 '17 10:07 zhongzepeng