@vue/compat 3.4.15 → 3.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +93 -62
- package/dist/vue.cjs.prod.js +84 -58
- package/dist/vue.esm-browser.js +88 -65
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +88 -65
- package/dist/vue.global.js +88 -65
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +60 -53
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +60 -53
- package/dist/vue.runtime.global.js +60 -53
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -407,7 +407,7 @@ class ReactiveEffect {
|
|
|
407
407
|
/**
|
|
408
408
|
* @internal
|
|
409
409
|
*/
|
|
410
|
-
this._dirtyLevel =
|
|
410
|
+
this._dirtyLevel = 4;
|
|
411
411
|
/**
|
|
412
412
|
* @internal
|
|
413
413
|
*/
|
|
@@ -427,26 +427,27 @@ class ReactiveEffect {
|
|
|
427
427
|
recordEffectScope(this, scope);
|
|
428
428
|
}
|
|
429
429
|
get dirty() {
|
|
430
|
-
if (this._dirtyLevel ===
|
|
430
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
431
|
+
this._dirtyLevel = 1;
|
|
431
432
|
pauseTracking();
|
|
432
433
|
for (let i = 0; i < this._depsLength; i++) {
|
|
433
434
|
const dep = this.deps[i];
|
|
434
435
|
if (dep.computed) {
|
|
435
436
|
triggerComputed(dep.computed);
|
|
436
|
-
if (this._dirtyLevel >=
|
|
437
|
+
if (this._dirtyLevel >= 4) {
|
|
437
438
|
break;
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
441
|
}
|
|
441
|
-
if (this._dirtyLevel
|
|
442
|
+
if (this._dirtyLevel === 1) {
|
|
442
443
|
this._dirtyLevel = 0;
|
|
443
444
|
}
|
|
444
445
|
resetTracking();
|
|
445
446
|
}
|
|
446
|
-
return this._dirtyLevel >=
|
|
447
|
+
return this._dirtyLevel >= 4;
|
|
447
448
|
}
|
|
448
449
|
set dirty(v) {
|
|
449
|
-
this._dirtyLevel = v ?
|
|
450
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
450
451
|
}
|
|
451
452
|
run() {
|
|
452
453
|
this._dirtyLevel = 0;
|
|
@@ -486,7 +487,7 @@ function preCleanupEffect(effect2) {
|
|
|
486
487
|
effect2._depsLength = 0;
|
|
487
488
|
}
|
|
488
489
|
function postCleanupEffect(effect2) {
|
|
489
|
-
if (effect2.deps
|
|
490
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
490
491
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
491
492
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
492
493
|
}
|
|
@@ -569,29 +570,26 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
569
570
|
var _a;
|
|
570
571
|
pauseScheduling();
|
|
571
572
|
for (const effect2 of dep.keys()) {
|
|
572
|
-
|
|
573
|
-
|
|
573
|
+
let tracking;
|
|
574
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
575
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
574
576
|
effect2._dirtyLevel = dirtyLevel;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
}
|
|
578
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
579
|
+
{
|
|
580
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
581
|
+
}
|
|
582
|
+
effect2.trigger();
|
|
583
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
584
|
+
effect2._shouldSchedule = false;
|
|
585
|
+
if (effect2.scheduler) {
|
|
586
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
579
587
|
}
|
|
580
|
-
effect2.trigger();
|
|
581
588
|
}
|
|
582
589
|
}
|
|
583
590
|
}
|
|
584
|
-
scheduleEffects(dep);
|
|
585
591
|
resetScheduling();
|
|
586
592
|
}
|
|
587
|
-
function scheduleEffects(dep) {
|
|
588
|
-
for (const effect2 of dep.keys()) {
|
|
589
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
590
|
-
effect2._shouldSchedule = false;
|
|
591
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
593
|
|
|
596
594
|
const createDep = (cleanup, computed) => {
|
|
597
595
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -674,7 +672,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
674
672
|
if (dep) {
|
|
675
673
|
triggerEffects(
|
|
676
674
|
dep,
|
|
677
|
-
|
|
675
|
+
4,
|
|
678
676
|
{
|
|
679
677
|
target,
|
|
680
678
|
type,
|
|
@@ -1259,7 +1257,9 @@ function toRaw(observed) {
|
|
|
1259
1257
|
return raw ? toRaw(raw) : observed;
|
|
1260
1258
|
}
|
|
1261
1259
|
function markRaw(value) {
|
|
1262
|
-
|
|
1260
|
+
if (Object.isExtensible(value)) {
|
|
1261
|
+
def(value, "__v_skip", true);
|
|
1262
|
+
}
|
|
1263
1263
|
return value;
|
|
1264
1264
|
}
|
|
1265
1265
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1273,8 +1273,10 @@ class ComputedRefImpl {
|
|
|
1273
1273
|
this["__v_isReadonly"] = false;
|
|
1274
1274
|
this.effect = new ReactiveEffect(
|
|
1275
1275
|
() => getter(this._value),
|
|
1276
|
-
() => triggerRefValue(
|
|
1277
|
-
|
|
1276
|
+
() => triggerRefValue(
|
|
1277
|
+
this,
|
|
1278
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1279
|
+
)
|
|
1278
1280
|
);
|
|
1279
1281
|
this.effect.computed = this;
|
|
1280
1282
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1282,14 +1284,12 @@ class ComputedRefImpl {
|
|
|
1282
1284
|
}
|
|
1283
1285
|
get value() {
|
|
1284
1286
|
const self = toRaw(this);
|
|
1285
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1286
|
-
|
|
1287
|
-
triggerRefValue(self, 2);
|
|
1288
|
-
}
|
|
1287
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1288
|
+
triggerRefValue(self, 4);
|
|
1289
1289
|
}
|
|
1290
1290
|
trackRefValue(self);
|
|
1291
|
-
if (self.effect._dirtyLevel >=
|
|
1292
|
-
triggerRefValue(self,
|
|
1291
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1292
|
+
triggerRefValue(self, 2);
|
|
1293
1293
|
}
|
|
1294
1294
|
return self._value;
|
|
1295
1295
|
}
|
|
@@ -1327,14 +1327,15 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
1329
1329
|
function trackRefValue(ref2) {
|
|
1330
|
+
var _a;
|
|
1330
1331
|
if (shouldTrack && activeEffect) {
|
|
1331
1332
|
ref2 = toRaw(ref2);
|
|
1332
1333
|
trackEffect(
|
|
1333
1334
|
activeEffect,
|
|
1334
|
-
ref2.dep
|
|
1335
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1335
1336
|
() => ref2.dep = void 0,
|
|
1336
1337
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1337
|
-
)
|
|
1338
|
+
),
|
|
1338
1339
|
{
|
|
1339
1340
|
target: ref2,
|
|
1340
1341
|
type: "get",
|
|
@@ -1343,7 +1344,7 @@ function trackRefValue(ref2) {
|
|
|
1343
1344
|
);
|
|
1344
1345
|
}
|
|
1345
1346
|
}
|
|
1346
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1347
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1347
1348
|
ref2 = toRaw(ref2);
|
|
1348
1349
|
const dep = ref2.dep;
|
|
1349
1350
|
if (dep) {
|
|
@@ -1392,12 +1393,12 @@ class RefImpl {
|
|
|
1392
1393
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1393
1394
|
this._rawValue = newVal;
|
|
1394
1395
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1395
|
-
triggerRefValue(this,
|
|
1396
|
+
triggerRefValue(this, 4, newVal);
|
|
1396
1397
|
}
|
|
1397
1398
|
}
|
|
1398
1399
|
}
|
|
1399
1400
|
function triggerRef(ref2) {
|
|
1400
|
-
triggerRefValue(ref2,
|
|
1401
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1401
1402
|
}
|
|
1402
1403
|
function unref(ref2) {
|
|
1403
1404
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -6436,7 +6437,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6436
6437
|
return vm;
|
|
6437
6438
|
}
|
|
6438
6439
|
}
|
|
6439
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6440
|
+
Vue.version = `2.6.14-compat:${"3.4.16"}`;
|
|
6440
6441
|
Vue.config = singletonApp.config;
|
|
6441
6442
|
Vue.use = (p, ...options) => {
|
|
6442
6443
|
if (p && isFunction(p.install)) {
|
|
@@ -6981,11 +6982,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6981
6982
|
return app;
|
|
6982
6983
|
},
|
|
6983
6984
|
runWithContext(fn) {
|
|
6985
|
+
const lastApp = currentApp;
|
|
6984
6986
|
currentApp = app;
|
|
6985
6987
|
try {
|
|
6986
6988
|
return fn();
|
|
6987
6989
|
} finally {
|
|
6988
|
-
currentApp =
|
|
6990
|
+
currentApp = lastApp;
|
|
6989
6991
|
}
|
|
6990
6992
|
}
|
|
6991
6993
|
};
|
|
@@ -7643,10 +7645,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7643
7645
|
} else {
|
|
7644
7646
|
const _isString = isString(ref);
|
|
7645
7647
|
const _isRef = isRef(ref);
|
|
7646
|
-
const isVFor = rawRef.f;
|
|
7647
7648
|
if (_isString || _isRef) {
|
|
7648
7649
|
const doSet = () => {
|
|
7649
|
-
if (
|
|
7650
|
+
if (rawRef.f) {
|
|
7650
7651
|
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
7651
7652
|
if (isUnmount) {
|
|
7652
7653
|
isArray(existing) && remove(existing, refValue);
|
|
@@ -7679,11 +7680,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7679
7680
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
7680
7681
|
}
|
|
7681
7682
|
};
|
|
7682
|
-
if (
|
|
7683
|
-
doSet();
|
|
7684
|
-
} else {
|
|
7683
|
+
if (value) {
|
|
7685
7684
|
doSet.id = -1;
|
|
7686
7685
|
queuePostRenderEffect(doSet, parentSuspense);
|
|
7686
|
+
} else {
|
|
7687
|
+
doSet();
|
|
7687
7688
|
}
|
|
7688
7689
|
} else {
|
|
7689
7690
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
@@ -7982,7 +7983,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
7982
7983
|
if (props) {
|
|
7983
7984
|
{
|
|
7984
7985
|
for (const key in props) {
|
|
7985
|
-
if (propHasMismatch(el, key, props[key], vnode)) {
|
|
7986
|
+
if (propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
7986
7987
|
hasMismatch = true;
|
|
7987
7988
|
}
|
|
7988
7989
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -8157,7 +8158,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8157
8158
|
};
|
|
8158
8159
|
return [hydrate, hydrateNode];
|
|
8159
8160
|
}
|
|
8160
|
-
function propHasMismatch(el, key, clientValue, vnode) {
|
|
8161
|
+
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
8162
|
+
var _a;
|
|
8161
8163
|
let mismatchType;
|
|
8162
8164
|
let mismatchKey;
|
|
8163
8165
|
let actual;
|
|
@@ -8180,6 +8182,10 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
8180
8182
|
}
|
|
8181
8183
|
}
|
|
8182
8184
|
}
|
|
8185
|
+
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
8186
|
+
for (const key2 in cssVars) {
|
|
8187
|
+
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
8188
|
+
}
|
|
8183
8189
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
8184
8190
|
mismatchType = mismatchKey = "style";
|
|
8185
8191
|
}
|
|
@@ -11253,7 +11259,7 @@ function isMemoSame(cached, memo) {
|
|
|
11253
11259
|
return true;
|
|
11254
11260
|
}
|
|
11255
11261
|
|
|
11256
|
-
const version = "3.4.
|
|
11262
|
+
const version = "3.4.16";
|
|
11257
11263
|
const warn = warn$1 ;
|
|
11258
11264
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11259
11265
|
const devtools = devtools$1 ;
|
|
@@ -11674,7 +11680,7 @@ const vShow = {
|
|
|
11674
11680
|
}
|
|
11675
11681
|
},
|
|
11676
11682
|
updated(el, { value, oldValue }, { transition }) {
|
|
11677
|
-
if (!value === !oldValue)
|
|
11683
|
+
if (!value === !oldValue && el.style.display === el[vShowOldKey])
|
|
11678
11684
|
return;
|
|
11679
11685
|
if (transition) {
|
|
11680
11686
|
if (value) {
|
|
@@ -11713,6 +11719,9 @@ function useCssVars(getter) {
|
|
|
11713
11719
|
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
11714
11720
|
).forEach((node) => setVarsOnNode(node, vars));
|
|
11715
11721
|
};
|
|
11722
|
+
{
|
|
11723
|
+
instance.getCssVars = () => getter(instance.proxy);
|
|
11724
|
+
}
|
|
11716
11725
|
const setVars = () => {
|
|
11717
11726
|
const vars = getter(instance.proxy);
|
|
11718
11727
|
setVarsOnVNode(instance.subTree, vars);
|
|
@@ -11793,6 +11802,7 @@ function patchStyle(el, prev, next) {
|
|
|
11793
11802
|
}
|
|
11794
11803
|
}
|
|
11795
11804
|
if (vShowOldKey in el) {
|
|
11805
|
+
el[vShowOldKey] = style.display;
|
|
11796
11806
|
style.display = currentDisplay;
|
|
11797
11807
|
}
|
|
11798
11808
|
}
|
|
@@ -12642,9 +12652,6 @@ function setSelected(el, value, oldValue, number) {
|
|
|
12642
12652
|
);
|
|
12643
12653
|
return;
|
|
12644
12654
|
}
|
|
12645
|
-
if (isArrayValue && looseEqual(value, oldValue)) {
|
|
12646
|
-
return;
|
|
12647
|
-
}
|
|
12648
12655
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
12649
12656
|
const option = el.options[i];
|
|
12650
12657
|
const optionValue = getValue(option);
|