@vue/compat 3.6.0-beta.14 → 3.6.0-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/vue.cjs.js +41 -19
- package/dist/vue.cjs.prod.js +38 -18
- package/dist/vue.esm-browser.js +37 -18
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +40 -19
- package/dist/vue.global.js +37 -18
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +37 -18
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +40 -19
- package/dist/vue.runtime.global.js +37 -18
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +3 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2251,8 +2251,9 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2251
2251
|
if (once && cb) {
|
|
2252
2252
|
const _cb = cb;
|
|
2253
2253
|
cb = (...args) => {
|
|
2254
|
-
_cb(...args);
|
|
2254
|
+
const res = _cb(...args);
|
|
2255
2255
|
this.stop();
|
|
2256
|
+
return res;
|
|
2256
2257
|
};
|
|
2257
2258
|
}
|
|
2258
2259
|
this.cb = cb;
|
|
@@ -2268,7 +2269,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2268
2269
|
if (!this.cb) return;
|
|
2269
2270
|
const { immediate, deep, call } = this.options;
|
|
2270
2271
|
if (initialRun && !immediate) return;
|
|
2271
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2272
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2272
2273
|
cleanup(this);
|
|
2273
2274
|
const currentWatcher = activeWatcher;
|
|
2274
2275
|
activeWatcher = this;
|
|
@@ -4736,11 +4737,16 @@ function defineAsyncComponent(source) {
|
|
|
4736
4737
|
onError(err);
|
|
4737
4738
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4738
4739
|
});
|
|
4739
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4740
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4740
4741
|
load().then(() => {
|
|
4742
|
+
if (instance.isUnmounted) return;
|
|
4741
4743
|
loaded.value = true;
|
|
4742
4744
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4743
4745
|
}).catch((err) => {
|
|
4746
|
+
if (instance.isUnmounted) {
|
|
4747
|
+
setPendingRequest(null);
|
|
4748
|
+
return;
|
|
4749
|
+
}
|
|
4744
4750
|
onError(err);
|
|
4745
4751
|
error.value = err;
|
|
4746
4752
|
});
|
|
@@ -4798,14 +4804,22 @@ function createAsyncComponentContext(source) {
|
|
|
4798
4804
|
setPendingRequest: (request) => pendingRequest = request
|
|
4799
4805
|
};
|
|
4800
4806
|
}
|
|
4801
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4807
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4802
4808
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4803
4809
|
const error = /* @__PURE__ */ ref();
|
|
4804
4810
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4805
|
-
|
|
4811
|
+
let timeoutTimer;
|
|
4812
|
+
let delayTimer;
|
|
4813
|
+
if (instance) onUnmounted(() => {
|
|
4814
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4815
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4816
|
+
}, instance);
|
|
4817
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4818
|
+
if (instance && instance.isUnmounted) return;
|
|
4806
4819
|
delayed.value = false;
|
|
4807
4820
|
}, delay);
|
|
4808
|
-
if (timeout != null) setTimeout(() => {
|
|
4821
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4822
|
+
if (instance && instance.isUnmounted) return;
|
|
4809
4823
|
if (!loaded.value && !error.value) {
|
|
4810
4824
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4811
4825
|
onError(err);
|
|
@@ -6366,7 +6380,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6366
6380
|
if (options.el) return vm.$mount(options.el);
|
|
6367
6381
|
else return vm;
|
|
6368
6382
|
}
|
|
6369
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6383
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.16`;
|
|
6370
6384
|
Vue.config = singletonApp.config;
|
|
6371
6385
|
Vue.use = (plugin, ...options) => {
|
|
6372
6386
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6621,7 +6635,9 @@ function defineReactive(obj, key, val) {
|
|
|
6621
6635
|
else Object.keys(val).forEach((key) => {
|
|
6622
6636
|
try {
|
|
6623
6637
|
defineReactiveSimple(val, key, val[key]);
|
|
6624
|
-
} catch (e) {
|
|
6638
|
+
} catch (e) {
|
|
6639
|
+
if (!!(process.env.NODE_ENV !== "production")) warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6640
|
+
}
|
|
6625
6641
|
});
|
|
6626
6642
|
}
|
|
6627
6643
|
const i = obj.$;
|
|
@@ -6872,12 +6888,13 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6872
6888
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6873
6889
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6874
6890
|
}
|
|
6875
|
-
|
|
6891
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6892
|
+
if (!hasVModel) {
|
|
6876
6893
|
localValue = value;
|
|
6877
6894
|
trigger();
|
|
6878
6895
|
}
|
|
6879
6896
|
i.emit(`update:${name}`, emittedValue);
|
|
6880
|
-
if (hasChanged(value,
|
|
6897
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6881
6898
|
prevSetValue = value;
|
|
6882
6899
|
prevEmittedValue = emittedValue;
|
|
6883
6900
|
}
|
|
@@ -9906,7 +9923,7 @@ function isMemoSame(cached, memo) {
|
|
|
9906
9923
|
}
|
|
9907
9924
|
//#endregion
|
|
9908
9925
|
//#region packages/runtime-core/src/index.ts
|
|
9909
|
-
const version = "3.6.0-beta.
|
|
9926
|
+
const version = "3.6.0-beta.16";
|
|
9910
9927
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9911
9928
|
/**
|
|
9912
9929
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10555,7 +10572,7 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
10555
10572
|
const existingInvoker = invokers[rawName];
|
|
10556
10573
|
if (nextValue && existingInvoker) existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
|
|
10557
10574
|
else {
|
|
10558
|
-
const [name, options] =
|
|
10575
|
+
const [name, options] = parseEventName(rawName);
|
|
10559
10576
|
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue, instance), options);
|
|
10560
10577
|
else if (existingInvoker) {
|
|
10561
10578
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10564,7 +10581,7 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
10564
10581
|
}
|
|
10565
10582
|
}
|
|
10566
10583
|
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
10567
|
-
function
|
|
10584
|
+
function parseEventName(name) {
|
|
10568
10585
|
let options;
|
|
10569
10586
|
if (optionsModifierRE.test(name)) {
|
|
10570
10587
|
options = {};
|
|
@@ -11130,7 +11147,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11130
11147
|
prevChildren = [];
|
|
11131
11148
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11132
11149
|
const child = children[i];
|
|
11133
|
-
if (child.el && child.el instanceof Element) {
|
|
11150
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
11134
11151
|
prevChildren.push(child);
|
|
11135
11152
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11136
11153
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -11669,6 +11686,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11669
11686
|
isValidHtmlOrSvgAttribute: () => isValidHtmlOrSvgAttribute,
|
|
11670
11687
|
knownTemplateRefs: () => knownTemplateRefs,
|
|
11671
11688
|
leaveCbKey: () => leaveCbKey,
|
|
11689
|
+
logMismatchError: () => logMismatchError,
|
|
11672
11690
|
markAsyncBoundary: () => markAsyncBoundary,
|
|
11673
11691
|
markRaw: () => markRaw,
|
|
11674
11692
|
matches: () => matches,
|
|
@@ -11699,6 +11717,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11699
11717
|
onUpdated: () => onUpdated,
|
|
11700
11718
|
onWatcherCleanup: () => onWatcherCleanup,
|
|
11701
11719
|
openBlock: () => openBlock,
|
|
11720
|
+
parseEventName: () => parseEventName,
|
|
11702
11721
|
patchProp: () => patchProp,
|
|
11703
11722
|
patchStyle: () => patchStyle,
|
|
11704
11723
|
performAsyncHydrate: () => performAsyncHydrate,
|
|
@@ -13476,7 +13495,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
13476
13495
|
}
|
|
13477
13496
|
},
|
|
13478
13497
|
oncdata(start, end) {
|
|
13479
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13498
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13480
13499
|
else emitError(1, start - 9);
|
|
13481
13500
|
},
|
|
13482
13501
|
onprocessinginstruction(start) {
|
|
@@ -13972,7 +13991,7 @@ function getSelfName(filename) {
|
|
|
13972
13991
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13973
13992
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13974
13993
|
}
|
|
13975
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13994
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13976
13995
|
const context = {
|
|
13977
13996
|
filename,
|
|
13978
13997
|
selfName: getSelfName(filename),
|
|
@@ -13994,6 +14013,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
13994
14013
|
bindingMetadata,
|
|
13995
14014
|
inline,
|
|
13996
14015
|
isTS,
|
|
14016
|
+
eventDelegation,
|
|
13997
14017
|
onError,
|
|
13998
14018
|
onWarn,
|
|
13999
14019
|
compatConfig,
|
|
@@ -14005,6 +14025,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14005
14025
|
imports: [],
|
|
14006
14026
|
cached: [],
|
|
14007
14027
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
14028
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
14008
14029
|
temps: 0,
|
|
14009
14030
|
identifiers: Object.create(null),
|
|
14010
14031
|
identifierScopes: Object.create(null),
|
|
@@ -14640,7 +14661,7 @@ const transformExpression = (node, context) => {
|
|
|
14640
14661
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14641
14662
|
const exp = dir.exp;
|
|
14642
14663
|
const arg = dir.arg;
|
|
14643
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14664
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14644
14665
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14645
14666
|
}
|
|
14646
14667
|
}
|
|
@@ -16285,4 +16306,4 @@ Vue.compile = compileToFunction;
|
|
|
16285
16306
|
var esm_index_default = Vue;
|
|
16286
16307
|
const configureCompat = Vue.configureCompat;
|
|
16287
16308
|
//#endregion
|
|
16288
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
|
16309
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2247,8 +2247,9 @@ var Vue = (function() {
|
|
|
2247
2247
|
if (once && cb) {
|
|
2248
2248
|
const _cb = cb;
|
|
2249
2249
|
cb = (...args) => {
|
|
2250
|
-
_cb(...args);
|
|
2250
|
+
const res = _cb(...args);
|
|
2251
2251
|
this.stop();
|
|
2252
|
+
return res;
|
|
2252
2253
|
};
|
|
2253
2254
|
}
|
|
2254
2255
|
this.cb = cb;
|
|
@@ -2262,7 +2263,7 @@ var Vue = (function() {
|
|
|
2262
2263
|
if (!this.cb) return;
|
|
2263
2264
|
const { immediate, deep, call } = this.options;
|
|
2264
2265
|
if (initialRun && !immediate) return;
|
|
2265
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2266
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2266
2267
|
cleanup(this);
|
|
2267
2268
|
const currentWatcher = activeWatcher;
|
|
2268
2269
|
activeWatcher = this;
|
|
@@ -4666,11 +4667,16 @@ var Vue = (function() {
|
|
|
4666
4667
|
onError(err);
|
|
4667
4668
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4668
4669
|
});
|
|
4669
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4670
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4670
4671
|
load().then(() => {
|
|
4672
|
+
if (instance.isUnmounted) return;
|
|
4671
4673
|
loaded.value = true;
|
|
4672
4674
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4673
4675
|
}).catch((err) => {
|
|
4676
|
+
if (instance.isUnmounted) {
|
|
4677
|
+
setPendingRequest(null);
|
|
4678
|
+
return;
|
|
4679
|
+
}
|
|
4674
4680
|
onError(err);
|
|
4675
4681
|
error.value = err;
|
|
4676
4682
|
});
|
|
@@ -4728,14 +4734,22 @@ var Vue = (function() {
|
|
|
4728
4734
|
setPendingRequest: (request) => pendingRequest = request
|
|
4729
4735
|
};
|
|
4730
4736
|
}
|
|
4731
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4737
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4732
4738
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4733
4739
|
const error = /* @__PURE__ */ ref();
|
|
4734
4740
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4735
|
-
|
|
4741
|
+
let timeoutTimer;
|
|
4742
|
+
let delayTimer;
|
|
4743
|
+
if (instance) onUnmounted(() => {
|
|
4744
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4745
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4746
|
+
}, instance);
|
|
4747
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4748
|
+
if (instance && instance.isUnmounted) return;
|
|
4736
4749
|
delayed.value = false;
|
|
4737
4750
|
}, delay);
|
|
4738
|
-
if (timeout != null) setTimeout(() => {
|
|
4751
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4752
|
+
if (instance && instance.isUnmounted) return;
|
|
4739
4753
|
if (!loaded.value && !error.value) {
|
|
4740
4754
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4741
4755
|
onError(err);
|
|
@@ -6290,7 +6304,7 @@ var Vue = (function() {
|
|
|
6290
6304
|
if (options.el) return vm.$mount(options.el);
|
|
6291
6305
|
else return vm;
|
|
6292
6306
|
}
|
|
6293
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6307
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.16`;
|
|
6294
6308
|
Vue.config = singletonApp.config;
|
|
6295
6309
|
Vue.use = (plugin, ...options) => {
|
|
6296
6310
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6545,7 +6559,9 @@ var Vue = (function() {
|
|
|
6545
6559
|
else Object.keys(val).forEach((key) => {
|
|
6546
6560
|
try {
|
|
6547
6561
|
defineReactiveSimple(val, key, val[key]);
|
|
6548
|
-
} catch (e) {
|
|
6562
|
+
} catch (e) {
|
|
6563
|
+
warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6564
|
+
}
|
|
6549
6565
|
});
|
|
6550
6566
|
}
|
|
6551
6567
|
const i = obj.$;
|
|
@@ -6790,12 +6806,13 @@ var Vue = (function() {
|
|
|
6790
6806
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6791
6807
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6792
6808
|
}
|
|
6793
|
-
|
|
6809
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6810
|
+
if (!hasVModel) {
|
|
6794
6811
|
localValue = value;
|
|
6795
6812
|
trigger();
|
|
6796
6813
|
}
|
|
6797
6814
|
i.emit(`update:${name}`, emittedValue);
|
|
6798
|
-
if (hasChanged(value,
|
|
6815
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6799
6816
|
prevSetValue = value;
|
|
6800
6817
|
prevEmittedValue = emittedValue;
|
|
6801
6818
|
}
|
|
@@ -9750,7 +9767,7 @@ var Vue = (function() {
|
|
|
9750
9767
|
}
|
|
9751
9768
|
//#endregion
|
|
9752
9769
|
//#region packages/runtime-core/src/index.ts
|
|
9753
|
-
const version = "3.6.0-beta.
|
|
9770
|
+
const version = "3.6.0-beta.16";
|
|
9754
9771
|
const warn = warn$1;
|
|
9755
9772
|
/**
|
|
9756
9773
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10375,7 +10392,7 @@ var Vue = (function() {
|
|
|
10375
10392
|
const existingInvoker = invokers[rawName];
|
|
10376
10393
|
if (nextValue && existingInvoker) existingInvoker.value = sanitizeEventValue(nextValue, rawName);
|
|
10377
10394
|
else {
|
|
10378
|
-
const [name, options] =
|
|
10395
|
+
const [name, options] = parseEventName(rawName);
|
|
10379
10396
|
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(sanitizeEventValue(nextValue, rawName), instance), options);
|
|
10380
10397
|
else if (existingInvoker) {
|
|
10381
10398
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10384,7 +10401,7 @@ var Vue = (function() {
|
|
|
10384
10401
|
}
|
|
10385
10402
|
}
|
|
10386
10403
|
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
10387
|
-
function
|
|
10404
|
+
function parseEventName(name) {
|
|
10388
10405
|
let options;
|
|
10389
10406
|
if (optionsModifierRE.test(name)) {
|
|
10390
10407
|
options = {};
|
|
@@ -10932,7 +10949,7 @@ var Vue = (function() {
|
|
|
10932
10949
|
prevChildren = [];
|
|
10933
10950
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
10934
10951
|
const child = children[i];
|
|
10935
|
-
if (child.el && child.el instanceof Element) {
|
|
10952
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
10936
10953
|
prevChildren.push(child);
|
|
10937
10954
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10938
10955
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -13153,7 +13170,7 @@ var Vue = (function() {
|
|
|
13153
13170
|
}
|
|
13154
13171
|
},
|
|
13155
13172
|
oncdata(start, end) {
|
|
13156
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13173
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13157
13174
|
else emitError(1, start - 9);
|
|
13158
13175
|
},
|
|
13159
13176
|
onprocessinginstruction(start) {
|
|
@@ -13645,7 +13662,7 @@ var Vue = (function() {
|
|
|
13645
13662
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13646
13663
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13647
13664
|
}
|
|
13648
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13665
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13649
13666
|
const context = {
|
|
13650
13667
|
filename,
|
|
13651
13668
|
selfName: getSelfName(filename),
|
|
@@ -13667,6 +13684,7 @@ var Vue = (function() {
|
|
|
13667
13684
|
bindingMetadata,
|
|
13668
13685
|
inline,
|
|
13669
13686
|
isTS,
|
|
13687
|
+
eventDelegation,
|
|
13670
13688
|
onError,
|
|
13671
13689
|
onWarn,
|
|
13672
13690
|
compatConfig,
|
|
@@ -13678,6 +13696,7 @@ var Vue = (function() {
|
|
|
13678
13696
|
imports: [],
|
|
13679
13697
|
cached: [],
|
|
13680
13698
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13699
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
13681
13700
|
temps: 0,
|
|
13682
13701
|
identifiers: Object.create(null),
|
|
13683
13702
|
identifierScopes: Object.create(null),
|
|
@@ -14308,7 +14327,7 @@ var Vue = (function() {
|
|
|
14308
14327
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14309
14328
|
const exp = dir.exp;
|
|
14310
14329
|
const arg = dir.arg;
|
|
14311
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14330
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14312
14331
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14313
14332
|
}
|
|
14314
14333
|
}
|