@vue/runtime-dom 3.4.36 → 3.4.37
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/runtime-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +17 -11
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +5 -3
- package/dist/runtime-dom.global.js +17 -11
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.37
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -750,7 +750,7 @@ class BaseReactiveHandler {
|
|
|
750
750
|
return isShallow2;
|
|
751
751
|
} else if (key === "__v_raw") {
|
|
752
752
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
753
|
-
// this means the
|
|
753
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
754
754
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
755
755
|
return target;
|
|
756
756
|
}
|
|
@@ -2869,7 +2869,7 @@ const KeepAliveImpl = {
|
|
|
2869
2869
|
}
|
|
2870
2870
|
function pruneCacheEntry(key) {
|
|
2871
2871
|
const cached = cache.get(key);
|
|
2872
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
2872
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
2873
2873
|
unmount(cached);
|
|
2874
2874
|
} else if (current) {
|
|
2875
2875
|
resetShapeFlag(current);
|
|
@@ -2931,6 +2931,10 @@ const KeepAliveImpl = {
|
|
|
2931
2931
|
return rawVNode;
|
|
2932
2932
|
}
|
|
2933
2933
|
let vnode = getInnerChild(rawVNode);
|
|
2934
|
+
if (vnode.type === Comment) {
|
|
2935
|
+
current = null;
|
|
2936
|
+
return vnode;
|
|
2937
|
+
}
|
|
2934
2938
|
const comp = vnode.type;
|
|
2935
2939
|
const name = getComponentName(
|
|
2936
2940
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -4223,7 +4227,7 @@ function provide(key, value) {
|
|
|
4223
4227
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4224
4228
|
const instance = currentInstance || currentRenderingInstance;
|
|
4225
4229
|
if (instance || currentApp) {
|
|
4226
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
4230
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4227
4231
|
if (provides && key in provides) {
|
|
4228
4232
|
return provides[key];
|
|
4229
4233
|
} else if (arguments.length > 1) {
|
|
@@ -7123,13 +7127,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7123
7127
|
namespace
|
|
7124
7128
|
);
|
|
7125
7129
|
}
|
|
7130
|
+
container._vnode = vnode;
|
|
7126
7131
|
if (!isFlushing) {
|
|
7127
7132
|
isFlushing = true;
|
|
7128
7133
|
flushPreFlushCbs();
|
|
7129
7134
|
flushPostFlushCbs();
|
|
7130
7135
|
isFlushing = false;
|
|
7131
7136
|
}
|
|
7132
|
-
container._vnode = vnode;
|
|
7133
7137
|
};
|
|
7134
7138
|
const internals = {
|
|
7135
7139
|
p: patch,
|
|
@@ -7537,7 +7541,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
7537
7541
|
return options.get ? options.get(localValue) : localValue;
|
|
7538
7542
|
},
|
|
7539
7543
|
set(value) {
|
|
7540
|
-
|
|
7544
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
7545
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
7541
7546
|
return;
|
|
7542
7547
|
}
|
|
7543
7548
|
const rawProps = i.vnode.props;
|
|
@@ -7546,7 +7551,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
7546
7551
|
localValue = value;
|
|
7547
7552
|
trigger();
|
|
7548
7553
|
}
|
|
7549
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
7550
7554
|
i.emit(`update:${name}`, emittedValue);
|
|
7551
7555
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
7552
7556
|
trigger();
|
|
@@ -7584,9 +7588,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
7584
7588
|
} = instance;
|
|
7585
7589
|
if (emitsOptions) {
|
|
7586
7590
|
if (!(event in emitsOptions) && true) {
|
|
7587
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
7591
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
7588
7592
|
warn$1(
|
|
7589
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
7593
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
7590
7594
|
);
|
|
7591
7595
|
}
|
|
7592
7596
|
} else {
|
|
@@ -9612,7 +9616,7 @@ function isMemoSame(cached, memo) {
|
|
|
9612
9616
|
return true;
|
|
9613
9617
|
}
|
|
9614
9618
|
|
|
9615
|
-
const version = "3.4.
|
|
9619
|
+
const version = "3.4.37";
|
|
9616
9620
|
const warn = warn$1 ;
|
|
9617
9621
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9618
9622
|
const devtools = devtools$1 ;
|
|
@@ -10035,8 +10039,10 @@ function useCssVars(getter) {
|
|
|
10035
10039
|
setVarsOnVNode(instance.subTree, vars);
|
|
10036
10040
|
updateTeleports(vars);
|
|
10037
10041
|
};
|
|
10038
|
-
|
|
10042
|
+
onBeforeMount(() => {
|
|
10039
10043
|
watchPostEffect(setVars);
|
|
10044
|
+
});
|
|
10045
|
+
onMounted(() => {
|
|
10040
10046
|
const ob = new MutationObserver(setVars);
|
|
10041
10047
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10042
10048
|
onUnmounted(() => ob.disconnect());
|