MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / set

Method set

tech-study.js:961–971  ·  view source on GitHub ↗
(newVal)

Source from the content-addressed store, hash-verified

959 return _this._value;
960 },
961 set(newVal) {
962 // 旧数据
963 const oldVal = this._value;
964 // 数据变化
965 if (oldVal !== newVal) {
966 // 设置新数据值
967 _this._value = newVal;
968 // 通知依赖
969 triggerRef(this, newVal, oldVal);
970 }
971 },
972 });
973 }
974 toJSON() {

Callers 4

trackRefFunction · 0.45
trackFunction · 0.45
createSettersFunction · 0.45
createReactiveObjFunction · 0.45

Calls 1

triggerRefFunction · 0.70

Tested by

no test coverage detected