@vue/compat 3.5.14 → 3.5.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/dist/vue.cjs.js +65 -30
- package/dist/vue.cjs.prod.js +40 -26
- package/dist/vue.esm-browser.js +61 -28
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +61 -28
- package/dist/vue.global.js +61 -28
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +55 -26
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +55 -26
- package/dist/vue.runtime.global.js +55 -26
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2071,11 +2071,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2071
2071
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
2072
2072
|
boundCleanup
|
|
2073
2073
|
];
|
|
2074
|
+
oldValue = newValue;
|
|
2074
2075
|
call ? call(cb, 3, args) : (
|
|
2075
2076
|
// @ts-expect-error
|
|
2076
2077
|
cb(...args)
|
|
2077
2078
|
);
|
|
2078
|
-
oldValue = newValue;
|
|
2079
2079
|
} finally {
|
|
2080
2080
|
activeWatcher = currentWatcher;
|
|
2081
2081
|
}
|
|
@@ -3528,15 +3528,16 @@ const TeleportImpl = {
|
|
|
3528
3528
|
updateCssVars(n2, true);
|
|
3529
3529
|
}
|
|
3530
3530
|
if (isTeleportDeferred(n2.props)) {
|
|
3531
|
+
n2.el.__isMounted = false;
|
|
3531
3532
|
queuePostRenderEffect(() => {
|
|
3532
3533
|
mountToTarget();
|
|
3533
|
-
n2.el.__isMounted
|
|
3534
|
+
delete n2.el.__isMounted;
|
|
3534
3535
|
}, parentSuspense);
|
|
3535
3536
|
} else {
|
|
3536
3537
|
mountToTarget();
|
|
3537
3538
|
}
|
|
3538
3539
|
} else {
|
|
3539
|
-
if (isTeleportDeferred(n2.props) &&
|
|
3540
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
3540
3541
|
queuePostRenderEffect(() => {
|
|
3541
3542
|
TeleportImpl.process(
|
|
3542
3543
|
n1,
|
|
@@ -3550,7 +3551,6 @@ const TeleportImpl = {
|
|
|
3550
3551
|
optimized,
|
|
3551
3552
|
internals
|
|
3552
3553
|
);
|
|
3553
|
-
delete n1.el.__isMounted;
|
|
3554
3554
|
}, parentSuspense);
|
|
3555
3555
|
return;
|
|
3556
3556
|
}
|
|
@@ -4541,6 +4541,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4541
4541
|
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4542
4542
|
const content = el.content.firstChild;
|
|
4543
4543
|
if (needCallTransitionHooks) {
|
|
4544
|
+
const cls = content.getAttribute("class");
|
|
4545
|
+
if (cls) content.$cls = cls;
|
|
4544
4546
|
transition.beforeEnter(content);
|
|
4545
4547
|
}
|
|
4546
4548
|
replaceNode(content, el, parentComponent);
|
|
@@ -4793,7 +4795,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4793
4795
|
let actual;
|
|
4794
4796
|
let expected;
|
|
4795
4797
|
if (key === "class") {
|
|
4796
|
-
|
|
4798
|
+
if (el.$cls) {
|
|
4799
|
+
actual = el.$cls;
|
|
4800
|
+
delete el.$cls;
|
|
4801
|
+
} else {
|
|
4802
|
+
actual = el.getAttribute("class");
|
|
4803
|
+
}
|
|
4797
4804
|
expected = normalizeClass(clientValue);
|
|
4798
4805
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
4799
4806
|
mismatchType = 2 /* CLASS */;
|
|
@@ -5088,14 +5095,25 @@ function defineAsyncComponent(source) {
|
|
|
5088
5095
|
name: "AsyncComponentWrapper",
|
|
5089
5096
|
__asyncLoader: load,
|
|
5090
5097
|
__asyncHydrate(el, instance, hydrate) {
|
|
5098
|
+
let patched = false;
|
|
5091
5099
|
const doHydrate = hydrateStrategy ? () => {
|
|
5100
|
+
const performHydrate = () => {
|
|
5101
|
+
if (patched) {
|
|
5102
|
+
warn$1(
|
|
5103
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
5104
|
+
);
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
hydrate();
|
|
5108
|
+
};
|
|
5092
5109
|
const teardown = hydrateStrategy(
|
|
5093
|
-
|
|
5110
|
+
performHydrate,
|
|
5094
5111
|
(cb) => forEachElement(el, cb)
|
|
5095
5112
|
);
|
|
5096
5113
|
if (teardown) {
|
|
5097
5114
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5098
5115
|
}
|
|
5116
|
+
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
5099
5117
|
} : hydrate;
|
|
5100
5118
|
if (resolvedComp) {
|
|
5101
5119
|
doHydrate();
|
|
@@ -7110,7 +7128,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7110
7128
|
return vm;
|
|
7111
7129
|
}
|
|
7112
7130
|
}
|
|
7113
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7131
|
+
Vue.version = `2.6.14-compat:${"3.5.16"}`;
|
|
7114
7132
|
Vue.config = singletonApp.config;
|
|
7115
7133
|
Vue.use = (plugin, ...options) => {
|
|
7116
7134
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7656,9 +7674,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7656
7674
|
},
|
|
7657
7675
|
provide(key, value) {
|
|
7658
7676
|
if (key in context.provides) {
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7677
|
+
if (hasOwn(context.provides, key)) {
|
|
7678
|
+
warn$1(
|
|
7679
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
7680
|
+
);
|
|
7681
|
+
} else {
|
|
7682
|
+
warn$1(
|
|
7683
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
7684
|
+
);
|
|
7685
|
+
}
|
|
7662
7686
|
}
|
|
7663
7687
|
context.provides[key] = value;
|
|
7664
7688
|
return app;
|
|
@@ -7698,7 +7722,7 @@ function provide(key, value) {
|
|
|
7698
7722
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
7699
7723
|
const instance = currentInstance || currentRenderingInstance;
|
|
7700
7724
|
if (instance || currentApp) {
|
|
7701
|
-
|
|
7725
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
7702
7726
|
if (provides && key in provides) {
|
|
7703
7727
|
return provides[key];
|
|
7704
7728
|
} else if (arguments.length > 1) {
|
|
@@ -8767,7 +8791,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8767
8791
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
8768
8792
|
// which also requires the correct parent container
|
|
8769
8793
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
8770
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
8794
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
8771
8795
|
// In other cases, the parent container is not actually used so we
|
|
8772
8796
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
8773
8797
|
fallbackContainer
|
|
@@ -12260,7 +12284,7 @@ function isMemoSame(cached, memo) {
|
|
|
12260
12284
|
return true;
|
|
12261
12285
|
}
|
|
12262
12286
|
|
|
12263
|
-
const version = "3.5.
|
|
12287
|
+
const version = "3.5.16";
|
|
12264
12288
|
const warn = warn$1 ;
|
|
12265
12289
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12266
12290
|
const devtools = devtools$1 ;
|
|
@@ -12960,7 +12984,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
12960
12984
|
el.setAttribute(key, v2CoercedValue);
|
|
12961
12985
|
return true;
|
|
12962
12986
|
}
|
|
12963
|
-
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.isCompatEnabled("ATTR_FALSE_VALUE", instance)) {
|
|
12987
|
+
} else if (value === false && !(el.tagName === "INPUT" && key === "value") && !isSpecialBooleanAttr(key) && compatUtils.isCompatEnabled("ATTR_FALSE_VALUE", instance)) {
|
|
12964
12988
|
compatUtils.warnDeprecation(
|
|
12965
12989
|
"ATTR_FALSE_VALUE",
|
|
12966
12990
|
instance,
|
|
@@ -13249,13 +13273,10 @@ class VueElement extends BaseClass {
|
|
|
13249
13273
|
this._root = this;
|
|
13250
13274
|
}
|
|
13251
13275
|
}
|
|
13252
|
-
if (!this._def.__asyncLoader) {
|
|
13253
|
-
this._resolveProps(this._def);
|
|
13254
|
-
}
|
|
13255
13276
|
}
|
|
13256
13277
|
connectedCallback() {
|
|
13257
13278
|
if (!this.isConnected) return;
|
|
13258
|
-
if (!this.shadowRoot) {
|
|
13279
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
13259
13280
|
this._parseSlots();
|
|
13260
13281
|
}
|
|
13261
13282
|
this._connected = true;
|
|
@@ -13268,8 +13289,7 @@ class VueElement extends BaseClass {
|
|
|
13268
13289
|
}
|
|
13269
13290
|
if (!this._instance) {
|
|
13270
13291
|
if (this._resolved) {
|
|
13271
|
-
this.
|
|
13272
|
-
this._update();
|
|
13292
|
+
this._mount(this._def);
|
|
13273
13293
|
} else {
|
|
13274
13294
|
if (parent && parent._pendingResolve) {
|
|
13275
13295
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -13285,7 +13305,15 @@ class VueElement extends BaseClass {
|
|
|
13285
13305
|
_setParent(parent = this._parent) {
|
|
13286
13306
|
if (parent) {
|
|
13287
13307
|
this._instance.parent = parent._instance;
|
|
13288
|
-
this.
|
|
13308
|
+
this._inheritParentContext(parent);
|
|
13309
|
+
}
|
|
13310
|
+
}
|
|
13311
|
+
_inheritParentContext(parent = this._parent) {
|
|
13312
|
+
if (parent && this._app) {
|
|
13313
|
+
Object.setPrototypeOf(
|
|
13314
|
+
this._app._context.provides,
|
|
13315
|
+
parent._instance.provides
|
|
13316
|
+
);
|
|
13289
13317
|
}
|
|
13290
13318
|
}
|
|
13291
13319
|
disconnectedCallback() {
|
|
@@ -13335,9 +13363,7 @@ class VueElement extends BaseClass {
|
|
|
13335
13363
|
}
|
|
13336
13364
|
}
|
|
13337
13365
|
this._numberProps = numberProps;
|
|
13338
|
-
|
|
13339
|
-
this._resolveProps(def);
|
|
13340
|
-
}
|
|
13366
|
+
this._resolveProps(def);
|
|
13341
13367
|
if (this.shadowRoot) {
|
|
13342
13368
|
this._applyStyles(styles);
|
|
13343
13369
|
} else if (styles) {
|
|
@@ -13361,6 +13387,7 @@ class VueElement extends BaseClass {
|
|
|
13361
13387
|
def.name = "VueElement";
|
|
13362
13388
|
}
|
|
13363
13389
|
this._app = this._createApp(def);
|
|
13390
|
+
this._inheritParentContext();
|
|
13364
13391
|
if (def.configureApp) {
|
|
13365
13392
|
def.configureApp(this._app);
|
|
13366
13393
|
}
|
|
@@ -13445,7 +13472,9 @@ class VueElement extends BaseClass {
|
|
|
13445
13472
|
}
|
|
13446
13473
|
}
|
|
13447
13474
|
_update() {
|
|
13448
|
-
|
|
13475
|
+
const vnode = this._createVNode();
|
|
13476
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
13477
|
+
render(vnode, this._root);
|
|
13449
13478
|
}
|
|
13450
13479
|
_createVNode() {
|
|
13451
13480
|
const baseProps = {};
|