@vue/compat 3.6.0-beta.8 → 3.6.0-beta.9
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-compat.d.ts +9 -4
- package/dist/vue.cjs.js +60 -31
- package/dist/vue.cjs.prod.js +43 -28
- package/dist/vue.esm-browser.js +60 -31
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +64 -32
- package/dist/vue.global.js +60 -31
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +60 -31
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +64 -32
- package/dist/vue.runtime.global.js +60 -31
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +3 -3
package/dist/vue-compat.d.ts
CHANGED
|
@@ -268,8 +268,8 @@ type UnwrapRef<T> = T extends ShallowRef<infer V, unknown> ? V : T extends Ref<i
|
|
|
268
268
|
type UnwrapRefSimple<T> = T extends Builtin | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | {
|
|
269
269
|
[RawSymbol]?: true;
|
|
270
270
|
} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { [K in keyof T]: UnwrapRefSimple<T[K]> } : T extends object & {
|
|
271
|
-
[ShallowReactiveMarker]
|
|
272
|
-
} ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]> } : T;
|
|
271
|
+
[ShallowReactiveMarker]: never;
|
|
272
|
+
} ? T : T extends object ? { [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]> } : T;
|
|
273
273
|
//#endregion
|
|
274
274
|
//#region packages/reactivity/src/watch.d.ts
|
|
275
275
|
type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
|
|
@@ -564,6 +564,10 @@ interface SuspenseProps {
|
|
|
564
564
|
onResolve?: () => void;
|
|
565
565
|
onPending?: () => void;
|
|
566
566
|
onFallback?: () => void;
|
|
567
|
+
/**
|
|
568
|
+
* Switch to fallback content if it takes longer than `timeout` milliseconds to render the new default content.
|
|
569
|
+
* A `timeout` value of `0` will cause the fallback content to be displayed immediately when default content is replaced.
|
|
570
|
+
*/
|
|
567
571
|
timeout?: string | number;
|
|
568
572
|
/**
|
|
569
573
|
* Allow suspense to be captured by parent suspense
|
|
@@ -597,6 +601,7 @@ interface SuspenseBoundary {
|
|
|
597
601
|
container: RendererElement;
|
|
598
602
|
hiddenContainer: RendererElement;
|
|
599
603
|
activeBranch: VNode | null;
|
|
604
|
+
isFallbackMountPending: boolean;
|
|
600
605
|
pendingBranch: VNode | null;
|
|
601
606
|
deps: number;
|
|
602
607
|
pendingId: number;
|
|
@@ -22159,7 +22164,7 @@ declare namespace DataType {
|
|
|
22159
22164
|
type SingleAnimationTimeline = "auto" | "none" | (string & {});
|
|
22160
22165
|
type SingleTransition<TTime> = EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | (string & {});
|
|
22161
22166
|
type StepEasingFunction = "step-end" | "step-start" | (string & {});
|
|
22162
|
-
type
|
|
22167
|
+
type SystemColor = "AccentColor" | "AccentColorText" | "ActiveText" | "ButtonBorder" | "ButtonFace" | "ButtonText" | "Canvas" | "CanvasText" | "Field" | "FieldText" | "GrayText" | "Highlight" | "HighlightText" | "LinkText" | "Mark" | "MarkText" | "SelectedItem" | "SelectedItemText" | "VisitedText";
|
|
22163
22168
|
type SystemFamilyName = "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar";
|
|
22164
22169
|
type TextEdge = "cap" | "ex" | "ideographic" | "ideographic-ink" | "text" | (string & {});
|
|
22165
22170
|
type TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing";
|
|
@@ -22218,6 +22223,6 @@ declare module "@vue/runtime-core" {
|
|
|
22218
22223
|
}
|
|
22219
22224
|
//#endregion
|
|
22220
22225
|
//#region temp/packages/vue-compat/src/index.d.ts
|
|
22221
|
-
declare const Vue: CompatVue;
|
|
22226
|
+
export declare const Vue: CompatVue;
|
|
22222
22227
|
//#endregion
|
|
22223
22228
|
export { Vue as default };
|
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1817,16 +1817,16 @@ function toRefs(object) {
|
|
|
1817
1817
|
return ret;
|
|
1818
1818
|
}
|
|
1819
1819
|
var ObjectRefImpl = class {
|
|
1820
|
-
constructor(_object,
|
|
1820
|
+
constructor(_object, key, _defaultValue) {
|
|
1821
1821
|
this._object = _object;
|
|
1822
|
-
this._key = _key;
|
|
1823
1822
|
this._defaultValue = _defaultValue;
|
|
1824
1823
|
this["__v_isRef"] = true;
|
|
1825
1824
|
this._value = void 0;
|
|
1825
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1826
1826
|
this._raw = /* @__PURE__ */ toRaw(_object);
|
|
1827
1827
|
let shallow = true;
|
|
1828
1828
|
let obj = _object;
|
|
1829
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1829
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) do
|
|
1830
1830
|
shallow = !/* @__PURE__ */ isProxy(obj) || /* @__PURE__ */ isShallow(obj);
|
|
1831
1831
|
while (shallow && (obj = obj["__v_raw"]));
|
|
1832
1832
|
this._shallow = shallow;
|
|
@@ -2736,6 +2736,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2736
2736
|
//#endregion
|
|
2737
2737
|
//#region packages/runtime-core/src/hmr.ts
|
|
2738
2738
|
let isHmrUpdating = false;
|
|
2739
|
+
const setHmrUpdating = (v) => {
|
|
2740
|
+
try {
|
|
2741
|
+
return isHmrUpdating;
|
|
2742
|
+
} finally {
|
|
2743
|
+
isHmrUpdating = v;
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2739
2746
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2740
2747
|
const hmrDirtyComponentsMode = /* @__PURE__ */ new Map();
|
|
2741
2748
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3593,25 +3600,26 @@ const TeleportImpl = {
|
|
|
3593
3600
|
mount(container, mainAnchor);
|
|
3594
3601
|
updateCssVars(n2, true);
|
|
3595
3602
|
}
|
|
3596
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3603
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3597
3604
|
n2.el.__isMounted = false;
|
|
3598
3605
|
queuePostRenderEffect(() => {
|
|
3606
|
+
if (n2.el.__isMounted !== false) return;
|
|
3599
3607
|
mountToTarget();
|
|
3600
3608
|
delete n2.el.__isMounted;
|
|
3601
3609
|
}, void 0, parentSuspense);
|
|
3602
3610
|
} else mountToTarget();
|
|
3603
3611
|
} else {
|
|
3604
|
-
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
3605
|
-
queuePostRenderEffect(() => {
|
|
3606
|
-
TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
3607
|
-
}, void 0, parentSuspense);
|
|
3608
|
-
return;
|
|
3609
|
-
}
|
|
3610
3612
|
n2.el = n1.el;
|
|
3611
3613
|
n2.targetStart = n1.targetStart;
|
|
3612
3614
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
3613
3615
|
const target = n2.target = n1.target;
|
|
3614
3616
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3617
|
+
if (n1.el.__isMounted === false) {
|
|
3618
|
+
queuePostRenderEffect(() => {
|
|
3619
|
+
TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
3620
|
+
}, void 0, parentSuspense);
|
|
3621
|
+
return;
|
|
3622
|
+
}
|
|
3615
3623
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3616
3624
|
const currentContainer = wasDisabled ? container : target;
|
|
3617
3625
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3633,11 +3641,9 @@ const TeleportImpl = {
|
|
|
3633
3641
|
}
|
|
3634
3642
|
},
|
|
3635
3643
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3636
|
-
const { shapeFlag, children, anchor, targetStart, targetAnchor,
|
|
3637
|
-
if (
|
|
3638
|
-
|
|
3639
|
-
hostRemove(targetAnchor);
|
|
3640
|
-
}
|
|
3644
|
+
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3645
|
+
if (targetStart) hostRemove(targetStart);
|
|
3646
|
+
if (targetAnchor) hostRemove(targetAnchor);
|
|
3641
3647
|
doRemove && hostRemove(anchor);
|
|
3642
3648
|
if (shapeFlag & 16) {
|
|
3643
3649
|
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
@@ -3897,7 +3903,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3897
3903
|
callHook(hook, [el]);
|
|
3898
3904
|
},
|
|
3899
3905
|
enter(el) {
|
|
3900
|
-
if (isLeaving()) return;
|
|
3906
|
+
if (!isHmrUpdating && isLeaving()) return;
|
|
3901
3907
|
let hook = onEnter;
|
|
3902
3908
|
let afterHook = onAfterEnter;
|
|
3903
3909
|
let cancelHook = onEnterCancelled;
|
|
@@ -6276,7 +6282,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6276
6282
|
if (options.el) return vm.$mount(options.el);
|
|
6277
6283
|
else return vm;
|
|
6278
6284
|
}
|
|
6279
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6285
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.9`;
|
|
6280
6286
|
Vue.config = singletonApp.config;
|
|
6281
6287
|
Vue.use = (plugin, ...options) => {
|
|
6282
6288
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7088,15 +7094,19 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
7088
7094
|
if (key === "style" && isObject(nextProp) && isObject(prevProp)) return !looseEqual(nextProp, prevProp);
|
|
7089
7095
|
return nextProp !== prevProp;
|
|
7090
7096
|
}
|
|
7091
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
7097
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
7092
7098
|
while (parent && !parent.vapor) {
|
|
7093
7099
|
const root = parent.subTree;
|
|
7094
|
-
if (root.suspense && root.suspense.activeBranch === vnode)
|
|
7100
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
7101
|
+
root.suspense.vnode.el = root.el = el;
|
|
7102
|
+
vnode = root;
|
|
7103
|
+
}
|
|
7095
7104
|
if (root === vnode) {
|
|
7096
7105
|
(vnode = parent.vnode).el = el;
|
|
7097
7106
|
parent = parent.parent;
|
|
7098
7107
|
} else break;
|
|
7099
7108
|
}
|
|
7109
|
+
if (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el;
|
|
7100
7110
|
}
|
|
7101
7111
|
//#endregion
|
|
7102
7112
|
//#region packages/runtime-core/src/compat/props.ts
|
|
@@ -7705,10 +7715,19 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7705
7715
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
7706
7716
|
if (transition) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
|
|
7707
7717
|
else hostInsert(el, container, anchor);
|
|
7708
|
-
if ((vnodeHook = props && props.onVnodeMounted) || dirs)
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7718
|
+
if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
|
|
7719
|
+
const isHmr = isHmrUpdating;
|
|
7720
|
+
queuePostRenderEffect(() => {
|
|
7721
|
+
let prev;
|
|
7722
|
+
prev = setHmrUpdating(isHmr);
|
|
7723
|
+
try {
|
|
7724
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7725
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
7726
|
+
} finally {
|
|
7727
|
+
setHmrUpdating(prev);
|
|
7728
|
+
}
|
|
7729
|
+
}, void 0, parentSuspense);
|
|
7730
|
+
}
|
|
7712
7731
|
};
|
|
7713
7732
|
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
7714
7733
|
if (scopeId) hostSetScopeId(el, scopeId);
|
|
@@ -8191,7 +8210,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8191
8210
|
else hostInsert(el, container, anchor);
|
|
8192
8211
|
};
|
|
8193
8212
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
8194
|
-
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
|
|
8213
|
+
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
8195
8214
|
if (patchFlag === -2) optimized = false;
|
|
8196
8215
|
if (ref != null) {
|
|
8197
8216
|
const prevSub = setActiveSub();
|
|
@@ -8229,9 +8248,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8229
8248
|
}
|
|
8230
8249
|
if (doRemove) remove(vnode);
|
|
8231
8250
|
}
|
|
8232
|
-
|
|
8251
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
8252
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) queuePostRenderEffect(() => {
|
|
8233
8253
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8234
8254
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8255
|
+
if (shouldInvalidateMemo) vnode.el = null;
|
|
8235
8256
|
}, void 0, parentSuspense);
|
|
8236
8257
|
};
|
|
8237
8258
|
const remove = (vnode) => {
|
|
@@ -8586,6 +8607,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8586
8607
|
pendingId: suspenseId++,
|
|
8587
8608
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
8588
8609
|
activeBranch: null,
|
|
8610
|
+
isFallbackMountPending: false,
|
|
8589
8611
|
pendingBranch: null,
|
|
8590
8612
|
isInFallback: !isHydrating,
|
|
8591
8613
|
isHydrating,
|
|
@@ -8606,13 +8628,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8606
8628
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8607
8629
|
}
|
|
8608
8630
|
};
|
|
8609
|
-
if (activeBranch) {
|
|
8631
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8610
8632
|
if (parentNode(activeBranch.el) === container) anchor = next(activeBranch);
|
|
8611
8633
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8612
8634
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8613
8635
|
}
|
|
8614
8636
|
if (!delayEnter) move(pendingBranch, container, anchor, 0, parentComponent);
|
|
8615
8637
|
}
|
|
8638
|
+
suspense.isFallbackMountPending = false;
|
|
8616
8639
|
setActiveBranch(suspense, pendingBranch);
|
|
8617
8640
|
suspense.pendingBranch = null;
|
|
8618
8641
|
suspense.isInFallback = false;
|
|
@@ -8642,12 +8665,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8642
8665
|
triggerEvent(vnode, "onFallback");
|
|
8643
8666
|
const anchor = next(activeBranch);
|
|
8644
8667
|
const mountFallback = () => {
|
|
8668
|
+
suspense.isFallbackMountPending = false;
|
|
8645
8669
|
if (!suspense.isInFallback) return;
|
|
8646
8670
|
patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8647
8671
|
setActiveBranch(suspense, fallbackVNode);
|
|
8648
8672
|
};
|
|
8649
8673
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
8650
|
-
if (delayEnter)
|
|
8674
|
+
if (delayEnter) {
|
|
8675
|
+
suspense.isFallbackMountPending = true;
|
|
8676
|
+
activeBranch.transition.afterLeave = mountFallback;
|
|
8677
|
+
}
|
|
8651
8678
|
suspense.isInFallback = true;
|
|
8652
8679
|
unmount(activeBranch, parentComponent, null, true);
|
|
8653
8680
|
if (!delayEnter) mountFallback();
|
|
@@ -9092,6 +9119,7 @@ function mergeProps(...args) {
|
|
|
9092
9119
|
const existing = ret[key];
|
|
9093
9120
|
const incoming = toMerge[key];
|
|
9094
9121
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
9122
|
+
else if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;
|
|
9095
9123
|
} else if (key !== "") ret[key] = toMerge[key];
|
|
9096
9124
|
}
|
|
9097
9125
|
return ret;
|
|
@@ -9672,7 +9700,7 @@ function isMemoSame(cached, memo) {
|
|
|
9672
9700
|
}
|
|
9673
9701
|
//#endregion
|
|
9674
9702
|
//#region packages/runtime-core/src/index.ts
|
|
9675
|
-
const version = "3.6.0-beta.
|
|
9703
|
+
const version = "3.6.0-beta.9";
|
|
9676
9704
|
const warn = warn$1;
|
|
9677
9705
|
/**
|
|
9678
9706
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10938,7 +10966,8 @@ const vModelTextUpdate = (el, oldValue, value, trim, number, lazy) => {
|
|
|
10938
10966
|
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
10939
10967
|
const newValue = value == null ? "" : value;
|
|
10940
10968
|
if (elValue === newValue) return;
|
|
10941
|
-
|
|
10969
|
+
const rootNode = el.getRootNode();
|
|
10970
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
10942
10971
|
if (lazy && value === oldValue) return;
|
|
10943
10972
|
if (trim && el.value.trim() === newValue) return;
|
|
10944
10973
|
}
|
|
@@ -15374,7 +15403,7 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15374
15403
|
`)`
|
|
15375
15404
|
]),
|
|
15376
15405
|
createCompoundExpression([
|
|
15377
|
-
`if (_cached`,
|
|
15406
|
+
`if (_cached && _cached.el`,
|
|
15378
15407
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
15379
15408
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
15380
15409
|
]),
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.9
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1635,16 +1635,16 @@ function toRefs(object) {
|
|
|
1635
1635
|
return ret;
|
|
1636
1636
|
}
|
|
1637
1637
|
var ObjectRefImpl = class {
|
|
1638
|
-
constructor(_object,
|
|
1638
|
+
constructor(_object, key, _defaultValue) {
|
|
1639
1639
|
this._object = _object;
|
|
1640
|
-
this._key = _key;
|
|
1641
1640
|
this._defaultValue = _defaultValue;
|
|
1642
1641
|
this["__v_isRef"] = true;
|
|
1643
1642
|
this._value = void 0;
|
|
1643
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1644
1644
|
this._raw = /* @__PURE__ */ toRaw(_object);
|
|
1645
1645
|
let shallow = true;
|
|
1646
1646
|
let obj = _object;
|
|
1647
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1647
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) do
|
|
1648
1648
|
shallow = !/* @__PURE__ */ isProxy(obj) || /* @__PURE__ */ isShallow(obj);
|
|
1649
1649
|
while (shallow && (obj = obj["__v_raw"]));
|
|
1650
1650
|
this._shallow = shallow;
|
|
@@ -2862,25 +2862,26 @@ const TeleportImpl = {
|
|
|
2862
2862
|
mount(container, mainAnchor);
|
|
2863
2863
|
updateCssVars(n2, true);
|
|
2864
2864
|
}
|
|
2865
|
-
if (isTeleportDeferred(n2.props)) {
|
|
2865
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
2866
2866
|
n2.el.__isMounted = false;
|
|
2867
2867
|
queuePostRenderEffect(() => {
|
|
2868
|
+
if (n2.el.__isMounted !== false) return;
|
|
2868
2869
|
mountToTarget();
|
|
2869
2870
|
delete n2.el.__isMounted;
|
|
2870
2871
|
}, void 0, parentSuspense);
|
|
2871
2872
|
} else mountToTarget();
|
|
2872
2873
|
} else {
|
|
2873
|
-
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
2874
|
-
queuePostRenderEffect(() => {
|
|
2875
|
-
TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
2876
|
-
}, void 0, parentSuspense);
|
|
2877
|
-
return;
|
|
2878
|
-
}
|
|
2879
2874
|
n2.el = n1.el;
|
|
2880
2875
|
n2.targetStart = n1.targetStart;
|
|
2881
2876
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
2882
2877
|
const target = n2.target = n1.target;
|
|
2883
2878
|
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
2879
|
+
if (n1.el.__isMounted === false) {
|
|
2880
|
+
queuePostRenderEffect(() => {
|
|
2881
|
+
TeleportImpl.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);
|
|
2882
|
+
}, void 0, parentSuspense);
|
|
2883
|
+
return;
|
|
2884
|
+
}
|
|
2884
2885
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
2885
2886
|
const currentContainer = wasDisabled ? container : target;
|
|
2886
2887
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -2901,11 +2902,9 @@ const TeleportImpl = {
|
|
|
2901
2902
|
}
|
|
2902
2903
|
},
|
|
2903
2904
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
2904
|
-
const { shapeFlag, children, anchor, targetStart, targetAnchor,
|
|
2905
|
-
if (
|
|
2906
|
-
|
|
2907
|
-
hostRemove(targetAnchor);
|
|
2908
|
-
}
|
|
2905
|
+
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
2906
|
+
if (targetStart) hostRemove(targetStart);
|
|
2907
|
+
if (targetAnchor) hostRemove(targetAnchor);
|
|
2909
2908
|
doRemove && hostRemove(anchor);
|
|
2910
2909
|
if (shapeFlag & 16) {
|
|
2911
2910
|
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
@@ -5204,7 +5203,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5204
5203
|
if (options.el) return vm.$mount(options.el);
|
|
5205
5204
|
else return vm;
|
|
5206
5205
|
}
|
|
5207
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
5206
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.9`;
|
|
5208
5207
|
Vue.config = singletonApp.config;
|
|
5209
5208
|
Vue.use = (plugin, ...options) => {
|
|
5210
5209
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -5862,15 +5861,19 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
5862
5861
|
if (key === "style" && isObject(nextProp) && isObject(prevProp)) return !looseEqual(nextProp, prevProp);
|
|
5863
5862
|
return nextProp !== prevProp;
|
|
5864
5863
|
}
|
|
5865
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
5864
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
5866
5865
|
while (parent && !parent.vapor) {
|
|
5867
5866
|
const root = parent.subTree;
|
|
5868
|
-
if (root.suspense && root.suspense.activeBranch === vnode)
|
|
5867
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
5868
|
+
root.suspense.vnode.el = root.el = el;
|
|
5869
|
+
vnode = root;
|
|
5870
|
+
}
|
|
5869
5871
|
if (root === vnode) {
|
|
5870
5872
|
(vnode = parent.vnode).el = el;
|
|
5871
5873
|
parent = parent.parent;
|
|
5872
5874
|
} else break;
|
|
5873
5875
|
}
|
|
5876
|
+
if (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el;
|
|
5874
5877
|
}
|
|
5875
5878
|
//#endregion
|
|
5876
5879
|
//#region packages/runtime-core/src/compat/props.ts
|
|
@@ -6301,8 +6304,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6301
6304
|
if (transition) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
|
|
6302
6305
|
else hostInsert(el, container, anchor);
|
|
6303
6306
|
if ((vnodeHook = props && props.onVnodeMounted) || dirs) queuePostRenderEffect(() => {
|
|
6304
|
-
|
|
6305
|
-
|
|
6307
|
+
try {
|
|
6308
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6309
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
6310
|
+
} finally {}
|
|
6306
6311
|
}, void 0, parentSuspense);
|
|
6307
6312
|
};
|
|
6308
6313
|
const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
|
|
@@ -6738,7 +6743,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6738
6743
|
else hostInsert(el, container, anchor);
|
|
6739
6744
|
};
|
|
6740
6745
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
6741
|
-
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex } = vnode;
|
|
6746
|
+
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
6742
6747
|
if (patchFlag === -2) optimized = false;
|
|
6743
6748
|
if (ref != null) {
|
|
6744
6749
|
const prevSub = setActiveSub();
|
|
@@ -6776,9 +6781,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6776
6781
|
}
|
|
6777
6782
|
if (doRemove) remove(vnode);
|
|
6778
6783
|
}
|
|
6779
|
-
|
|
6784
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
6785
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) queuePostRenderEffect(() => {
|
|
6780
6786
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6781
6787
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
6788
|
+
if (shouldInvalidateMemo) vnode.el = null;
|
|
6782
6789
|
}, void 0, parentSuspense);
|
|
6783
6790
|
};
|
|
6784
6791
|
const remove = (vnode) => {
|
|
@@ -7110,6 +7117,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7110
7117
|
pendingId: suspenseId++,
|
|
7111
7118
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
7112
7119
|
activeBranch: null,
|
|
7120
|
+
isFallbackMountPending: false,
|
|
7113
7121
|
pendingBranch: null,
|
|
7114
7122
|
isInFallback: !isHydrating,
|
|
7115
7123
|
isHydrating,
|
|
@@ -7128,13 +7136,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7128
7136
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
7129
7137
|
}
|
|
7130
7138
|
};
|
|
7131
|
-
if (activeBranch) {
|
|
7139
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
7132
7140
|
if (parentNode(activeBranch.el) === container) anchor = next(activeBranch);
|
|
7133
7141
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
7134
7142
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
7135
7143
|
}
|
|
7136
7144
|
if (!delayEnter) move(pendingBranch, container, anchor, 0, parentComponent);
|
|
7137
7145
|
}
|
|
7146
|
+
suspense.isFallbackMountPending = false;
|
|
7138
7147
|
setActiveBranch(suspense, pendingBranch);
|
|
7139
7148
|
suspense.pendingBranch = null;
|
|
7140
7149
|
suspense.isInFallback = false;
|
|
@@ -7164,12 +7173,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7164
7173
|
triggerEvent(vnode, "onFallback");
|
|
7165
7174
|
const anchor = next(activeBranch);
|
|
7166
7175
|
const mountFallback = () => {
|
|
7176
|
+
suspense.isFallbackMountPending = false;
|
|
7167
7177
|
if (!suspense.isInFallback) return;
|
|
7168
7178
|
patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7169
7179
|
setActiveBranch(suspense, fallbackVNode);
|
|
7170
7180
|
};
|
|
7171
7181
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7172
|
-
if (delayEnter)
|
|
7182
|
+
if (delayEnter) {
|
|
7183
|
+
suspense.isFallbackMountPending = true;
|
|
7184
|
+
activeBranch.transition.afterLeave = mountFallback;
|
|
7185
|
+
}
|
|
7173
7186
|
suspense.isInFallback = true;
|
|
7174
7187
|
unmount(activeBranch, parentComponent, null, true);
|
|
7175
7188
|
if (!delayEnter) mountFallback();
|
|
@@ -7579,6 +7592,7 @@ function mergeProps(...args) {
|
|
|
7579
7592
|
const existing = ret[key];
|
|
7580
7593
|
const incoming = toMerge[key];
|
|
7581
7594
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
7595
|
+
else if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;
|
|
7582
7596
|
} else if (key !== "") ret[key] = toMerge[key];
|
|
7583
7597
|
}
|
|
7584
7598
|
return ret;
|
|
@@ -7913,7 +7927,7 @@ function isMemoSame(cached, memo) {
|
|
|
7913
7927
|
}
|
|
7914
7928
|
//#endregion
|
|
7915
7929
|
//#region packages/runtime-core/src/index.ts
|
|
7916
|
-
const version = "3.6.0-beta.
|
|
7930
|
+
const version = "3.6.0-beta.9";
|
|
7917
7931
|
const warn = NOOP;
|
|
7918
7932
|
/**
|
|
7919
7933
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9120,7 +9134,8 @@ const vModelTextUpdate = (el, oldValue, value, trim, number, lazy) => {
|
|
|
9120
9134
|
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
9121
9135
|
const newValue = value == null ? "" : value;
|
|
9122
9136
|
if (elValue === newValue) return;
|
|
9123
|
-
|
|
9137
|
+
const rootNode = el.getRootNode();
|
|
9138
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
9124
9139
|
if (lazy && value === oldValue) return;
|
|
9125
9140
|
if (trim && el.value.trim() === newValue) return;
|
|
9126
9141
|
}
|
|
@@ -13418,7 +13433,7 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
13418
13433
|
`)`
|
|
13419
13434
|
]),
|
|
13420
13435
|
createCompoundExpression([
|
|
13421
|
-
`if (_cached`,
|
|
13436
|
+
`if (_cached && _cached.el`,
|
|
13422
13437
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
13423
13438
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
13424
13439
|
]),
|