vue 3.5.1 → 3.5.2
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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +73 -51
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +73 -51
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +64 -43
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +64 -43
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.esm-bundler.js
CHANGED
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -691,9 +691,6 @@ var Vue = (function (exports) {
|
|
|
691
691
|
return false;
|
|
692
692
|
}
|
|
693
693
|
function refreshComputed(computed) {
|
|
694
|
-
if (computed.flags & 2) {
|
|
695
|
-
return false;
|
|
696
|
-
}
|
|
697
694
|
if (computed.flags & 4 && !(computed.flags & 16)) {
|
|
698
695
|
return;
|
|
699
696
|
}
|
|
@@ -714,7 +711,7 @@ var Vue = (function (exports) {
|
|
|
714
711
|
shouldTrack = true;
|
|
715
712
|
try {
|
|
716
713
|
prepareDeps(computed);
|
|
717
|
-
const value = computed.fn();
|
|
714
|
+
const value = computed.fn(computed._value);
|
|
718
715
|
if (dep.version === 0 || hasChanged(value, computed._value)) {
|
|
719
716
|
computed._value = value;
|
|
720
717
|
dep.version++;
|
|
@@ -823,7 +820,7 @@ var Vue = (function (exports) {
|
|
|
823
820
|
}
|
|
824
821
|
}
|
|
825
822
|
track(debugInfo) {
|
|
826
|
-
if (!activeSub || !shouldTrack) {
|
|
823
|
+
if (!activeSub || !shouldTrack || activeSub === this.computed) {
|
|
827
824
|
return;
|
|
828
825
|
}
|
|
829
826
|
let link = this.activeLink;
|
|
@@ -1836,7 +1833,7 @@ var Vue = (function (exports) {
|
|
|
1836
1833
|
return isFunction(source) ? source() : unref(source);
|
|
1837
1834
|
}
|
|
1838
1835
|
const shallowUnwrapHandlers = {
|
|
1839
|
-
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
|
|
1836
|
+
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1840
1837
|
set: (target, key, value, receiver) => {
|
|
1841
1838
|
const oldValue = target[key];
|
|
1842
1839
|
if (isRef(oldValue) && !isRef(value)) {
|
|
@@ -1968,8 +1965,8 @@ var Vue = (function (exports) {
|
|
|
1968
1965
|
* @internal
|
|
1969
1966
|
*/
|
|
1970
1967
|
notify() {
|
|
1968
|
+
this.flags |= 16;
|
|
1971
1969
|
if (activeSub !== this) {
|
|
1972
|
-
this.flags |= 16;
|
|
1973
1970
|
this.dep.notify();
|
|
1974
1971
|
}
|
|
1975
1972
|
}
|
|
@@ -2538,9 +2535,7 @@ var Vue = (function (exports) {
|
|
|
2538
2535
|
} else {
|
|
2539
2536
|
queue.splice(findInsertionIndex(jobId), 0, job);
|
|
2540
2537
|
}
|
|
2541
|
-
|
|
2542
|
-
job.flags |= 1;
|
|
2543
|
-
}
|
|
2538
|
+
job.flags |= 1;
|
|
2544
2539
|
queueFlush();
|
|
2545
2540
|
}
|
|
2546
2541
|
}
|
|
@@ -2556,9 +2551,7 @@ var Vue = (function (exports) {
|
|
|
2556
2551
|
activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
|
|
2557
2552
|
} else if (!(cb.flags & 1)) {
|
|
2558
2553
|
pendingPostFlushCbs.push(cb);
|
|
2559
|
-
|
|
2560
|
-
cb.flags |= 1;
|
|
2561
|
-
}
|
|
2554
|
+
cb.flags |= 1;
|
|
2562
2555
|
}
|
|
2563
2556
|
} else {
|
|
2564
2557
|
pendingPostFlushCbs.push(...cb);
|
|
@@ -2580,6 +2573,9 @@ var Vue = (function (exports) {
|
|
|
2580
2573
|
}
|
|
2581
2574
|
queue.splice(i, 1);
|
|
2582
2575
|
i--;
|
|
2576
|
+
if (cb.flags & 4) {
|
|
2577
|
+
cb.flags &= ~1;
|
|
2578
|
+
}
|
|
2583
2579
|
cb();
|
|
2584
2580
|
cb.flags &= ~1;
|
|
2585
2581
|
}
|
|
@@ -2604,6 +2600,9 @@ var Vue = (function (exports) {
|
|
|
2604
2600
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2605
2601
|
continue;
|
|
2606
2602
|
}
|
|
2603
|
+
if (cb.flags & 4) {
|
|
2604
|
+
cb.flags &= ~1;
|
|
2605
|
+
}
|
|
2607
2606
|
if (!(cb.flags & 8)) cb();
|
|
2608
2607
|
cb.flags &= ~1;
|
|
2609
2608
|
}
|
|
@@ -2626,6 +2625,9 @@ var Vue = (function (exports) {
|
|
|
2626
2625
|
if (check(job)) {
|
|
2627
2626
|
continue;
|
|
2628
2627
|
}
|
|
2628
|
+
if (job.flags & 4) {
|
|
2629
|
+
job.flags &= ~1;
|
|
2630
|
+
}
|
|
2629
2631
|
callWithErrorHandling(
|
|
2630
2632
|
job,
|
|
2631
2633
|
job.i,
|
|
@@ -2635,6 +2637,12 @@ var Vue = (function (exports) {
|
|
|
2635
2637
|
}
|
|
2636
2638
|
}
|
|
2637
2639
|
} finally {
|
|
2640
|
+
for (; flushIndex < queue.length; flushIndex++) {
|
|
2641
|
+
const job = queue[flushIndex];
|
|
2642
|
+
if (job) {
|
|
2643
|
+
job.flags &= ~1;
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2638
2646
|
flushIndex = 0;
|
|
2639
2647
|
queue.length = 0;
|
|
2640
2648
|
flushPostFlushCbs(seen);
|
|
@@ -3391,6 +3399,7 @@ var Vue = (function (exports) {
|
|
|
3391
3399
|
if (!(instance.job.flags & 8)) {
|
|
3392
3400
|
instance.update();
|
|
3393
3401
|
}
|
|
3402
|
+
delete leavingHooks.afterLeave;
|
|
3394
3403
|
};
|
|
3395
3404
|
return emptyPlaceholder(child);
|
|
3396
3405
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
@@ -3668,6 +3677,34 @@ var Vue = (function (exports) {
|
|
|
3668
3677
|
instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
|
|
3669
3678
|
}
|
|
3670
3679
|
|
|
3680
|
+
const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
|
|
3681
|
+
function useTemplateRef(key) {
|
|
3682
|
+
const i = getCurrentInstance();
|
|
3683
|
+
const r = shallowRef(null);
|
|
3684
|
+
if (i) {
|
|
3685
|
+
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
3686
|
+
let desc;
|
|
3687
|
+
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
3688
|
+
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
3689
|
+
} else {
|
|
3690
|
+
Object.defineProperty(refs, key, {
|
|
3691
|
+
enumerable: true,
|
|
3692
|
+
get: () => r.value,
|
|
3693
|
+
set: (val) => r.value = val
|
|
3694
|
+
});
|
|
3695
|
+
}
|
|
3696
|
+
} else {
|
|
3697
|
+
warn$1(
|
|
3698
|
+
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
3699
|
+
);
|
|
3700
|
+
}
|
|
3701
|
+
const ret = readonly(r) ;
|
|
3702
|
+
{
|
|
3703
|
+
knownTemplateRefs.add(ret);
|
|
3704
|
+
}
|
|
3705
|
+
return ret;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3671
3708
|
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
3672
3709
|
if (isArray(rawRef)) {
|
|
3673
3710
|
rawRef.forEach(
|
|
@@ -3696,7 +3733,13 @@ var Vue = (function (exports) {
|
|
|
3696
3733
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
3697
3734
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
3698
3735
|
const setupState = owner.setupState;
|
|
3699
|
-
const
|
|
3736
|
+
const rawSetupState = toRaw(setupState);
|
|
3737
|
+
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
3738
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3739
|
+
return false;
|
|
3740
|
+
}
|
|
3741
|
+
return hasOwn(rawSetupState, key);
|
|
3742
|
+
};
|
|
3700
3743
|
if (oldRef != null && oldRef !== ref) {
|
|
3701
3744
|
if (isString(oldRef)) {
|
|
3702
3745
|
refs[oldRef] = null;
|
|
@@ -4747,7 +4790,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4747
4790
|
return () => {
|
|
4748
4791
|
pendingCacheKey = null;
|
|
4749
4792
|
if (!slots.default) {
|
|
4750
|
-
return null;
|
|
4793
|
+
return current = null;
|
|
4751
4794
|
}
|
|
4752
4795
|
const children = slots.default();
|
|
4753
4796
|
const rawVNode = children[0];
|
|
@@ -8479,7 +8522,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8479
8522
|
data,
|
|
8480
8523
|
setupState,
|
|
8481
8524
|
ctx,
|
|
8482
|
-
inheritAttrs
|
|
8525
|
+
inheritAttrs,
|
|
8526
|
+
isMounted
|
|
8483
8527
|
} = instance;
|
|
8484
8528
|
const prev = setCurrentRenderingInstance(instance);
|
|
8485
8529
|
let result;
|
|
@@ -8599,7 +8643,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8599
8643
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8600
8644
|
);
|
|
8601
8645
|
}
|
|
8602
|
-
root.transition = vnode.transition;
|
|
8646
|
+
root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
|
|
8603
8647
|
}
|
|
8604
8648
|
if (setRoot) {
|
|
8605
8649
|
setRoot(root);
|
|
@@ -9093,7 +9137,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9093
9137
|
};
|
|
9094
9138
|
}
|
|
9095
9139
|
if (activeBranch) {
|
|
9096
|
-
if (parentNode(activeBranch.el)
|
|
9140
|
+
if (parentNode(activeBranch.el) === container2) {
|
|
9097
9141
|
anchor = next(activeBranch);
|
|
9098
9142
|
}
|
|
9099
9143
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
@@ -10140,29 +10184,6 @@ Component that was made reactive: `,
|
|
|
10140
10184
|
return c;
|
|
10141
10185
|
};
|
|
10142
10186
|
|
|
10143
|
-
function useTemplateRef(key) {
|
|
10144
|
-
const i = getCurrentInstance();
|
|
10145
|
-
const r = shallowRef(null);
|
|
10146
|
-
if (i) {
|
|
10147
|
-
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
10148
|
-
let desc;
|
|
10149
|
-
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
10150
|
-
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
10151
|
-
} else {
|
|
10152
|
-
Object.defineProperty(refs, key, {
|
|
10153
|
-
enumerable: true,
|
|
10154
|
-
get: () => r.value,
|
|
10155
|
-
set: (val) => r.value = val
|
|
10156
|
-
});
|
|
10157
|
-
}
|
|
10158
|
-
} else {
|
|
10159
|
-
warn$1(
|
|
10160
|
-
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
10161
|
-
);
|
|
10162
|
-
}
|
|
10163
|
-
return readonly(r) ;
|
|
10164
|
-
}
|
|
10165
|
-
|
|
10166
10187
|
function h(type, propsOrChildren, children) {
|
|
10167
10188
|
const l = arguments.length;
|
|
10168
10189
|
if (l === 2) {
|
|
@@ -10388,7 +10409,7 @@ Component that was made reactive: `,
|
|
|
10388
10409
|
return true;
|
|
10389
10410
|
}
|
|
10390
10411
|
|
|
10391
|
-
const version = "3.5.
|
|
10412
|
+
const version = "3.5.2";
|
|
10392
10413
|
const warn = warn$1 ;
|
|
10393
10414
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10394
10415
|
const devtools = devtools$1 ;
|
|
@@ -13704,7 +13725,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13704
13725
|
rawName: raw,
|
|
13705
13726
|
exp: void 0,
|
|
13706
13727
|
arg: void 0,
|
|
13707
|
-
modifiers: raw === "." ? ["prop"] : [],
|
|
13728
|
+
modifiers: raw === "." ? [createSimpleExpression("prop")] : [],
|
|
13708
13729
|
loc: getLoc(start)
|
|
13709
13730
|
};
|
|
13710
13731
|
if (name === "pre") {
|
|
@@ -13747,7 +13768,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13747
13768
|
setLocEnd(arg.loc, end);
|
|
13748
13769
|
}
|
|
13749
13770
|
} else {
|
|
13750
|
-
|
|
13771
|
+
const exp = createSimpleExpression(mod, true, getLoc(start, end));
|
|
13772
|
+
currentProp.modifiers.push(exp);
|
|
13751
13773
|
}
|
|
13752
13774
|
},
|
|
13753
13775
|
onattribdata(start, end) {
|
|
@@ -15702,7 +15724,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15702
15724
|
} else if (!arg.isStatic) {
|
|
15703
15725
|
arg.content = `${arg.content} || ""`;
|
|
15704
15726
|
}
|
|
15705
|
-
if (modifiers.
|
|
15727
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
15706
15728
|
if (arg.type === 4) {
|
|
15707
15729
|
if (arg.isStatic) {
|
|
15708
15730
|
arg.content = camelize(arg.content);
|
|
@@ -15715,10 +15737,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15715
15737
|
}
|
|
15716
15738
|
}
|
|
15717
15739
|
if (!context.inSSR) {
|
|
15718
|
-
if (modifiers.
|
|
15740
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
15719
15741
|
injectPrefix(arg, ".");
|
|
15720
15742
|
}
|
|
15721
|
-
if (modifiers.
|
|
15743
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
15722
15744
|
injectPrefix(arg, "^");
|
|
15723
15745
|
}
|
|
15724
15746
|
}
|
|
@@ -16489,7 +16511,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16489
16511
|
}
|
|
16490
16512
|
continue;
|
|
16491
16513
|
}
|
|
16492
|
-
if (isVBind && modifiers.
|
|
16514
|
+
if (isVBind && modifiers.some((mod) => mod.content === "prop")) {
|
|
16493
16515
|
patchFlag |= 32;
|
|
16494
16516
|
}
|
|
16495
16517
|
const directiveTransform = context.directiveTransforms[name];
|
|
@@ -17003,7 +17025,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17003
17025
|
createObjectProperty(eventName, assignmentExp)
|
|
17004
17026
|
];
|
|
17005
17027
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
17006
|
-
const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
17028
|
+
const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
17007
17029
|
const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
17008
17030
|
props.push(
|
|
17009
17031
|
createObjectProperty(
|
|
@@ -17403,7 +17425,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17403
17425
|
const nonKeyModifiers = [];
|
|
17404
17426
|
const eventOptionModifiers = [];
|
|
17405
17427
|
for (let i = 0; i < modifiers.length; i++) {
|
|
17406
|
-
const modifier = modifiers[i];
|
|
17428
|
+
const modifier = modifiers[i].content;
|
|
17407
17429
|
if (isEventOptionModifier(modifier)) {
|
|
17408
17430
|
eventOptionModifiers.push(modifier);
|
|
17409
17431
|
} else {
|