MCPcopy Index your code
hub / github.com/ygs-code/vue / dependArray

Function dependArray

vue.js:1669–1679  ·  view source on GitHub ↗

* Collect dependencies on array elements when the array is touched, since * we cannot intercept array element access like property getters. * 在数组被触摸时收集数组元素的依赖关系,因为 * 我们不能拦截数组元素访问,如属性吸收器。 * 参数是数组

(value)

Source from the content-addressed store, hash-verified

1667 * 参数是数组
1668 */
1669 function dependArray(value) {
1670 for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
1671 e = value[i];
1672 //添加一个dep
1673 e && e.__ob__ && e.__ob__.dep.depend();
1674 //递归
1675 if (Array.isArray(e)) {
1676 dependArray(e);
1677 }
1678 }
1679 }
1680
1681 /* */
1682

Callers 1

defineReactiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected