From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送
---
node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js | 108 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 66 insertions(+), 42 deletions(-)
diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js b/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
index 6acc75d..79077a4 100644
--- a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
+++ b/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
@@ -1,9 +1,9 @@
/**
-* @vue/reactivity v3.5.25
+* @vue/reactivity v3.5.32
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
-import { extend, hasChanged, isArray, isIntegerKey, isSymbol, isMap, hasOwn, makeMap, isObject, capitalize, toRawType, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, remove, NOOP } from '@vue/shared';
+import { extend, hasChanged, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, capitalize, toRawType, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, remove, NOOP } from '@vue/shared';
function warn(msg, ...args) {
console.warn(`[Vue warn] ${msg}`, ...args);
@@ -11,6 +11,7 @@
let activeEffectScope;
class EffectScope {
+ // TODO isolatedDeclarations "__v_skip"
constructor(detached = false) {
this.detached = detached;
/**
@@ -30,6 +31,7 @@
*/
this.cleanups = [];
this._isPaused = false;
+ this.__v_skip = true;
this.parent = activeEffectScope;
if (!detached && activeEffectScope) {
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
@@ -637,13 +639,13 @@
}
}
const targetMap = /* @__PURE__ */ new WeakMap();
-const ITERATE_KEY = Symbol(
+const ITERATE_KEY = /* @__PURE__ */ Symbol(
!!(process.env.NODE_ENV !== "production") ? "Object iterate" : ""
);
-const MAP_KEY_ITERATE_KEY = Symbol(
+const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
!!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : ""
);
-const ARRAY_ITERATE_KEY = Symbol(
+const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
!!(process.env.NODE_ENV !== "production") ? "Array iterate" : ""
);
function track(target, type, key) {
@@ -915,10 +917,17 @@
}
function reduce(self, method, fn, args) {
const arr = shallowReadArray(self);
+ const needsWrap = arr !== self && !isShallow(self);
let wrappedFn = fn;
+ let wrapInitialAccumulator = false;
if (arr !== self) {
- if (!isShallow(self)) {
+ if (needsWrap) {
+ wrapInitialAccumulator = args.length === 0;
wrappedFn = function(acc, item, index) {
+ if (wrapInitialAccumulator) {
+ wrapInitialAccumulator = false;
+ acc = toWrapped(self, acc);
+ }
return fn.call(this, acc, toWrapped(self, item), index, self);
};
} else if (fn.length > 3) {
@@ -927,7 +936,8 @@
};
}
}
- return arr[method](wrappedFn, ...args);
+ const result = arr[method](wrappedFn, ...args);
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
}
function searchProxy(self, method, args) {
const arr = toRaw(self);
@@ -1130,20 +1140,20 @@
"iterate",
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
);
- return {
- // iterator protocol
- next() {
- const { value, done } = innerIterator.next();
- return done ? { value, done } : {
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
- done
- };
- },
- // iterable protocol
- [Symbol.iterator]() {
- return this;
+ return extend(
+ // inheriting all iterator properties
+ Object.create(innerIterator),
+ {
+ // iterator protocol
+ next() {
+ const { value, done } = innerIterator.next();
+ return done ? { value, done } : {
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
+ done
+ };
+ }
}
- };
+ );
};
}
function createReadonlyMethod(type) {
@@ -1217,15 +1227,14 @@
clear: createReadonlyMethod("clear")
} : {
add(value) {
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
- value = toRaw(value);
- }
const target = toRaw(this);
const proto = getProto(target);
- const hadKey = proto.has.call(target, value);
+ const rawValue = toRaw(value);
+ const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
+ const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
if (!hadKey) {
- target.add(value);
- trigger(target, "add", value, value);
+ target.add(valueToAdd);
+ trigger(target, "add", valueToAdd, valueToAdd);
}
return this;
},
@@ -1357,8 +1366,9 @@
function getTargetType(value) {
return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
}
+// @__NO_SIDE_EFFECTS__
function reactive(target) {
- if (isReadonly(target)) {
+ if (/* @__PURE__ */ isReadonly(target)) {
return target;
}
return createReactiveObject(
@@ -1369,6 +1379,7 @@
reactiveMap
);
}
+// @__NO_SIDE_EFFECTS__
function shallowReactive(target) {
return createReactiveObject(
target,
@@ -1378,6 +1389,7 @@
shallowReactiveMap
);
}
+// @__NO_SIDE_EFFECTS__
function readonly(target) {
return createReactiveObject(
target,
@@ -1387,6 +1399,7 @@
readonlyMap
);
}
+// @__NO_SIDE_EFFECTS__
function shallowReadonly(target) {
return createReactiveObject(
target,
@@ -1425,24 +1438,29 @@
proxyMap.set(target, proxy);
return proxy;
}
+// @__NO_SIDE_EFFECTS__
function isReactive(value) {
- if (isReadonly(value)) {
- return isReactive(value["__v_raw"]);
+ if (/* @__PURE__ */ isReadonly(value)) {
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
}
return !!(value && value["__v_isReactive"]);
}
+// @__NO_SIDE_EFFECTS__
function isReadonly(value) {
return !!(value && value["__v_isReadonly"]);
}
+// @__NO_SIDE_EFFECTS__
function isShallow(value) {
return !!(value && value["__v_isShallow"]);
}
+// @__NO_SIDE_EFFECTS__
function isProxy(value) {
return value ? !!value["__v_raw"] : false;
}
+// @__NO_SIDE_EFFECTS__
function toRaw(observed) {
const raw = observed && observed["__v_raw"];
- return raw ? toRaw(raw) : observed;
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
}
function markRaw(value) {
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
@@ -1450,20 +1468,23 @@
}
return value;
}
-const toReactive = (value) => isObject(value) ? reactive(value) : value;
-const toReadonly = (value) => isObject(value) ? readonly(value) : value;
+const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
+const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
+// @__NO_SIDE_EFFECTS__
function isRef(r) {
return r ? r["__v_isRef"] === true : false;
}
+// @__NO_SIDE_EFFECTS__
function ref(value) {
return createRef(value, false);
}
+// @__NO_SIDE_EFFECTS__
function shallowRef(value) {
return createRef(value, true);
}
function createRef(rawValue, shallow) {
- if (isRef(rawValue)) {
+ if (/* @__PURE__ */ isRef(rawValue)) {
return rawValue;
}
return new RefImpl(rawValue, shallow);
@@ -1525,7 +1546,7 @@
}
}
function unref(ref2) {
- return isRef(ref2) ? ref2.value : ref2;
+ return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
}
function toValue(source) {
return isFunction(source) ? source() : unref(source);
@@ -1534,7 +1555,7 @@
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
set: (target, key, value, receiver) => {
const oldValue = target[key];
- if (isRef(oldValue) && !isRef(value)) {
+ if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
oldValue.value = value;
return true;
} else {
@@ -1564,6 +1585,7 @@
function customRef(factory) {
return new CustomRefImpl(factory);
}
+// @__NO_SIDE_EFFECTS__
function toRefs(object) {
if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) {
warn(`toRefs() expects a reactive object but received a plain one.`);
@@ -1575,16 +1597,16 @@
return ret;
}
class ObjectRefImpl {
- constructor(_object, _key, _defaultValue) {
+ constructor(_object, key, _defaultValue) {
this._object = _object;
- this._key = _key;
this._defaultValue = _defaultValue;
this["__v_isRef"] = true;
this._value = void 0;
+ this._key = isSymbol(key) ? key : String(key);
this._raw = toRaw(_object);
let shallow = true;
let obj = _object;
- if (!isArray(_object) || !isIntegerKey(String(_key))) {
+ if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
do {
shallow = !isProxy(obj) || isShallow(obj);
} while (shallow && (obj = obj["__v_raw"]));
@@ -1599,9 +1621,9 @@
return this._value = val === void 0 ? this._defaultValue : val;
}
set value(newVal) {
- if (this._shallow && isRef(this._raw[this._key])) {
+ if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
const nestedRef = this._object[this._key];
- if (isRef(nestedRef)) {
+ if (/* @__PURE__ */ isRef(nestedRef)) {
nestedRef.value = newVal;
return;
}
@@ -1623,15 +1645,16 @@
return this._value = this._getter();
}
}
+// @__NO_SIDE_EFFECTS__
function toRef(source, key, defaultValue) {
- if (isRef(source)) {
+ if (/* @__PURE__ */ isRef(source)) {
return source;
} else if (isFunction(source)) {
return new GetterRefImpl(source);
} else if (isObject(source) && arguments.length > 1) {
return propertyToRef(source, key, defaultValue);
} else {
- return ref(source);
+ return /* @__PURE__ */ ref(source);
}
}
function propertyToRef(source, key, defaultValue) {
@@ -1712,6 +1735,7 @@
}
}
}
+// @__NO_SIDE_EFFECTS__
function computed(getterOrOptions, debugOptions, isSSR = false) {
let getter;
let setter;
--
Gitblit v1.9.3