@vue/compat 3.6.0-rc.14 → 3.6.0-rc.15
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/README.md +2 -2
- package/dist/vue-compat.d.ts +16 -5
- package/dist/vue.cjs.js +536 -235
- package/dist/vue.cjs.prod.js +435 -186
- package/dist/vue.esm-browser.js +513 -229
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +543 -235
- package/dist/vue.global.js +513 -229
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +513 -229
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +543 -235
- package/dist/vue.runtime.global.js +513 -229
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +3 -3
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -73,10 +73,18 @@ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" &
|
|
|
73
73
|
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
74
74
|
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
75
75
|
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
76
|
+
const STRING_CACHE_MAX_SIZE = 1e4;
|
|
76
77
|
const cacheStringFunction = (fn) => {
|
|
77
|
-
|
|
78
|
+
let cache = Object.create(null);
|
|
79
|
+
let size = 0;
|
|
78
80
|
return ((str) => {
|
|
79
|
-
|
|
81
|
+
const hit = cache[str];
|
|
82
|
+
if (hit !== void 0) return hit;
|
|
83
|
+
if (++size > STRING_CACHE_MAX_SIZE) {
|
|
84
|
+
cache = Object.create(null);
|
|
85
|
+
size = 1;
|
|
86
|
+
}
|
|
87
|
+
return cache[str] = fn(str);
|
|
80
88
|
});
|
|
81
89
|
};
|
|
82
90
|
const camelizeRE = /-(\w)/g;
|
|
@@ -84,22 +92,22 @@ const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
|
84
92
|
/**
|
|
85
93
|
* @private
|
|
86
94
|
*/
|
|
87
|
-
const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
95
|
+
const camelize = /*@__PURE__*/ cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
88
96
|
const hyphenateRE = /\B([A-Z])/g;
|
|
89
97
|
/**
|
|
90
98
|
* @private
|
|
91
99
|
*/
|
|
92
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
100
|
+
const hyphenate = /*@__PURE__*/ cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
93
101
|
/**
|
|
94
102
|
* @private
|
|
95
103
|
*/
|
|
96
|
-
const capitalize = cacheStringFunction((str) => {
|
|
104
|
+
const capitalize = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
97
105
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
98
106
|
});
|
|
99
107
|
/**
|
|
100
108
|
* @private
|
|
101
109
|
*/
|
|
102
|
-
const toHandlerKey = cacheStringFunction((str) => {
|
|
110
|
+
const toHandlerKey = /*@__PURE__*/ cacheStringFunction((str) => {
|
|
103
111
|
return str ? `on${capitalize(str)}` : ``;
|
|
104
112
|
});
|
|
105
113
|
/**
|
|
@@ -307,26 +315,11 @@ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
|
307
315
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
308
316
|
*/
|
|
309
317
|
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
310
|
-
|
|
311
|
-
//#region packages/shared/src/domAttrConfig.ts
|
|
312
|
-
/**
|
|
313
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
314
|
-
* have different names from their corresponding dom properties:
|
|
315
|
-
* - itemscope -> N/A
|
|
316
|
-
* - allowfullscreen -> allowFullscreen
|
|
317
|
-
* - formnovalidate -> formNoValidate
|
|
318
|
-
* - ismap -> isMap
|
|
319
|
-
* - nomodule -> noModule
|
|
320
|
-
* - novalidate -> noValidate
|
|
321
|
-
* - playsinline -> playsInline
|
|
322
|
-
* - readonly -> readOnly
|
|
323
|
-
*/
|
|
324
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
325
|
-
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
318
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");
|
|
326
319
|
/**
|
|
327
320
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
328
321
|
*/
|
|
329
|
-
const isBooleanAttr = /*@__PURE__*/ makeMap(
|
|
322
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
330
323
|
/**
|
|
331
324
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
332
325
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -575,40 +568,16 @@ function isVaporBranchStart(data) {
|
|
|
575
568
|
}
|
|
576
569
|
return true;
|
|
577
570
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
function onTrigger(sub) {
|
|
585
|
-
if (sub.onTrigger) {
|
|
586
|
-
const debugInfo = triggerEventInfos[triggerEventInfos.length - 1];
|
|
587
|
-
sub.onTrigger(extend({ effect: sub }, debugInfo));
|
|
588
|
-
}
|
|
571
|
+
/**
|
|
572
|
+
* The data of a comment opening a range only a vapor server render emits:
|
|
573
|
+
* `<!--{-->` around the render of a component, or a v-if branch's.
|
|
574
|
+
*/
|
|
575
|
+
function isVaporRangeStart(data) {
|
|
576
|
+
return data === "{" || isVaporBranchStart(data);
|
|
589
577
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
return this._onTrigger;
|
|
594
|
-
},
|
|
595
|
-
set(val) {
|
|
596
|
-
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
597
|
-
this._onTrigger = val;
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
function setupFlagsHandler(target) {
|
|
602
|
-
target._flags = target.flags;
|
|
603
|
-
Object.defineProperty(target, "flags", {
|
|
604
|
-
get() {
|
|
605
|
-
return target._flags;
|
|
606
|
-
},
|
|
607
|
-
set(value) {
|
|
608
|
-
if (!(target._flags & 48) && !!(value & 48)) onTrigger(this);
|
|
609
|
-
target._flags = value;
|
|
610
|
-
}
|
|
611
|
-
});
|
|
578
|
+
/** The data of the comment closing the range `open` opens. */
|
|
579
|
+
function rangeCloseOf(open) {
|
|
580
|
+
return open === "(" ? ")" : open === "{" ? "}" : "]";
|
|
612
581
|
}
|
|
613
582
|
//#endregion
|
|
614
583
|
//#region packages/reactivity/src/warning.ts
|
|
@@ -620,13 +589,7 @@ function warn$2(msg, ...args) {
|
|
|
620
589
|
const notifyBuffer = [];
|
|
621
590
|
let batchDepth = 0;
|
|
622
591
|
let activeSub = void 0;
|
|
623
|
-
|
|
624
|
-
function incRunDepth() {
|
|
625
|
-
++runDepth;
|
|
626
|
-
}
|
|
627
|
-
function decRunDepth() {
|
|
628
|
-
--runDepth;
|
|
629
|
-
}
|
|
592
|
+
const CHECKING = 512;
|
|
630
593
|
let globalVersion = 0;
|
|
631
594
|
let notifyIndex = 0;
|
|
632
595
|
let notifyBufferLength = 0;
|
|
@@ -675,6 +638,7 @@ function unlink(link, sub = link.sub) {
|
|
|
675
638
|
const nextDep = link.nextDep;
|
|
676
639
|
const nextSub = link.nextSub;
|
|
677
640
|
const prevSub = link.prevSub;
|
|
641
|
+
link.prevDep = link.nextDep = link.prevSub = link.nextSub = void 0;
|
|
678
642
|
if (nextDep !== void 0) nextDep.prevDep = prevDep;
|
|
679
643
|
else sub.depsTail = prevDep;
|
|
680
644
|
if (prevDep !== void 0) prevDep.nextDep = nextDep;
|
|
@@ -682,7 +646,7 @@ function unlink(link, sub = link.sub) {
|
|
|
682
646
|
if (nextSub !== void 0) nextSub.prevSub = prevSub;
|
|
683
647
|
else dep.subsTail = prevSub;
|
|
684
648
|
if (prevSub !== void 0) prevSub.nextSub = nextSub;
|
|
685
|
-
else if ((dep.subs = nextSub) === void 0) {
|
|
649
|
+
else if ((dep.subs = nextSub) === void 0 && dep.flags & 1) {
|
|
686
650
|
let toRemove = dep.deps;
|
|
687
651
|
if (toRemove !== void 0) {
|
|
688
652
|
do
|
|
@@ -700,14 +664,12 @@ function propagate(link) {
|
|
|
700
664
|
const sub = link.sub;
|
|
701
665
|
let flags = sub.flags;
|
|
702
666
|
if (flags & 3) {
|
|
703
|
-
if (!(flags &
|
|
704
|
-
|
|
705
|
-
if (runDepth) sub.flags |= 8;
|
|
706
|
-
} else if (!(flags & 12)) flags = 0;
|
|
667
|
+
if (!(flags & 44)) sub.flags = flags | 32;
|
|
668
|
+
else if (!(flags & 12)) flags = 0;
|
|
707
669
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
708
670
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
709
671
|
sub.flags = flags | 40;
|
|
710
|
-
flags
|
|
672
|
+
flags = sub === activeSub || activeSub === void 0 ? 0 : flags & 1;
|
|
711
673
|
} else flags = 0;
|
|
712
674
|
if (flags & 2) notifyBuffer[notifyBufferLength++] = sub;
|
|
713
675
|
if (flags & 1) {
|
|
@@ -743,7 +705,7 @@ function propagate(link) {
|
|
|
743
705
|
function startTracking(sub) {
|
|
744
706
|
++globalVersion;
|
|
745
707
|
sub.depsTail = void 0;
|
|
746
|
-
sub.flags = sub.flags & -
|
|
708
|
+
sub.flags = sub.flags & -569 | 4;
|
|
747
709
|
return setActiveSub(sub);
|
|
748
710
|
}
|
|
749
711
|
function endTracking(sub, prevSub) {
|
|
@@ -751,8 +713,11 @@ function endTracking(sub, prevSub) {
|
|
|
751
713
|
activeSub = prevSub;
|
|
752
714
|
const depsTail = sub.depsTail;
|
|
753
715
|
let toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
754
|
-
while (toRemove !== void 0)
|
|
755
|
-
|
|
716
|
+
while (toRemove !== void 0) {
|
|
717
|
+
unlink(toRemove, sub);
|
|
718
|
+
toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
|
|
719
|
+
}
|
|
720
|
+
if ((sub.flags &= -5) & 8) markRecursed(sub);
|
|
756
721
|
}
|
|
757
722
|
function flush() {
|
|
758
723
|
let hasError = false;
|
|
@@ -774,45 +739,67 @@ function flush() {
|
|
|
774
739
|
if (hasError) throw error;
|
|
775
740
|
}
|
|
776
741
|
function checkDirty(link, sub) {
|
|
742
|
+
try {
|
|
743
|
+
return walkDirty(link, sub);
|
|
744
|
+
} catch (err) {
|
|
745
|
+
markStale(sub);
|
|
746
|
+
throw err;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
function walkDirty(link, sub) {
|
|
750
|
+
const root = sub;
|
|
777
751
|
let stack;
|
|
778
752
|
let checkDepth = 0;
|
|
753
|
+
let staleDepth = 0;
|
|
754
|
+
let staleFloor = 0;
|
|
779
755
|
top: do {
|
|
780
756
|
const dep = link.dep;
|
|
781
757
|
const depFlags = dep.flags;
|
|
782
758
|
let dirty = false;
|
|
783
759
|
if (sub.flags & 16) dirty = true;
|
|
784
760
|
else if ((depFlags & 17) === 17) {
|
|
785
|
-
const subs = dep.subs;
|
|
786
761
|
if (dep.update()) {
|
|
787
|
-
|
|
762
|
+
const subs = dep.subs;
|
|
763
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
788
764
|
dirty = true;
|
|
789
765
|
}
|
|
790
766
|
} else if ((depFlags & 33) === 33) {
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
767
|
+
const depth = dep === root ? 0 : depFlags & CHECKING ? checkingDepth(dep, stack, checkDepth) : -1;
|
|
768
|
+
if (depth < 0) {
|
|
769
|
+
if (link.nextSub !== void 0 || link.prevSub !== void 0) dep.flags = depFlags | CHECKING;
|
|
770
|
+
stack = {
|
|
771
|
+
value: link,
|
|
772
|
+
prev: stack
|
|
773
|
+
};
|
|
774
|
+
link = dep.deps;
|
|
775
|
+
sub = dep;
|
|
776
|
+
++checkDepth;
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
if (depth < checkDepth) {
|
|
780
|
+
staleFloor = staleDepth && staleFloor < depth ? staleFloor : depth;
|
|
781
|
+
staleDepth = checkDepth;
|
|
782
|
+
}
|
|
799
783
|
}
|
|
800
784
|
if (!dirty && link.nextDep !== void 0) {
|
|
801
785
|
link = link.nextDep;
|
|
802
786
|
continue;
|
|
803
787
|
}
|
|
804
788
|
while (checkDepth) {
|
|
789
|
+
const stale = checkDepth === staleDepth;
|
|
790
|
+
if (stale && --staleDepth === staleFloor) staleDepth = 0;
|
|
805
791
|
--checkDepth;
|
|
806
792
|
link = stack.value;
|
|
807
793
|
stack = stack.prev;
|
|
808
794
|
if (dirty) {
|
|
809
|
-
const subs = sub.subs;
|
|
810
795
|
if (sub.update()) {
|
|
811
|
-
|
|
796
|
+
const subs = sub.subs;
|
|
797
|
+
if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
|
|
812
798
|
sub = link.sub;
|
|
813
799
|
continue;
|
|
814
800
|
}
|
|
815
|
-
} else sub.flags
|
|
801
|
+
} else if (stale) sub.flags = sub.flags & -545 | 16;
|
|
802
|
+
else sub.flags &= -545;
|
|
816
803
|
sub = link.sub;
|
|
817
804
|
if (link.nextDep !== void 0) {
|
|
818
805
|
link = link.nextDep;
|
|
@@ -820,9 +807,21 @@ function checkDirty(link, sub) {
|
|
|
820
807
|
}
|
|
821
808
|
dirty = false;
|
|
822
809
|
}
|
|
823
|
-
return dirty && !!sub.flags;
|
|
810
|
+
return (dirty || !!(sub.flags & 16)) && !!sub.flags;
|
|
824
811
|
} while (true);
|
|
825
812
|
}
|
|
813
|
+
function checkingDepth(dep, stack, depth) {
|
|
814
|
+
for (; stack !== void 0; stack = stack.prev, --depth) if (stack.value.dep === dep) return depth;
|
|
815
|
+
return -1;
|
|
816
|
+
}
|
|
817
|
+
function markStale(sub) {
|
|
818
|
+
const nodes = [sub];
|
|
819
|
+
do {
|
|
820
|
+
sub = nodes.pop();
|
|
821
|
+
sub.flags = sub.flags & -33 | 16;
|
|
822
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) if (link.dep.flags & 32) nodes.push(link.dep);
|
|
823
|
+
} while (nodes.length);
|
|
824
|
+
}
|
|
826
825
|
function shallowPropagate(link) {
|
|
827
826
|
do {
|
|
828
827
|
const sub = link.sub;
|
|
@@ -840,6 +839,71 @@ function isValidLink(checkLink, sub) {
|
|
|
840
839
|
}
|
|
841
840
|
return false;
|
|
842
841
|
}
|
|
842
|
+
function markRecursed(sub) {
|
|
843
|
+
const nodes = [sub];
|
|
844
|
+
do {
|
|
845
|
+
sub = nodes.pop();
|
|
846
|
+
for (let link = sub.deps; link !== void 0; link = link.nextDep) {
|
|
847
|
+
const dep = link.dep;
|
|
848
|
+
if ((dep.flags & 40) === 32) {
|
|
849
|
+
dep.flags |= 8;
|
|
850
|
+
nodes.push(dep);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
} while (nodes.length);
|
|
854
|
+
}
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region packages/reactivity/src/debug.ts
|
|
857
|
+
const triggered = [];
|
|
858
|
+
function onTrack(sub, debugInfo) {
|
|
859
|
+
if (sub.onTrack) sub.onTrack(extend({ effect: sub }, debugInfo));
|
|
860
|
+
}
|
|
861
|
+
function onTrigger(sub, debugInfo) {
|
|
862
|
+
if (sub.onTrigger) sub.onTrigger(extend({ effect: sub }, debugInfo));
|
|
863
|
+
}
|
|
864
|
+
function startTrigger() {
|
|
865
|
+
triggered.push([]);
|
|
866
|
+
}
|
|
867
|
+
function endTrigger(debugInfo) {
|
|
868
|
+
const subs = triggered.pop();
|
|
869
|
+
if (subs.length) {
|
|
870
|
+
startBatch();
|
|
871
|
+
try {
|
|
872
|
+
for (let i = 0; i < subs.length; i++) {
|
|
873
|
+
const sub = subs[i];
|
|
874
|
+
if (sub.flags & 3) onTrigger(sub, debugInfo);
|
|
875
|
+
}
|
|
876
|
+
} finally {
|
|
877
|
+
endBatch();
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
function setupOnTrigger(target) {
|
|
882
|
+
Object.defineProperty(target.prototype, "onTrigger", {
|
|
883
|
+
get() {
|
|
884
|
+
return this._onTrigger;
|
|
885
|
+
},
|
|
886
|
+
set(val) {
|
|
887
|
+
if (val && !this._onTrigger) setupFlagsHandler(this);
|
|
888
|
+
this._onTrigger = val;
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
function setupFlagsHandler(target) {
|
|
893
|
+
target._flags = target.flags;
|
|
894
|
+
Object.defineProperty(target, "flags", {
|
|
895
|
+
get() {
|
|
896
|
+
return target._flags;
|
|
897
|
+
},
|
|
898
|
+
set(value) {
|
|
899
|
+
if (!(target._flags & 48) && !!(value & 48)) {
|
|
900
|
+
if (triggered.length) triggered[triggered.length - 1].push(this);
|
|
901
|
+
else onTrigger(this);
|
|
902
|
+
}
|
|
903
|
+
target._flags = value;
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
}
|
|
843
907
|
//#endregion
|
|
844
908
|
//#region packages/reactivity/src/dep.ts
|
|
845
909
|
var Dep = class {
|
|
@@ -899,20 +963,12 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
899
963
|
if (!depsMap) return;
|
|
900
964
|
const run = (dep) => {
|
|
901
965
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
902
|
-
triggerEventInfos.push({
|
|
903
|
-
target,
|
|
904
|
-
type,
|
|
905
|
-
key,
|
|
906
|
-
newValue,
|
|
907
|
-
oldValue,
|
|
908
|
-
oldTarget
|
|
909
|
-
});
|
|
910
966
|
propagate(dep.subs);
|
|
911
967
|
shallowPropagate(dep.subs);
|
|
912
|
-
triggerEventInfos.pop();
|
|
913
968
|
}
|
|
914
969
|
};
|
|
915
970
|
startBatch();
|
|
971
|
+
startTrigger();
|
|
916
972
|
if (type === "clear") depsMap.forEach(run);
|
|
917
973
|
else {
|
|
918
974
|
const targetIsArray = isArray(target);
|
|
@@ -942,6 +998,14 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
942
998
|
}
|
|
943
999
|
}
|
|
944
1000
|
}
|
|
1001
|
+
endTrigger({
|
|
1002
|
+
target,
|
|
1003
|
+
type,
|
|
1004
|
+
key,
|
|
1005
|
+
newValue,
|
|
1006
|
+
oldValue,
|
|
1007
|
+
oldTarget
|
|
1008
|
+
});
|
|
945
1009
|
endBatch();
|
|
946
1010
|
}
|
|
947
1011
|
function getDepFromReactive(object, key) {
|
|
@@ -1156,7 +1220,7 @@ function noTracking(self, method, args = []) {
|
|
|
1156
1220
|
//#endregion
|
|
1157
1221
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1158
1222
|
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1159
|
-
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1223
|
+
const builtInSymbols = /*@__PURE__*/ new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1160
1224
|
function hasOwnProperty(key) {
|
|
1161
1225
|
if (!isSymbol(key)) key = String(key);
|
|
1162
1226
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1740,16 +1804,16 @@ var RefImpl = class {
|
|
|
1740
1804
|
this._value = !useDirectValue && this._wrap ? this._wrap(newValue) : newValue;
|
|
1741
1805
|
const subs = this.subs;
|
|
1742
1806
|
if (subs !== void 0) {
|
|
1743
|
-
|
|
1807
|
+
startTrigger();
|
|
1808
|
+
propagate(subs);
|
|
1809
|
+
endTrigger({
|
|
1744
1810
|
target: this,
|
|
1745
1811
|
type: "set",
|
|
1746
1812
|
key: "value",
|
|
1747
1813
|
newValue,
|
|
1748
1814
|
oldValue
|
|
1749
1815
|
});
|
|
1750
|
-
propagate(subs);
|
|
1751
1816
|
if (!batchDepth) flush();
|
|
1752
|
-
triggerEventInfos.pop();
|
|
1753
1817
|
}
|
|
1754
1818
|
}
|
|
1755
1819
|
}
|
|
@@ -1786,8 +1850,10 @@ var RefImpl = class {
|
|
|
1786
1850
|
function triggerRef(ref) {
|
|
1787
1851
|
const dep = ref.dep;
|
|
1788
1852
|
if (dep !== void 0 && dep.subs !== void 0) {
|
|
1853
|
+
startTrigger();
|
|
1789
1854
|
propagate(dep.subs);
|
|
1790
1855
|
shallowPropagate(dep.subs);
|
|
1856
|
+
endTrigger();
|
|
1791
1857
|
if (!batchDepth) flush();
|
|
1792
1858
|
}
|
|
1793
1859
|
}
|
|
@@ -1978,6 +2044,10 @@ var ReactiveEffect = class {
|
|
|
1978
2044
|
get active() {
|
|
1979
2045
|
return !(this.flags & 1024);
|
|
1980
2046
|
}
|
|
2047
|
+
/** @internal */
|
|
2048
|
+
get running() {
|
|
2049
|
+
return !!(this.flags & 4);
|
|
2050
|
+
}
|
|
1981
2051
|
pause() {
|
|
1982
2052
|
this.flags |= 256;
|
|
1983
2053
|
}
|
|
@@ -1991,11 +2061,9 @@ var ReactiveEffect = class {
|
|
|
1991
2061
|
if (!this.active) return this.fn();
|
|
1992
2062
|
cleanup(this);
|
|
1993
2063
|
const prevSub = startTracking(this);
|
|
1994
|
-
incRunDepth();
|
|
1995
2064
|
try {
|
|
1996
2065
|
return this.fn();
|
|
1997
2066
|
} finally {
|
|
1998
|
-
decRunDepth();
|
|
1999
2067
|
endTracking(this, prevSub);
|
|
2000
2068
|
const flags = this.flags;
|
|
2001
2069
|
if ((flags & 136) === 136) {
|
|
@@ -2018,9 +2086,9 @@ var ReactiveEffect = class {
|
|
|
2018
2086
|
if (flags & 16) return true;
|
|
2019
2087
|
if (flags & 32) {
|
|
2020
2088
|
if (checkDirty(this.deps, this)) {
|
|
2021
|
-
this.
|
|
2089
|
+
if (this.active) this.flags |= 16;
|
|
2022
2090
|
return true;
|
|
2023
|
-
} else this.flags
|
|
2091
|
+
} else this.flags &= -33;
|
|
2024
2092
|
}
|
|
2025
2093
|
return false;
|
|
2026
2094
|
}
|
|
@@ -2032,20 +2100,17 @@ function effect(fn, options) {
|
|
|
2032
2100
|
if (options) {
|
|
2033
2101
|
const { onStop, scheduler } = options;
|
|
2034
2102
|
if (onStop) {
|
|
2035
|
-
options.onStop = void 0;
|
|
2036
2103
|
const stop = e.stop.bind(e);
|
|
2037
2104
|
e.stop = () => {
|
|
2038
2105
|
stop();
|
|
2039
2106
|
onStop();
|
|
2040
2107
|
};
|
|
2041
2108
|
}
|
|
2042
|
-
if (scheduler) {
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
}
|
|
2048
|
-
extend(e, options);
|
|
2109
|
+
if (scheduler) e.notify = () => {
|
|
2110
|
+
if (!(e.flags & 1280)) scheduler();
|
|
2111
|
+
};
|
|
2112
|
+
e.onTrack = options.onTrack;
|
|
2113
|
+
e.onTrigger = options.onTrigger;
|
|
2049
2114
|
}
|
|
2050
2115
|
try {
|
|
2051
2116
|
e.run();
|
|
@@ -2105,8 +2170,10 @@ var EffectScope = class {
|
|
|
2105
2170
|
const flags = this.flags;
|
|
2106
2171
|
if (flags & 256) {
|
|
2107
2172
|
this.flags = flags & -257;
|
|
2108
|
-
|
|
2109
|
-
|
|
2173
|
+
const deps = [];
|
|
2174
|
+
for (let link = this.deps; link !== void 0; link = link.nextDep) deps.push(link.dep);
|
|
2175
|
+
for (let i = 0; i < deps.length; i++) {
|
|
2176
|
+
const dep = deps[i];
|
|
2110
2177
|
if ("resume" in dep) dep.resume();
|
|
2111
2178
|
}
|
|
2112
2179
|
}
|
|
@@ -2135,8 +2202,10 @@ var EffectScope = class {
|
|
|
2135
2202
|
while (dep !== void 0) {
|
|
2136
2203
|
const node = dep.dep;
|
|
2137
2204
|
if ("stop" in node) {
|
|
2138
|
-
|
|
2205
|
+
const prev = dep.prevDep;
|
|
2139
2206
|
node.stop();
|
|
2207
|
+
const next = prev !== void 0 ? prev.nextDep : this.deps;
|
|
2208
|
+
dep = next === dep ? dep.nextDep : next;
|
|
2140
2209
|
} else dep = unlink(dep, this);
|
|
2141
2210
|
}
|
|
2142
2211
|
cleanup(this);
|
|
@@ -2177,11 +2246,14 @@ function setCurrentScope(scope) {
|
|
|
2177
2246
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
|
|
2178
2247
|
*/
|
|
2179
2248
|
function onScopeDispose(fn, failSilently = false) {
|
|
2180
|
-
if (activeEffectScope !== void 0)
|
|
2181
|
-
|
|
2249
|
+
if (activeEffectScope !== void 0) {
|
|
2250
|
+
if (activeEffectScope.active) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
|
|
2251
|
+
else fn();
|
|
2252
|
+
} else if (!failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
|
|
2182
2253
|
}
|
|
2183
2254
|
//#endregion
|
|
2184
2255
|
//#region packages/reactivity/src/computed.ts
|
|
2256
|
+
const FAILED = 64;
|
|
2185
2257
|
/**
|
|
2186
2258
|
* @private exported by @vue/reactivity for Vue core use, but not exported from
|
|
2187
2259
|
* the main vue package
|
|
@@ -2230,12 +2302,24 @@ var ComputedRefImpl = class {
|
|
|
2230
2302
|
}
|
|
2231
2303
|
get value() {
|
|
2232
2304
|
const flags = this.flags;
|
|
2233
|
-
|
|
2234
|
-
if (this.
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2305
|
+
try {
|
|
2306
|
+
if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) {
|
|
2307
|
+
if (this.update()) {
|
|
2308
|
+
const subs = this.subs;
|
|
2309
|
+
if (subs !== void 0) shallowPropagate(subs);
|
|
2310
|
+
}
|
|
2311
|
+
} else if (flags & 32) this.flags = flags & -33;
|
|
2312
|
+
} catch (err) {
|
|
2313
|
+
if (activeSub !== void 0) {
|
|
2314
|
+
onTrack(activeSub, {
|
|
2315
|
+
target: this,
|
|
2316
|
+
type: "get",
|
|
2317
|
+
key: "value"
|
|
2318
|
+
});
|
|
2319
|
+
link(this, activeSub);
|
|
2320
|
+
} else if (activeEffectScope !== void 0) link(this, activeEffectScope);
|
|
2321
|
+
throw err;
|
|
2322
|
+
}
|
|
2239
2323
|
if (activeSub !== void 0) {
|
|
2240
2324
|
onTrack(activeSub, {
|
|
2241
2325
|
target: this,
|
|
@@ -2243,7 +2327,18 @@ var ComputedRefImpl = class {
|
|
|
2243
2327
|
key: "value"
|
|
2244
2328
|
});
|
|
2245
2329
|
link(this, activeSub);
|
|
2246
|
-
} else if (activeEffectScope !== void 0)
|
|
2330
|
+
} else if (activeEffectScope !== void 0) {
|
|
2331
|
+
if (activeEffectScope.active) link(this, activeEffectScope);
|
|
2332
|
+
else if (this.subs === void 0) {
|
|
2333
|
+
let dep = this.deps;
|
|
2334
|
+
if (dep !== void 0) {
|
|
2335
|
+
do
|
|
2336
|
+
dep = unlink(dep, this);
|
|
2337
|
+
while (dep !== void 0);
|
|
2338
|
+
this.flags |= 16;
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2247
2342
|
return this._value;
|
|
2248
2343
|
}
|
|
2249
2344
|
set value(newValue) {
|
|
@@ -2255,11 +2350,15 @@ var ComputedRefImpl = class {
|
|
|
2255
2350
|
try {
|
|
2256
2351
|
const oldValue = this._value;
|
|
2257
2352
|
const newValue = this.fn(oldValue);
|
|
2258
|
-
if (hasChanged(oldValue, newValue)) {
|
|
2353
|
+
if (hasChanged(oldValue, newValue) || this.flags & FAILED) {
|
|
2259
2354
|
this._value = newValue;
|
|
2355
|
+
this.flags &= -65;
|
|
2260
2356
|
return true;
|
|
2261
2357
|
}
|
|
2262
2358
|
return false;
|
|
2359
|
+
} catch (err) {
|
|
2360
|
+
this.flags |= FAILED;
|
|
2361
|
+
throw err;
|
|
2263
2362
|
} finally {
|
|
2264
2363
|
endTracking(this, prevSub);
|
|
2265
2364
|
}
|
|
@@ -2280,6 +2379,7 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
2280
2379
|
cRef.onTrack = debugOptions.onTrack;
|
|
2281
2380
|
cRef.onTrigger = debugOptions.onTrigger;
|
|
2282
2381
|
}
|
|
2382
|
+
if (isSSR && activeEffectScope !== void 0) link(cRef, activeEffectScope);
|
|
2283
2383
|
return cRef;
|
|
2284
2384
|
}
|
|
2285
2385
|
//#endregion
|
|
@@ -2650,7 +2750,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2650
2750
|
if (isFunction(fn)) {
|
|
2651
2751
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2652
2752
|
if (res && isPromise(res)) res.catch((err) => {
|
|
2653
|
-
handleError(err, instance, type);
|
|
2753
|
+
handleError(err, instance, type, void 0, true);
|
|
2654
2754
|
});
|
|
2655
2755
|
return res;
|
|
2656
2756
|
}
|
|
@@ -2660,7 +2760,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2660
2760
|
return values;
|
|
2661
2761
|
} else warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
|
|
2662
2762
|
}
|
|
2663
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2763
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2664
2764
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2665
2765
|
if (instance) {
|
|
2666
2766
|
let cur = instance.parent;
|
|
@@ -2668,7 +2768,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2668
2768
|
const errorInfo = ErrorTypeStrings$1[type];
|
|
2669
2769
|
while (cur) {
|
|
2670
2770
|
const errorCapturedHooks = cur.ec;
|
|
2671
|
-
if (errorCapturedHooks) {
|
|
2771
|
+
if (errorCapturedHooks && !cur.isUnmounted && (!isAsyncError || cur.scope.active)) {
|
|
2672
2772
|
for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
|
|
2673
2773
|
}
|
|
2674
2774
|
cur = cur.parent;
|
|
@@ -2973,7 +3073,11 @@ function reload(id, newComp) {
|
|
|
2973
3073
|
updateComponentDef(record.initialDef, newComp);
|
|
2974
3074
|
const instances = [...record.instances];
|
|
2975
3075
|
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2976
|
-
for (const instance of instances)
|
|
3076
|
+
for (const instance of instances) {
|
|
3077
|
+
if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
3078
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3079
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
3080
|
+
}
|
|
2977
3081
|
const dirtyInstances = new Set(instances);
|
|
2978
3082
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2979
3083
|
runWithHmrUpdating(() => {
|
|
@@ -3014,7 +3118,25 @@ function reload(id, newComp) {
|
|
|
3014
3118
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
3015
3119
|
}
|
|
3016
3120
|
parents.forEach((parent) => {
|
|
3017
|
-
|
|
3121
|
+
const children = instances.filter((instance) => instance.parent === parent);
|
|
3122
|
+
const update = () => {
|
|
3123
|
+
if (!parent.scope.active) return;
|
|
3124
|
+
const activeChildren = children.filter((instance) => instance.scope.active);
|
|
3125
|
+
if (!activeChildren.length) return;
|
|
3126
|
+
const pending = activeChildren.find((instance) => instance.asyncDep && !instance.asyncResolved) || locateUnresolvedAsyncRoot(parent);
|
|
3127
|
+
if (pending) {
|
|
3128
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
3129
|
+
if (parent.scope.active && (pending.asyncResolved || !pending.scope.active)) queueJob(update);
|
|
3130
|
+
});
|
|
3131
|
+
return;
|
|
3132
|
+
}
|
|
3133
|
+
for (const instance of activeChildren) {
|
|
3134
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
3135
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
3136
|
+
if (!dirtyInstances) hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
3137
|
+
dirtyInstances.add(instance);
|
|
3138
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
3139
|
+
}
|
|
3018
3140
|
runWithHmrUpdating(() => {
|
|
3019
3141
|
if (parent.vapor) parent.hmrRerender();
|
|
3020
3142
|
else {
|
|
@@ -3025,7 +3147,12 @@ function reload(id, newComp) {
|
|
|
3025
3147
|
}
|
|
3026
3148
|
}
|
|
3027
3149
|
});
|
|
3028
|
-
|
|
3150
|
+
queuePostFlushCb(() => {
|
|
3151
|
+
hmrDirtyComponents.clear();
|
|
3152
|
+
hmrDirtyComponentsMode.clear();
|
|
3153
|
+
});
|
|
3154
|
+
};
|
|
3155
|
+
queueJob(update);
|
|
3029
3156
|
});
|
|
3030
3157
|
}
|
|
3031
3158
|
queuePostFlushCb(() => {
|
|
@@ -3574,11 +3701,28 @@ function withDirectives(vnode, directives) {
|
|
|
3574
3701
|
return vnode;
|
|
3575
3702
|
}
|
|
3576
3703
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3577
|
-
|
|
3704
|
+
let hookVNode = vnode;
|
|
3705
|
+
if (name === "beforeMount") vnode._mount = vnode;
|
|
3706
|
+
else if (name === "beforeUpdate") {
|
|
3707
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3708
|
+
if (mount) {
|
|
3709
|
+
mount._latest = vnode;
|
|
3710
|
+
vnode._mount = mount;
|
|
3711
|
+
}
|
|
3712
|
+
} else if (name === "mounted") {
|
|
3713
|
+
const latest = vnode._latest;
|
|
3714
|
+
vnode._mount = vnode._latest = void 0;
|
|
3715
|
+
if (latest) {
|
|
3716
|
+
hookVNode = latest;
|
|
3717
|
+
latest._mount = void 0;
|
|
3718
|
+
}
|
|
3719
|
+
}
|
|
3720
|
+
const bindings = hookVNode.dirs;
|
|
3578
3721
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3579
3722
|
for (let i = 0; i < bindings.length; i++) {
|
|
3580
|
-
|
|
3723
|
+
let binding = bindings[i];
|
|
3581
3724
|
if (oldBindings) binding.oldValue = oldBindings[i].value;
|
|
3725
|
+
else if (name === "mounted" && binding.oldValue !== void 0) binding = extend({}, binding, { oldValue: void 0 });
|
|
3582
3726
|
let hook = binding.dir[name];
|
|
3583
3727
|
if (!hook) hook = mapCompatDirectiveHook(name, binding.dir, instance);
|
|
3584
3728
|
if (hook) {
|
|
@@ -3586,7 +3730,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3586
3730
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3587
3731
|
vnode.el,
|
|
3588
3732
|
binding,
|
|
3589
|
-
|
|
3733
|
+
hookVNode,
|
|
3590
3734
|
prevVNode
|
|
3591
3735
|
]);
|
|
3592
3736
|
setActiveSub(prevSub);
|
|
@@ -4029,7 +4173,15 @@ const BaseTransitionImpl = {
|
|
|
4029
4173
|
const { mode } = rawProps;
|
|
4030
4174
|
checkTransitionMode(mode);
|
|
4031
4175
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
4032
|
-
if (!(instance.effect.flags & 1024))
|
|
4176
|
+
if (!(instance.effect.flags & 1024)) {
|
|
4177
|
+
if (instance.effect.running) {
|
|
4178
|
+
const job = () => {
|
|
4179
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
4180
|
+
};
|
|
4181
|
+
job.i = instance;
|
|
4182
|
+
queueJob(job);
|
|
4183
|
+
} else instance.update();
|
|
4184
|
+
}
|
|
4033
4185
|
}) : NOOP);
|
|
4034
4186
|
};
|
|
4035
4187
|
}
|
|
@@ -4060,7 +4212,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4060
4212
|
}
|
|
4061
4213
|
return leavingVNodesCache;
|
|
4062
4214
|
}
|
|
4063
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4215
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4064
4216
|
const key = String(vnode.key);
|
|
4065
4217
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4066
4218
|
const hooks = baseResolveTransitionHooks({
|
|
@@ -4083,9 +4235,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4083
4235
|
}
|
|
4084
4236
|
},
|
|
4085
4237
|
cloneHooks: (vnode) => {
|
|
4086
|
-
|
|
4087
|
-
if (postClone) postClone(hooks);
|
|
4088
|
-
return hooks;
|
|
4238
|
+
return resolveTransitionHooks(vnode, props, state, instance);
|
|
4089
4239
|
}
|
|
4090
4240
|
}, props, state, instance);
|
|
4091
4241
|
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
@@ -4123,7 +4273,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
4123
4273
|
callHook(hook, [el]);
|
|
4124
4274
|
},
|
|
4125
4275
|
enter(el) {
|
|
4126
|
-
if (!isHmrUpdating && isLeaving()) return;
|
|
4276
|
+
if (!isHmrUpdating && isLeaving(el)) return;
|
|
4127
4277
|
let hook = onEnter;
|
|
4128
4278
|
let afterHook = onAfterEnter;
|
|
4129
4279
|
let cancelHook = onEnterCancelled;
|
|
@@ -4167,7 +4317,19 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
4167
4317
|
else done();
|
|
4168
4318
|
},
|
|
4169
4319
|
clone(node) {
|
|
4170
|
-
|
|
4320
|
+
if (!cloneHooks) return hooks;
|
|
4321
|
+
const cloned = cloneHooks(node);
|
|
4322
|
+
cloned.afterLeave = () => {
|
|
4323
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4324
|
+
};
|
|
4325
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4326
|
+
if (hooks.delayLeave) hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4327
|
+
else delayedLeave();
|
|
4328
|
+
};
|
|
4329
|
+
cloned.delayedLeave = () => {
|
|
4330
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4331
|
+
};
|
|
4332
|
+
return cloned;
|
|
4171
4333
|
}
|
|
4172
4334
|
};
|
|
4173
4335
|
return hooks;
|
|
@@ -4202,10 +4364,7 @@ function prepareTransitionSwitch(previous, next, props, state, instance, resumeA
|
|
|
4202
4364
|
if (state.isLeaving) return emptyPlaceholder(next);
|
|
4203
4365
|
const nextInner = getInnerChild$1(next);
|
|
4204
4366
|
if (!nextInner) return emptyPlaceholder(next);
|
|
4205
|
-
|
|
4206
|
-
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
4207
|
-
enterHooks = hooks;
|
|
4208
|
-
});
|
|
4367
|
+
const enterHooks = resolveTransitionHooks(nextInner, props, state, instance);
|
|
4209
4368
|
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
4210
4369
|
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4211
4370
|
const mode = props.mode;
|
|
@@ -4271,9 +4430,14 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4271
4430
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
4272
4431
|
}
|
|
4273
4432
|
} else if (vnode.shapeFlag & 128) {
|
|
4274
|
-
const
|
|
4275
|
-
|
|
4276
|
-
|
|
4433
|
+
const suspense = vnode.suspense;
|
|
4434
|
+
if (suspense) {
|
|
4435
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4436
|
+
if (branch) return setTransitionHooks(branch, hooks.clone(branch));
|
|
4437
|
+
} else {
|
|
4438
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4439
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4440
|
+
}
|
|
4277
4441
|
} else {
|
|
4278
4442
|
vnode.transition = hooks;
|
|
4279
4443
|
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
@@ -4492,7 +4656,7 @@ const getContainerType = (container) => {
|
|
|
4492
4656
|
};
|
|
4493
4657
|
const isComment = (node) => node.nodeType === 8;
|
|
4494
4658
|
/** The data of a comment opening a range a hydration steps over as one. */
|
|
4495
|
-
const isRangeStart = (data) => data === "[" || data === "(" ||
|
|
4659
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporRangeStart(data);
|
|
4496
4660
|
function createHydrationFunctions(rendererInternals) {
|
|
4497
4661
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
4498
4662
|
const hydrate = (vnode, container) => {
|
|
@@ -4510,7 +4674,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4510
4674
|
};
|
|
4511
4675
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4512
4676
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4513
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled &&
|
|
4677
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporRangeStart(node.data));
|
|
4514
4678
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4515
4679
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4516
4680
|
let domType = node.nodeType;
|
|
@@ -4699,10 +4863,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4699
4863
|
const container = parentNode(node);
|
|
4700
4864
|
const first = nextSibling(node);
|
|
4701
4865
|
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4702
|
-
|
|
4866
|
+
const close = isVaporInteropEnabled ? rangeCloseOf(node.data) : node.data === "(" ? ")" : "]";
|
|
4867
|
+
if (next && isComment(next) && next.data === close) return nextSibling(vnode.anchor = next);
|
|
4703
4868
|
else {
|
|
4704
4869
|
logMismatchError();
|
|
4705
|
-
insert(vnode.anchor = createComment(
|
|
4870
|
+
insert(vnode.anchor = createComment(close), container, next);
|
|
4706
4871
|
return next;
|
|
4707
4872
|
}
|
|
4708
4873
|
};
|
|
@@ -4724,13 +4889,13 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4724
4889
|
const container = parentNode(node);
|
|
4725
4890
|
remove(node);
|
|
4726
4891
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4727
|
-
if (parentComponent && parentComponent.vnode) {
|
|
4892
|
+
if (parentComponent && parentComponent.vnode && parentComponent.vnode.el === node) {
|
|
4728
4893
|
parentComponent.vnode.el = vnode.el;
|
|
4729
4894
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4730
4895
|
}
|
|
4731
4896
|
return next;
|
|
4732
4897
|
};
|
|
4733
|
-
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "("
|
|
4898
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && (node.data === "(" || isVaporInteropEnabled && node.data === "{") ? node.data : "[", close = isVaporInteropEnabled ? rangeCloseOf(open) : open === "(" ? ")" : "]") => {
|
|
4734
4899
|
let match = 0;
|
|
4735
4900
|
while (node) {
|
|
4736
4901
|
node = nextSibling(node);
|
|
@@ -4993,7 +5158,7 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
4993
5158
|
function forEachElement(node, cb) {
|
|
4994
5159
|
if (isComment(node) && isRangeStart(node.data)) {
|
|
4995
5160
|
const open = node.data;
|
|
4996
|
-
const close = open
|
|
5161
|
+
const close = rangeCloseOf(open);
|
|
4997
5162
|
let depth = 1;
|
|
4998
5163
|
let next = node.nextSibling;
|
|
4999
5164
|
while (next) {
|
|
@@ -5030,7 +5195,7 @@ function defineAsyncComponent(source) {
|
|
|
5030
5195
|
if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
|
|
5031
5196
|
const onError = (err) => {
|
|
5032
5197
|
setPendingRequest(null);
|
|
5033
|
-
handleError(err, instance, 13, !errorComponent);
|
|
5198
|
+
handleError(err, instance, 13, !errorComponent, true);
|
|
5034
5199
|
};
|
|
5035
5200
|
if (suspensible && instance.suspense || isInSSRComponentSetup) return load().then((comp) => {
|
|
5036
5201
|
return () => createInnerComp(comp, instance);
|
|
@@ -5111,10 +5276,12 @@ const useAsyncComponentState = (delay = 200, timeout, onError, instance = curren
|
|
|
5111
5276
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
5112
5277
|
let timeoutTimer;
|
|
5113
5278
|
let delayTimer;
|
|
5114
|
-
if (instance)
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5279
|
+
if (instance) instance.scope.run(() => {
|
|
5280
|
+
onScopeDispose(() => {
|
|
5281
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5282
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5283
|
+
});
|
|
5284
|
+
});
|
|
5118
5285
|
if (delay) delayTimer = setTimeout(() => {
|
|
5119
5286
|
if (instance && instance.isUnmounted) return;
|
|
5120
5287
|
delayed.value = false;
|
|
@@ -5149,7 +5316,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
5149
5316
|
}
|
|
5150
5317
|
return;
|
|
5151
5318
|
}
|
|
5152
|
-
if (!el.parentNode
|
|
5319
|
+
if (!el.parentNode) return;
|
|
5320
|
+
if (wasConnected && !el.isConnected) {
|
|
5321
|
+
let current = instance;
|
|
5322
|
+
while (current && !current.isDeactivated) current = current.parent;
|
|
5323
|
+
if (!current) return;
|
|
5324
|
+
}
|
|
5153
5325
|
hydrate();
|
|
5154
5326
|
};
|
|
5155
5327
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5207,7 +5379,11 @@ const KeepAliveImpl = {
|
|
|
5207
5379
|
activate(vnode, container, anchor, renderer, keepAliveInstance, parentSuspense, namespace, optimized);
|
|
5208
5380
|
};
|
|
5209
5381
|
sharedContext.deactivate = (vnode) => {
|
|
5210
|
-
|
|
5382
|
+
const cached = sharedContext.getCachedComponent(vnode);
|
|
5383
|
+
if (!cached || cached.component !== vnode.component) return false;
|
|
5384
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(keepAliveInstance, vnode).deactivate(vnode, storageContainer, parentSuspense);
|
|
5385
|
+
else deactivate(vnode, storageContainer, renderer, keepAliveInstance, parentSuspense);
|
|
5386
|
+
return true;
|
|
5211
5387
|
};
|
|
5212
5388
|
function unmount(vnode) {
|
|
5213
5389
|
resetShapeFlag(vnode);
|
|
@@ -5239,11 +5415,15 @@ const KeepAliveImpl = {
|
|
|
5239
5415
|
let pendingCacheKey = null;
|
|
5240
5416
|
const cacheSubtree = () => {
|
|
5241
5417
|
if (pendingCacheKey != null) {
|
|
5242
|
-
if (isSuspense(keepAliveInstance.subTree.type))
|
|
5243
|
-
const
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5418
|
+
if (isSuspense(keepAliveInstance.subTree.type)) {
|
|
5419
|
+
const cacheInnerChild = () => {
|
|
5420
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5421
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5422
|
+
};
|
|
5423
|
+
const suspense = keepAliveInstance.subTree.suspense;
|
|
5424
|
+
if (suspense.pendingBranch) queuePostRenderEffect(cacheInnerChild, void 0, suspense);
|
|
5425
|
+
else cacheInnerChild();
|
|
5426
|
+
} else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5247
5427
|
}
|
|
5248
5428
|
};
|
|
5249
5429
|
onMounted(cacheSubtree);
|
|
@@ -5353,9 +5533,8 @@ function registerKeepAliveHook(hook, type, target = getCurrentGenericInstance())
|
|
|
5353
5533
|
}
|
|
5354
5534
|
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
5355
5535
|
const injected = injectHook(type, hook, keepAliveRoot, true);
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
}, target);
|
|
5536
|
+
const removal = injectHook("um", () => remove(keepAliveRoot[type], injected), target);
|
|
5537
|
+
removal.flags = 8;
|
|
5359
5538
|
}
|
|
5360
5539
|
function resetShapeFlag(vnode) {
|
|
5361
5540
|
vnode.shapeFlag &= -257;
|
|
@@ -5794,6 +5973,11 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5794
5973
|
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5795
5974
|
ret.key = branchKey;
|
|
5796
5975
|
}
|
|
5976
|
+
if (isBlockTreeEnabled <= 0) {
|
|
5977
|
+
if (!ret.vs.props) ret.vs.props = ret.props;
|
|
5978
|
+
ret.props = ret.key != null ? { key: ret.key } : null;
|
|
5979
|
+
ret.vs.attrs = EMPTY_OBJ;
|
|
5980
|
+
}
|
|
5797
5981
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5798
5982
|
return ret;
|
|
5799
5983
|
}
|
|
@@ -6774,7 +6958,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6774
6958
|
if (options.el) return vm.$mount(options.el);
|
|
6775
6959
|
else return vm;
|
|
6776
6960
|
}
|
|
6777
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6961
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.15`;
|
|
6778
6962
|
Vue.config = singletonApp.config;
|
|
6779
6963
|
Vue.use = (plugin, ...options) => {
|
|
6780
6964
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8234,8 +8418,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8234
8418
|
def(el, "__vnode", vnode, true);
|
|
8235
8419
|
def(el, "__vueParentComponent", parentComponent, true);
|
|
8236
8420
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
8237
|
-
if (transition)
|
|
8238
|
-
|
|
8421
|
+
if (transition) {
|
|
8422
|
+
if (!needTransition(parentSuspense, transition) && !transition.persisted) el[deferredEnterKey] = true;
|
|
8423
|
+
performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
|
|
8424
|
+
} else hostInsert(el, container, anchor);
|
|
8239
8425
|
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
8240
8426
|
const isHmr = isHmrUpdating;
|
|
8241
8427
|
queuePostRenderEffect(() => {
|
|
@@ -8500,16 +8686,20 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8500
8686
|
} else {
|
|
8501
8687
|
let { next, bu, u, parent, vnode } = instance;
|
|
8502
8688
|
{
|
|
8503
|
-
const
|
|
8504
|
-
if (
|
|
8689
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
8690
|
+
if (unresolvedAsyncRoot) {
|
|
8505
8691
|
if (next) {
|
|
8506
8692
|
next.el = vnode.el;
|
|
8507
8693
|
updateComponentPreRender(instance, next, optimized);
|
|
8508
8694
|
}
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
if (
|
|
8512
|
-
|
|
8695
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
8696
|
+
const retry = () => {
|
|
8697
|
+
if (instance.effect.flags & 1024) return;
|
|
8698
|
+
if (parentSuspense && parentSuspense.pendingBranch) queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8699
|
+
else instance.update();
|
|
8700
|
+
};
|
|
8701
|
+
retry.flags = 24;
|
|
8702
|
+
queuePostRenderEffect(retry, void 0, parentSuspense);
|
|
8513
8703
|
});
|
|
8514
8704
|
return;
|
|
8515
8705
|
}
|
|
@@ -8533,7 +8723,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8533
8723
|
const prevTree = instance.subTree;
|
|
8534
8724
|
instance.subTree = nextTree;
|
|
8535
8725
|
startMeasure(instance, `patch`);
|
|
8536
|
-
patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8726
|
+
patch(prevTree, nextTree, hostParentNode(prevTree.el || resolveAsyncComponentPlaceholder(prevTree)), getNextHostNode(prevTree), instance, parentSuspense, namespace);
|
|
8537
8727
|
endMeasure(instance, `patch`);
|
|
8538
8728
|
next.el = nextTree.el;
|
|
8539
8729
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
@@ -8737,9 +8927,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8737
8927
|
}
|
|
8738
8928
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8739
8929
|
if (shapeFlag & 256) {
|
|
8740
|
-
if (
|
|
8741
|
-
else parentComponent.ctx.deactivate(vnode);
|
|
8742
|
-
return;
|
|
8930
|
+
if (parentComponent.ctx.deactivate(vnode)) return;
|
|
8743
8931
|
}
|
|
8744
8932
|
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8745
8933
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
@@ -8820,13 +9008,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8820
9008
|
if (effect) {
|
|
8821
9009
|
effect.stop();
|
|
8822
9010
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8823
|
-
} else if (
|
|
9011
|
+
} else if (subTree) {
|
|
8824
9012
|
subTree.transition = instance.vnode.transition;
|
|
8825
9013
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8826
9014
|
}
|
|
8827
9015
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8828
9016
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8829
|
-
|
|
9017
|
+
const markUnmounted = () => instance.isUnmounted = true;
|
|
9018
|
+
markUnmounted.flags = 8;
|
|
9019
|
+
queuePostRenderEffect(markUnmounted, void 0, parentSuspense);
|
|
8830
9020
|
devtoolsComponentRemoved(instance);
|
|
8831
9021
|
};
|
|
8832
9022
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
@@ -8940,11 +9130,11 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8940
9130
|
c2.el && (c2.el.__vnode = c2);
|
|
8941
9131
|
}
|
|
8942
9132
|
}
|
|
8943
|
-
function
|
|
9133
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
8944
9134
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
8945
9135
|
if (subComponent) {
|
|
8946
9136
|
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
8947
|
-
else return
|
|
9137
|
+
else return locateUnresolvedAsyncRoot(subComponent);
|
|
8948
9138
|
}
|
|
8949
9139
|
}
|
|
8950
9140
|
function invalidateMount(hooks) {
|
|
@@ -9014,7 +9204,9 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
9014
9204
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
9015
9205
|
if (anchorVnode.placeholder) return anchorVnode.placeholder;
|
|
9016
9206
|
const instance = anchorVnode.component;
|
|
9017
|
-
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9207
|
+
if (instance && instance.subTree) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
9208
|
+
const suspense = anchorVnode.suspense;
|
|
9209
|
+
if (suspense && suspense.activeBranch) return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
9018
9210
|
return null;
|
|
9019
9211
|
}
|
|
9020
9212
|
//#endregion
|
|
@@ -9026,17 +9218,22 @@ function withSuspenseEnabled(value) {
|
|
|
9026
9218
|
return value;
|
|
9027
9219
|
}
|
|
9028
9220
|
let suspenseId = 0;
|
|
9221
|
+
const deferredEnterKey = Symbol("_deferredEnter");
|
|
9029
9222
|
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
9030
9223
|
name: "Suspense",
|
|
9031
9224
|
__isSuspense: true,
|
|
9032
9225
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
9033
9226
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
9034
9227
|
else {
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
n2.
|
|
9039
|
-
|
|
9228
|
+
const suspense = n1.suspense;
|
|
9229
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
9230
|
+
const owner = suspense.parentComponent;
|
|
9231
|
+
if (!!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId ? parentSuspense.pendingBranch && !isSameVNodeType(n2.ssContent, suspense.pendingBranch || suspense.activeBranch) : !suspense.isInFallback) {
|
|
9232
|
+
n2.suspense = suspense;
|
|
9233
|
+
suspense.vnode = n2;
|
|
9234
|
+
n2.el = n1.el;
|
|
9235
|
+
return;
|
|
9236
|
+
}
|
|
9040
9237
|
}
|
|
9041
9238
|
patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
|
|
9042
9239
|
}
|
|
@@ -9048,6 +9245,36 @@ function triggerEvent(vnode, name) {
|
|
|
9048
9245
|
const eventListener = vnode.props && vnode.props[name];
|
|
9049
9246
|
if (isFunction(eventListener)) eventListener();
|
|
9050
9247
|
}
|
|
9248
|
+
function enterDeferred(suspense, branch) {
|
|
9249
|
+
const enters = [];
|
|
9250
|
+
collectDeferredEnters(branch, enters, true);
|
|
9251
|
+
if (isVaporInteropEnabled) {
|
|
9252
|
+
const { parentComponent } = suspense;
|
|
9253
|
+
const vapor = parentComponent && parentComponent.appContext.vapor;
|
|
9254
|
+
if (vapor) vapor.enterDeferred(suspense, enters);
|
|
9255
|
+
}
|
|
9256
|
+
if (enters.length) queuePostFlushCb(enters);
|
|
9257
|
+
}
|
|
9258
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
9259
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
9260
|
+
if (shapeFlag & 6) {
|
|
9261
|
+
const subTree = vnode.component.subTree;
|
|
9262
|
+
if (subTree) collectDeferredEnters(subTree, enters, isRoot);
|
|
9263
|
+
return;
|
|
9264
|
+
}
|
|
9265
|
+
if (shapeFlag & 192) return;
|
|
9266
|
+
if (shapeFlag & 1) {
|
|
9267
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
9268
|
+
el[deferredEnterKey] = void 0;
|
|
9269
|
+
if (transition && !transition.persisted) {
|
|
9270
|
+
transition.beforeEnter(el);
|
|
9271
|
+
enters.push(() => transition.enter(el));
|
|
9272
|
+
}
|
|
9273
|
+
}
|
|
9274
|
+
isRoot = false;
|
|
9275
|
+
}
|
|
9276
|
+
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) collectDeferredEnters(children[i], enters, isRoot);
|
|
9277
|
+
}
|
|
9051
9278
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
9052
9279
|
const { p: patch, o: { createElement } } = rendererInternals;
|
|
9053
9280
|
const hiddenContainer = createElement("div");
|
|
@@ -9087,11 +9314,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9087
9314
|
suspense.activeBranch = pendingBranch;
|
|
9088
9315
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
9089
9316
|
suspense.deps = 0;
|
|
9090
|
-
|
|
9091
|
-
const effect = suspense.effects[i];
|
|
9092
|
-
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
9093
|
-
}
|
|
9094
|
-
suspense.effects.length = 0;
|
|
9317
|
+
discardEffects(suspense);
|
|
9095
9318
|
suspense.hiddenContainer = createElement("div");
|
|
9096
9319
|
if (isInFallback) {
|
|
9097
9320
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
@@ -9114,14 +9337,14 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9114
9337
|
} else {
|
|
9115
9338
|
triggerEvent(n2, "onPending");
|
|
9116
9339
|
suspense.pendingBranch = newBranch;
|
|
9117
|
-
|
|
9118
|
-
else suspense.pendingId = suspenseId++;
|
|
9340
|
+
suspense.pendingId = suspenseId++;
|
|
9119
9341
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
9120
9342
|
if (suspense.deps <= 0) suspense.resolve();
|
|
9121
9343
|
else {
|
|
9122
|
-
const { timeout
|
|
9123
|
-
if (timeout > 0) setTimeout(() => {
|
|
9124
|
-
|
|
9344
|
+
const { timeout } = suspense;
|
|
9345
|
+
if (timeout > 0) suspense.timeoutTimer = setTimeout(() => {
|
|
9346
|
+
suspense.timeoutTimer = void 0;
|
|
9347
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
9125
9348
|
}, timeout);
|
|
9126
9349
|
else if (timeout === 0) suspense.fallback(newFallback);
|
|
9127
9350
|
}
|
|
@@ -9157,6 +9380,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9157
9380
|
deps: 0,
|
|
9158
9381
|
pendingId: suspenseId++,
|
|
9159
9382
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
9383
|
+
timeoutTimer: void 0,
|
|
9160
9384
|
activeBranch: null,
|
|
9161
9385
|
isFallbackMountPending: false,
|
|
9162
9386
|
pendingBranch: null,
|
|
@@ -9174,26 +9398,39 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9174
9398
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
9175
9399
|
let hasUpdatedAnchor = false;
|
|
9176
9400
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
9177
|
-
if (pendingId === suspense.pendingId) {
|
|
9401
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
9402
|
+
enterDeferred(suspense, pendingBranch);
|
|
9178
9403
|
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
9179
9404
|
queuePostFlushCb(effects);
|
|
9180
9405
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
9181
9406
|
}
|
|
9182
9407
|
};
|
|
9183
9408
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
9184
|
-
if (parentNode(activeBranch.el) === container) {
|
|
9409
|
+
if (parentNode(activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)) === container) {
|
|
9185
9410
|
anchor = next(activeBranch);
|
|
9186
9411
|
hasUpdatedAnchor = true;
|
|
9187
9412
|
}
|
|
9188
9413
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
9189
9414
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
9190
9415
|
}
|
|
9191
|
-
if (!delayEnter)
|
|
9416
|
+
if (!delayEnter) {
|
|
9417
|
+
enterDeferred(suspense, pendingBranch);
|
|
9418
|
+
move(pendingBranch, container, anchor, 0, parentComponent);
|
|
9419
|
+
}
|
|
9192
9420
|
}
|
|
9421
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9422
|
+
suspense.timeoutTimer = void 0;
|
|
9193
9423
|
suspense.isFallbackMountPending = false;
|
|
9194
9424
|
setActiveBranch(suspense, pendingBranch);
|
|
9195
9425
|
suspense.pendingBranch = null;
|
|
9196
9426
|
suspense.isInFallback = false;
|
|
9427
|
+
let kept = 0;
|
|
9428
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9429
|
+
const effect = effects[i];
|
|
9430
|
+
if (effect.flags & 16) queuePostFlushCb(effect);
|
|
9431
|
+
else effects[kept++] = effect;
|
|
9432
|
+
}
|
|
9433
|
+
effects.length = kept;
|
|
9197
9434
|
let parent = suspense.parent;
|
|
9198
9435
|
let hasUnresolvedAncestor = false;
|
|
9199
9436
|
while (parent) {
|
|
@@ -9216,13 +9453,13 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9216
9453
|
triggerEvent(vnode, "onResolve");
|
|
9217
9454
|
},
|
|
9218
9455
|
fallback(fallbackVNode) {
|
|
9219
|
-
if (!suspense.pendingBranch) return;
|
|
9456
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) return;
|
|
9220
9457
|
const { vnode, activeBranch, parentComponent, container, namespace } = suspense;
|
|
9221
9458
|
triggerEvent(vnode, "onFallback");
|
|
9222
9459
|
const anchor = next(activeBranch);
|
|
9223
9460
|
const mountFallback = () => {
|
|
9224
9461
|
suspense.isFallbackMountPending = false;
|
|
9225
|
-
if (!suspense.isInFallback) return;
|
|
9462
|
+
if (suspense.isUnmounted || !suspense.isInFallback) return;
|
|
9226
9463
|
const latestFallback = suspense.vnode.ssFallback;
|
|
9227
9464
|
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
9228
9465
|
setActiveBranch(suspense, latestFallback);
|
|
@@ -9246,24 +9483,52 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9246
9483
|
registerDep(instance, onResolve) {
|
|
9247
9484
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9248
9485
|
if (isInPendingSuspense) suspense.deps++;
|
|
9486
|
+
const render = (setupResult) => {
|
|
9487
|
+
instance.asyncResolved = true;
|
|
9488
|
+
onResolve(setupResult);
|
|
9489
|
+
};
|
|
9249
9490
|
instance.asyncDep.catch((err) => {
|
|
9250
|
-
handleError(err, instance, 0);
|
|
9491
|
+
handleError(err, instance, 0, false, true);
|
|
9492
|
+
return () => null;
|
|
9251
9493
|
}).then((asyncSetupResult) => {
|
|
9252
|
-
if (instance.isUnmounted || suspense.isUnmounted
|
|
9494
|
+
if (instance.isUnmounted || suspense.isUnmounted) return;
|
|
9495
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
9253
9496
|
setCurrentInstance(null, void 0);
|
|
9254
9497
|
if (!instance.scope.active) {
|
|
9255
|
-
if (
|
|
9498
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9256
9499
|
return;
|
|
9257
9500
|
}
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9501
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
9502
|
+
const job = () => {
|
|
9503
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) return;
|
|
9504
|
+
if (suspense.pendingBranch) queueEffectWithSuspense(job, void 0, suspense);
|
|
9505
|
+
else render(asyncSetupResult);
|
|
9506
|
+
};
|
|
9507
|
+
job.flags = 24;
|
|
9508
|
+
queueEffectWithSuspense(job, void 0, suspense);
|
|
9509
|
+
return;
|
|
9510
|
+
}
|
|
9511
|
+
render(asyncSetupResult);
|
|
9512
|
+
if (isPendingDep && --suspense.deps === 0) suspense.resolve();
|
|
9261
9513
|
});
|
|
9262
9514
|
},
|
|
9263
9515
|
unmount(parentSuspense, doRemove) {
|
|
9264
9516
|
suspense.isUnmounted = true;
|
|
9517
|
+
clearTimeout(suspense.timeoutTimer);
|
|
9518
|
+
suspense.timeoutTimer = void 0;
|
|
9519
|
+
if (parentSuspenseId !== void 0) {
|
|
9520
|
+
const parent = suspense.parent;
|
|
9521
|
+
const pendingId = parentSuspenseId;
|
|
9522
|
+
parentSuspenseId = void 0;
|
|
9523
|
+
queuePostFlushCb(() => {
|
|
9524
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) parent.resolve();
|
|
9525
|
+
});
|
|
9526
|
+
}
|
|
9265
9527
|
if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
|
|
9266
|
-
if (suspense.pendingBranch)
|
|
9528
|
+
if (suspense.pendingBranch) {
|
|
9529
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
9530
|
+
discardEffects(suspense);
|
|
9531
|
+
}
|
|
9267
9532
|
}
|
|
9268
9533
|
};
|
|
9269
9534
|
return suspense;
|
|
@@ -9304,6 +9569,14 @@ function normalizeSuspenseSlot(s) {
|
|
|
9304
9569
|
if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
|
|
9305
9570
|
return s;
|
|
9306
9571
|
}
|
|
9572
|
+
function discardEffects(suspense) {
|
|
9573
|
+
const { effects } = suspense;
|
|
9574
|
+
for (let i = 0; i < effects.length; i++) {
|
|
9575
|
+
const effect = effects[i];
|
|
9576
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
9577
|
+
}
|
|
9578
|
+
effects.length = 0;
|
|
9579
|
+
}
|
|
9307
9580
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
9308
9581
|
if (suspense && suspense.pendingBranch) {
|
|
9309
9582
|
if (isArray(fn)) suspense.effects.push(...fn);
|
|
@@ -9571,7 +9844,8 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
9571
9844
|
}
|
|
9572
9845
|
function guardReactiveProps(props) {
|
|
9573
9846
|
if (!props) return null;
|
|
9574
|
-
|
|
9847
|
+
if (/* @__PURE__ */ isProxy(props)) return extend({}, props);
|
|
9848
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
9575
9849
|
}
|
|
9576
9850
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
9577
9851
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -9685,6 +9959,17 @@ function normalizeVNode(child) {
|
|
|
9685
9959
|
function cloneIfMounted(child) {
|
|
9686
9960
|
return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
|
|
9687
9961
|
}
|
|
9962
|
+
let deferElementSlots = false;
|
|
9963
|
+
/**
|
|
9964
|
+
* While enabled, compiled default slots passed as children of plain elements
|
|
9965
|
+
* are kept on the vnode so the server renderer can render them in push mode.
|
|
9966
|
+
* @internal
|
|
9967
|
+
*/
|
|
9968
|
+
function setDeferElementSlots(value) {
|
|
9969
|
+
const prev = deferElementSlots;
|
|
9970
|
+
deferElementSlots = value;
|
|
9971
|
+
return prev;
|
|
9972
|
+
}
|
|
9688
9973
|
function normalizeChildren(vnode, children) {
|
|
9689
9974
|
let type = 0;
|
|
9690
9975
|
const { shapeFlag } = vnode;
|
|
@@ -9693,6 +9978,11 @@ function normalizeChildren(vnode, children) {
|
|
|
9693
9978
|
else if (typeof children === "object") {
|
|
9694
9979
|
if (shapeFlag & 65) {
|
|
9695
9980
|
const slot = children.default;
|
|
9981
|
+
if (deferElementSlots && slot && slot._c && shapeFlag & 1) {
|
|
9982
|
+
vnode.children = children;
|
|
9983
|
+
vnode.shapeFlag |= 32;
|
|
9984
|
+
return;
|
|
9985
|
+
}
|
|
9696
9986
|
if (slot) {
|
|
9697
9987
|
slot._c && (slot._d = false);
|
|
9698
9988
|
normalizeChildren(vnode, slot());
|
|
@@ -9967,7 +10257,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9967
10257
|
setInSSRSetupState(false);
|
|
9968
10258
|
}
|
|
9969
10259
|
}).catch((e) => {
|
|
9970
|
-
handleError(e, instance, 0);
|
|
10260
|
+
handleError(e, instance, 0, void 0, true);
|
|
10261
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
9971
10262
|
});
|
|
9972
10263
|
else {
|
|
9973
10264
|
instance.asyncDep = setupResult;
|
|
@@ -10042,11 +10333,16 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10042
10333
|
else warn$1(`Component is missing template or render function: `, Component);
|
|
10043
10334
|
}
|
|
10044
10335
|
}
|
|
10336
|
+
/**
|
|
10337
|
+
* Read through the setup context `attrs` proxy to get the raw attrs object.
|
|
10338
|
+
* @internal
|
|
10339
|
+
*/
|
|
10340
|
+
const rawAttrsKey = Symbol();
|
|
10045
10341
|
const attrsProxyHandlers = {
|
|
10046
10342
|
get(target, key) {
|
|
10047
10343
|
markAttrsAccessed();
|
|
10048
10344
|
track(target, "get", "");
|
|
10049
|
-
return target[key];
|
|
10345
|
+
return key === rawAttrsKey ? target : target[key];
|
|
10050
10346
|
},
|
|
10051
10347
|
set() {
|
|
10052
10348
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -10344,7 +10640,7 @@ function isMemoSame(cached, memo) {
|
|
|
10344
10640
|
}
|
|
10345
10641
|
//#endregion
|
|
10346
10642
|
//#region packages/runtime-core/src/index.ts
|
|
10347
|
-
const version = "3.6.0-rc.
|
|
10643
|
+
const version = "3.6.0-rc.15";
|
|
10348
10644
|
const warn = warn$1;
|
|
10349
10645
|
/**
|
|
10350
10646
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10370,7 +10666,8 @@ const ssrUtils = {
|
|
|
10370
10666
|
popWarningContext,
|
|
10371
10667
|
VaporSlot,
|
|
10372
10668
|
rawVaporSlotKey,
|
|
10373
|
-
invokeSlotFallback
|
|
10669
|
+
invokeSlotFallback,
|
|
10670
|
+
setDeferElementSlots
|
|
10374
10671
|
};
|
|
10375
10672
|
/**
|
|
10376
10673
|
* @internal only exposed in compat builds
|
|
@@ -11159,7 +11456,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11159
11456
|
}
|
|
11160
11457
|
this._styleAnchors.delete(this._def);
|
|
11161
11458
|
this._applyStyles(newStyles);
|
|
11162
|
-
|
|
11459
|
+
this._instance = null;
|
|
11163
11460
|
this._update();
|
|
11164
11461
|
};
|
|
11165
11462
|
const dispatch = (event, args) => {
|
|
@@ -11774,15 +12071,15 @@ const vModelSelect = {
|
|
|
11774
12071
|
vModelSelectInit(el, value, number);
|
|
11775
12072
|
el[assignKey] = getModelAssigner(vnode);
|
|
11776
12073
|
},
|
|
11777
|
-
mounted(el, { value }) {
|
|
11778
|
-
vModelSetSelected(el, value);
|
|
12074
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
12075
|
+
vModelSetSelected(el, value, number);
|
|
11779
12076
|
},
|
|
11780
12077
|
beforeUpdate(el, { value }, vnode) {
|
|
11781
12078
|
el._modelValue = value;
|
|
11782
12079
|
el[assignKey] = getModelAssigner(vnode);
|
|
11783
12080
|
},
|
|
11784
|
-
updated(el, { value }) {
|
|
11785
|
-
vModelSetSelected(el, value);
|
|
12081
|
+
updated(el, { value, modifiers: { number } }) {
|
|
12082
|
+
vModelSetSelected(el, value, number);
|
|
11786
12083
|
}
|
|
11787
12084
|
};
|
|
11788
12085
|
/**
|
|
@@ -11817,14 +12114,14 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
11817
12114
|
/**
|
|
11818
12115
|
* @internal
|
|
11819
12116
|
*/
|
|
11820
|
-
const vModelSetSelected = (el, value) => {
|
|
12117
|
+
const vModelSetSelected = (el, value, number = false) => {
|
|
11821
12118
|
el._modelValue = value;
|
|
11822
12119
|
const pending = el._pendingValue;
|
|
11823
12120
|
el._pendingValue = void 0;
|
|
11824
12121
|
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
11825
|
-
setSelected(el, value);
|
|
12122
|
+
setSelected(el, value, number);
|
|
11826
12123
|
};
|
|
11827
|
-
function setSelected(el, value) {
|
|
12124
|
+
function setSelected(el, value, number) {
|
|
11828
12125
|
const isMultiple = el.multiple;
|
|
11829
12126
|
const isArrayValue = isArray(value);
|
|
11830
12127
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -11839,7 +12136,7 @@ function setSelected(el, value) {
|
|
|
11839
12136
|
const optionType = typeof optionValue;
|
|
11840
12137
|
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
11841
12138
|
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
11842
|
-
} else option.selected = value.has(optionValue);
|
|
12139
|
+
} else option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
11843
12140
|
} else if (looseEqual(getValue(option), value)) {
|
|
11844
12141
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
11845
12142
|
return;
|
|
@@ -14807,7 +15104,11 @@ function getLoc(start, end) {
|
|
|
14807
15104
|
};
|
|
14808
15105
|
}
|
|
14809
15106
|
function cloneLoc(loc) {
|
|
14810
|
-
return
|
|
15107
|
+
return {
|
|
15108
|
+
start: extend({}, loc.start),
|
|
15109
|
+
end: extend({}, loc.end),
|
|
15110
|
+
source: loc.source
|
|
15111
|
+
};
|
|
14811
15112
|
}
|
|
14812
15113
|
function setLocEnd(loc, end) {
|
|
14813
15114
|
loc.end = tokenizer.getPos(end);
|
|
@@ -17634,7 +17935,7 @@ const stringifyStatic = (children, context, parent) => {
|
|
|
17634
17935
|
for (; i < children.length; i++) {
|
|
17635
17936
|
const child = children[i];
|
|
17636
17937
|
if (isParentCached || getCachedNode(child)) {
|
|
17637
|
-
const result = analyzeNode(child);
|
|
17938
|
+
const result = analyzeNode(child, context);
|
|
17638
17939
|
if (result) {
|
|
17639
17940
|
nc += result[0];
|
|
17640
17941
|
ec += result[1];
|
|
@@ -17664,7 +17965,7 @@ const isNonStringifiable = /*@__PURE__*/ makeMap(`caption,thead,tr,th,tbody,td,t
|
|
|
17664
17965
|
* - nc is the number of nodes inside
|
|
17665
17966
|
* - ec is the number of element with bindings inside
|
|
17666
17967
|
*/
|
|
17667
|
-
function analyzeNode(node) {
|
|
17968
|
+
function analyzeNode(node, context) {
|
|
17668
17969
|
if (node.type === 1 && isNonStringifiable(node.tag)) return false;
|
|
17669
17970
|
if (node.type === 1 && findDir(node, "once", true)) return false;
|
|
17670
17971
|
if (node.type === 12) return [1, 0];
|
|
@@ -17683,6 +17984,7 @@ function analyzeNode(node) {
|
|
|
17683
17984
|
if (p.type === 7 && p.name === "bind") {
|
|
17684
17985
|
if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node.ns))) return bail();
|
|
17685
17986
|
if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) return bail();
|
|
17987
|
+
if (p.arg && p.arg.isStatic && (isBooleanAttr(p.arg.content) || p.arg.content === "hidden") && context.isCustomElement(node.tag)) return bail();
|
|
17686
17988
|
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) return bail();
|
|
17687
17989
|
}
|
|
17688
17990
|
}
|
|
@@ -17727,11 +18029,10 @@ function stringifyElement(node, context) {
|
|
|
17727
18029
|
res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
|
|
17728
18030
|
continue;
|
|
17729
18031
|
}
|
|
17730
|
-
if ((isBooleanAttr(p.arg.content) || p.arg.content === "hidden") && exp.content === "false") continue;
|
|
17731
18032
|
let evaluated = evaluateConstant(exp);
|
|
17732
18033
|
if (evaluated != null) {
|
|
17733
|
-
const arg = p.arg
|
|
17734
|
-
if (arg
|
|
18034
|
+
const arg = p.arg.content;
|
|
18035
|
+
if ((isBooleanAttr(arg) || arg === "hidden") && !includeBooleanAttr(evaluated)) continue;
|
|
17735
18036
|
if (arg === "class") evaluated = normalizeClass(evaluated);
|
|
17736
18037
|
else if (arg === "style") evaluated = stringifyStyle(normalizeStyle(evaluated));
|
|
17737
18038
|
res += ` ${p.arg.content}="${escapeHtml(evaluated)}"`;
|