vue 3.4.28 → 3.4.30
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 -58
- package/dist/vue.esm-browser.prod.js +6 -9
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +73 -58
- package/dist/vue.global.prod.js +6 -10
- package/dist/vue.runtime.esm-browser.js +72 -55
- package/dist/vue.runtime.esm-browser.prod.js +2 -9
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +72 -55
- package/dist/vue.runtime.global.prod.js +2 -10
- 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.4.
|
|
2
|
+
* vue v3.4.30
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -481,7 +481,7 @@ var Vue = (function (exports) {
|
|
|
481
481
|
/**
|
|
482
482
|
* @internal
|
|
483
483
|
*/
|
|
484
|
-
this._dirtyLevel =
|
|
484
|
+
this._dirtyLevel = 5;
|
|
485
485
|
/**
|
|
486
486
|
* @internal
|
|
487
487
|
*/
|
|
@@ -501,14 +501,20 @@ var Vue = (function (exports) {
|
|
|
501
501
|
recordEffectScope(this, scope);
|
|
502
502
|
}
|
|
503
503
|
get dirty() {
|
|
504
|
-
if (this._dirtyLevel === 2
|
|
504
|
+
if (this._dirtyLevel === 2)
|
|
505
|
+
return false;
|
|
506
|
+
if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
|
|
505
507
|
this._dirtyLevel = 1;
|
|
506
508
|
pauseTracking();
|
|
507
509
|
for (let i = 0; i < this._depsLength; i++) {
|
|
508
510
|
const dep = this.deps[i];
|
|
509
511
|
if (dep.computed) {
|
|
512
|
+
if (dep.computed.effect._dirtyLevel === 2) {
|
|
513
|
+
resetTracking();
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
510
516
|
triggerComputed(dep.computed);
|
|
511
|
-
if (this._dirtyLevel >=
|
|
517
|
+
if (this._dirtyLevel >= 5) {
|
|
512
518
|
break;
|
|
513
519
|
}
|
|
514
520
|
}
|
|
@@ -518,10 +524,10 @@ var Vue = (function (exports) {
|
|
|
518
524
|
}
|
|
519
525
|
resetTracking();
|
|
520
526
|
}
|
|
521
|
-
return this._dirtyLevel >=
|
|
527
|
+
return this._dirtyLevel >= 5;
|
|
522
528
|
}
|
|
523
529
|
set dirty(v) {
|
|
524
|
-
this._dirtyLevel = v ?
|
|
530
|
+
this._dirtyLevel = v ? 5 : 0;
|
|
525
531
|
}
|
|
526
532
|
run() {
|
|
527
533
|
this._dirtyLevel = 0;
|
|
@@ -643,8 +649,17 @@ var Vue = (function (exports) {
|
|
|
643
649
|
pauseScheduling();
|
|
644
650
|
for (const effect2 of dep.keys()) {
|
|
645
651
|
let tracking;
|
|
652
|
+
if (!dep.computed && effect2.computed) {
|
|
653
|
+
if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
654
|
+
effect2._dirtyLevel = 2;
|
|
655
|
+
continue;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
646
658
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
647
659
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
660
|
+
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
661
|
+
effect2._shouldSchedule = true;
|
|
662
|
+
}
|
|
648
663
|
effect2._dirtyLevel = dirtyLevel;
|
|
649
664
|
}
|
|
650
665
|
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
@@ -652,7 +667,7 @@ var Vue = (function (exports) {
|
|
|
652
667
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
653
668
|
}
|
|
654
669
|
effect2.trigger();
|
|
655
|
-
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !==
|
|
670
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
|
|
656
671
|
effect2._shouldSchedule = false;
|
|
657
672
|
if (effect2.scheduler) {
|
|
658
673
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
@@ -744,7 +759,7 @@ var Vue = (function (exports) {
|
|
|
744
759
|
if (dep) {
|
|
745
760
|
triggerEffects(
|
|
746
761
|
dep,
|
|
747
|
-
|
|
762
|
+
5,
|
|
748
763
|
{
|
|
749
764
|
target,
|
|
750
765
|
type,
|
|
@@ -1347,7 +1362,7 @@ var Vue = (function (exports) {
|
|
|
1347
1362
|
() => getter(this._value),
|
|
1348
1363
|
() => triggerRefValue(
|
|
1349
1364
|
this,
|
|
1350
|
-
this.effect._dirtyLevel ===
|
|
1365
|
+
this.effect._dirtyLevel === 3 ? 3 : 4
|
|
1351
1366
|
)
|
|
1352
1367
|
);
|
|
1353
1368
|
this.effect.computed = this;
|
|
@@ -1356,8 +1371,11 @@ var Vue = (function (exports) {
|
|
|
1356
1371
|
}
|
|
1357
1372
|
get value() {
|
|
1358
1373
|
const self = toRaw(this);
|
|
1374
|
+
const lastDirtyLevel = self.effect._dirtyLevel;
|
|
1359
1375
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1360
|
-
|
|
1376
|
+
if (lastDirtyLevel !== 3) {
|
|
1377
|
+
triggerRefValue(self, 5);
|
|
1378
|
+
}
|
|
1361
1379
|
}
|
|
1362
1380
|
trackRefValue(self);
|
|
1363
1381
|
if (self.effect._dirtyLevel >= 2) {
|
|
@@ -1366,7 +1384,7 @@ var Vue = (function (exports) {
|
|
|
1366
1384
|
|
|
1367
1385
|
getter: `, this.getter);
|
|
1368
1386
|
}
|
|
1369
|
-
triggerRefValue(self,
|
|
1387
|
+
triggerRefValue(self, 3);
|
|
1370
1388
|
}
|
|
1371
1389
|
return self._value;
|
|
1372
1390
|
}
|
|
@@ -1421,7 +1439,7 @@ getter: `, this.getter);
|
|
|
1421
1439
|
);
|
|
1422
1440
|
}
|
|
1423
1441
|
}
|
|
1424
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1442
|
+
function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
|
|
1425
1443
|
ref2 = toRaw(ref2);
|
|
1426
1444
|
const dep = ref2.dep;
|
|
1427
1445
|
if (dep) {
|
|
@@ -1472,12 +1490,12 @@ getter: `, this.getter);
|
|
|
1472
1490
|
const oldVal = this._rawValue;
|
|
1473
1491
|
this._rawValue = newVal;
|
|
1474
1492
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1475
|
-
triggerRefValue(this,
|
|
1493
|
+
triggerRefValue(this, 5, newVal, oldVal);
|
|
1476
1494
|
}
|
|
1477
1495
|
}
|
|
1478
1496
|
}
|
|
1479
1497
|
function triggerRef(ref2) {
|
|
1480
|
-
triggerRefValue(ref2,
|
|
1498
|
+
triggerRefValue(ref2, 5, ref2.value );
|
|
1481
1499
|
}
|
|
1482
1500
|
function unref(ref2) {
|
|
1483
1501
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -2805,7 +2823,6 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
2805
2823
|
}
|
|
2806
2824
|
},
|
|
2807
2825
|
hydrate: hydrateSuspense,
|
|
2808
|
-
create: createSuspenseBoundary,
|
|
2809
2826
|
normalize: normalizeSuspenseChildren
|
|
2810
2827
|
};
|
|
2811
2828
|
const Suspense = SuspenseImpl ;
|
|
@@ -5363,18 +5380,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5363
5380
|
let domType = node.nodeType;
|
|
5364
5381
|
vnode.el = node;
|
|
5365
5382
|
{
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
value: vnode,
|
|
5369
|
-
enumerable: false
|
|
5370
|
-
});
|
|
5371
|
-
}
|
|
5372
|
-
if (!("__vueParentComponent" in node)) {
|
|
5373
|
-
Object.defineProperty(node, "__vueParentComponent", {
|
|
5374
|
-
value: parentComponent,
|
|
5375
|
-
enumerable: false
|
|
5376
|
-
});
|
|
5377
|
-
}
|
|
5383
|
+
def(node, "__vnode", vnode, true);
|
|
5384
|
+
def(node, "__vueParentComponent", parentComponent, true);
|
|
5378
5385
|
}
|
|
5379
5386
|
if (patchFlag === -2) {
|
|
5380
5387
|
optimized = false;
|
|
@@ -5597,7 +5604,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
5597
5604
|
if (props) {
|
|
5598
5605
|
{
|
|
5599
5606
|
for (const key in props) {
|
|
5600
|
-
if (
|
|
5607
|
+
if (// #11189 skip if this node has directives that have created hooks
|
|
5608
|
+
// as it could have mutated the DOM in any possible way
|
|
5609
|
+
!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
5601
5610
|
logMismatchError();
|
|
5602
5611
|
}
|
|
5603
5612
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -5772,7 +5781,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5772
5781
|
return [hydrate, hydrateNode];
|
|
5773
5782
|
}
|
|
5774
5783
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5775
|
-
var _a;
|
|
5776
5784
|
let mismatchType;
|
|
5777
5785
|
let mismatchKey;
|
|
5778
5786
|
let actual;
|
|
@@ -5795,13 +5803,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5795
5803
|
}
|
|
5796
5804
|
}
|
|
5797
5805
|
}
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
(root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
|
|
5801
|
-
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
5802
|
-
for (const key2 in cssVars) {
|
|
5803
|
-
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
5804
|
-
}
|
|
5806
|
+
if (instance) {
|
|
5807
|
+
resolveCssVars(instance, vnode, expectedMap);
|
|
5805
5808
|
}
|
|
5806
5809
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
5807
5810
|
mismatchType = mismatchKey = "style";
|
|
@@ -5861,8 +5864,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5861
5864
|
const styleMap = /* @__PURE__ */ new Map();
|
|
5862
5865
|
for (const item of str.split(";")) {
|
|
5863
5866
|
let [key, value] = item.split(":");
|
|
5864
|
-
key = key
|
|
5865
|
-
value = value
|
|
5867
|
+
key = key.trim();
|
|
5868
|
+
value = value && value.trim();
|
|
5866
5869
|
if (key && value) {
|
|
5867
5870
|
styleMap.set(key, value);
|
|
5868
5871
|
}
|
|
@@ -5880,6 +5883,18 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5880
5883
|
}
|
|
5881
5884
|
return true;
|
|
5882
5885
|
}
|
|
5886
|
+
function resolveCssVars(instance, vnode, expectedMap) {
|
|
5887
|
+
const root = instance.subTree;
|
|
5888
|
+
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
5889
|
+
const cssVars = instance.getCssVars();
|
|
5890
|
+
for (const key in cssVars) {
|
|
5891
|
+
expectedMap.set(`--${key}`, String(cssVars[key]));
|
|
5892
|
+
}
|
|
5893
|
+
}
|
|
5894
|
+
if (vnode === root && instance.parent) {
|
|
5895
|
+
resolveCssVars(instance.parent, instance.vnode, expectedMap);
|
|
5896
|
+
}
|
|
5897
|
+
}
|
|
5883
5898
|
|
|
5884
5899
|
let supported;
|
|
5885
5900
|
let perf;
|
|
@@ -6197,14 +6212,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6197
6212
|
}
|
|
6198
6213
|
}
|
|
6199
6214
|
{
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
enumerable: false
|
|
6203
|
-
});
|
|
6204
|
-
Object.defineProperty(el, "__vueParentComponent", {
|
|
6205
|
-
value: parentComponent,
|
|
6206
|
-
enumerable: false
|
|
6207
|
-
});
|
|
6215
|
+
def(el, "__vnode", vnode, true);
|
|
6216
|
+
def(el, "__vueParentComponent", parentComponent, true);
|
|
6208
6217
|
}
|
|
6209
6218
|
if (dirs) {
|
|
6210
6219
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
@@ -6266,6 +6275,9 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6266
6275
|
};
|
|
6267
6276
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6268
6277
|
const el = n2.el = n1.el;
|
|
6278
|
+
{
|
|
6279
|
+
el.__vnode = n2;
|
|
6280
|
+
}
|
|
6269
6281
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
6270
6282
|
patchFlag |= n1.patchFlag & 16;
|
|
6271
6283
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
@@ -7160,6 +7172,9 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
7160
7172
|
dirs,
|
|
7161
7173
|
memoIndex
|
|
7162
7174
|
} = vnode;
|
|
7175
|
+
if (patchFlag === -2) {
|
|
7176
|
+
optimized = false;
|
|
7177
|
+
}
|
|
7163
7178
|
if (ref != null) {
|
|
7164
7179
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
7165
7180
|
}
|
|
@@ -7191,7 +7206,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
7191
7206
|
vnode,
|
|
7192
7207
|
parentComponent,
|
|
7193
7208
|
parentSuspense,
|
|
7194
|
-
optimized,
|
|
7195
7209
|
internals,
|
|
7196
7210
|
doRemove
|
|
7197
7211
|
);
|
|
@@ -8461,7 +8475,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8461
8475
|
}
|
|
8462
8476
|
updateCssVars(n2);
|
|
8463
8477
|
},
|
|
8464
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
8478
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
8465
8479
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
8466
8480
|
if (target) {
|
|
8467
8481
|
hostRemove(targetAnchor);
|
|
@@ -9633,7 +9647,7 @@ Component that was made reactive: `,
|
|
|
9633
9647
|
return true;
|
|
9634
9648
|
}
|
|
9635
9649
|
|
|
9636
|
-
const version = "3.4.
|
|
9650
|
+
const version = "3.4.30";
|
|
9637
9651
|
const warn = warn$1 ;
|
|
9638
9652
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9639
9653
|
const devtools = devtools$1 ;
|
|
@@ -10213,7 +10227,10 @@ Component that was made reactive: `,
|
|
|
10213
10227
|
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
10214
10228
|
el.removeAttribute(key);
|
|
10215
10229
|
} else {
|
|
10216
|
-
el.setAttribute(
|
|
10230
|
+
el.setAttribute(
|
|
10231
|
+
key,
|
|
10232
|
+
isBoolean ? "" : isSymbol(value) ? String(value) : value
|
|
10233
|
+
);
|
|
10217
10234
|
}
|
|
10218
10235
|
}
|
|
10219
10236
|
}
|
|
@@ -10374,7 +10391,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
10374
10391
|
parentSuspense,
|
|
10375
10392
|
unmountChildren
|
|
10376
10393
|
);
|
|
10377
|
-
if (key === "value" || key === "checked" || key === "selected") {
|
|
10394
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
10378
10395
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
10379
10396
|
}
|
|
10380
10397
|
} else {
|
|
@@ -10422,8 +10439,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
10422
10439
|
|
|
10423
10440
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
10424
10441
|
// @__NO_SIDE_EFFECTS__
|
|
10425
|
-
function defineCustomElement(options, hydrate2) {
|
|
10426
|
-
const Comp = defineComponent(options);
|
|
10442
|
+
function defineCustomElement(options, extraOptions, hydrate2) {
|
|
10443
|
+
const Comp = defineComponent(options, extraOptions);
|
|
10427
10444
|
class VueCustomElement extends VueElement {
|
|
10428
10445
|
constructor(initialProps) {
|
|
10429
10446
|
super(Comp, initialProps, hydrate2);
|
|
@@ -10433,8 +10450,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
10433
10450
|
return VueCustomElement;
|
|
10434
10451
|
}
|
|
10435
10452
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
10436
|
-
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
10437
|
-
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
10453
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
10454
|
+
return /* @__PURE__ */ defineCustomElement(options, extraOptions, hydrate);
|
|
10438
10455
|
};
|
|
10439
10456
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
10440
10457
|
};
|
|
@@ -14957,9 +14974,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14957
14974
|
break;
|
|
14958
14975
|
}
|
|
14959
14976
|
}
|
|
14960
|
-
if (prev && isTemplateNode(prev) && findDir(prev,
|
|
14961
|
-
children.splice(i, 1);
|
|
14962
|
-
i--;
|
|
14977
|
+
if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
|
|
14963
14978
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
14964
14979
|
while (conditional.alternate.type === 19) {
|
|
14965
14980
|
conditional = conditional.alternate;
|