This commit is contained in:
2024-10-16 15:13:17 +08:00
parent 0c04f452ee
commit c7f2091874
8 changed files with 1223 additions and 1509 deletions

View File

@@ -172,13 +172,11 @@ function triggerRefValue(ref, newVal) {
}
}
}
var _a;
class ComputedRefImpl {
constructor(getter, _setter, isReadonly, isSSR) {
this._setter = _setter;
this.dep = void 0;
this.__v_isRef = true;
this[_a] = false;
this._dirty = true;
this.effect = new ReactiveEffect(getter, () => {
if (!this._dirty) {
@@ -203,7 +201,6 @@ class ComputedRefImpl {
this._setter(newValue);
}
}
_a = "__v_isReadonly";
function computed(getterOrOptions, debugOptions, isSSR = false) {
let getter;
let setter;