vue 3.3.8 → 3.3.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.esm-browser.js +57 -21
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.global.js +57 -21
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +49 -16
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.global.js +49 -16
- package/dist/vue.runtime.global.prod.js +3 -3
- package/macros.d.ts +17 -17
- package/package.json +6 -6
package/dist/vue.global.js
CHANGED
|
@@ -107,7 +107,7 @@ var Vue = (function (exports) {
|
|
|
107
107
|
[4]: `STYLE`,
|
|
108
108
|
[8]: `PROPS`,
|
|
109
109
|
[16]: `FULL_PROPS`,
|
|
110
|
-
[32]: `
|
|
110
|
+
[32]: `NEED_HYDRATION`,
|
|
111
111
|
[64]: `STABLE_FRAGMENT`,
|
|
112
112
|
[128]: `KEYED_FRAGMENT`,
|
|
113
113
|
[256]: `UNKEYED_FRAGMENT`,
|
|
@@ -1004,7 +1004,7 @@ var Vue = (function (exports) {
|
|
|
1004
1004
|
toRaw(this)
|
|
1005
1005
|
);
|
|
1006
1006
|
}
|
|
1007
|
-
return type === "delete" ? false : this;
|
|
1007
|
+
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
1010
|
function createInstrumentations() {
|
|
@@ -2275,9 +2275,19 @@ var Vue = (function (exports) {
|
|
|
2275
2275
|
try {
|
|
2276
2276
|
if (vnode.shapeFlag & 4) {
|
|
2277
2277
|
const proxyToUse = withProxy || proxy;
|
|
2278
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2279
|
+
get(target, key, receiver) {
|
|
2280
|
+
warn(
|
|
2281
|
+
`Property '${String(
|
|
2282
|
+
key
|
|
2283
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
2284
|
+
);
|
|
2285
|
+
return Reflect.get(target, key, receiver);
|
|
2286
|
+
}
|
|
2287
|
+
}) : proxyToUse;
|
|
2278
2288
|
result = normalizeVNode(
|
|
2279
2289
|
render.call(
|
|
2280
|
-
|
|
2290
|
+
thisProxy,
|
|
2281
2291
|
proxyToUse,
|
|
2282
2292
|
renderCache,
|
|
2283
2293
|
props,
|
|
@@ -3239,6 +3249,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3239
3249
|
let onCleanup = (fn) => {
|
|
3240
3250
|
cleanup = effect.onStop = () => {
|
|
3241
3251
|
callWithErrorHandling(fn, instance, 4);
|
|
3252
|
+
cleanup = effect.onStop = void 0;
|
|
3242
3253
|
};
|
|
3243
3254
|
};
|
|
3244
3255
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -3709,7 +3720,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
3709
3720
|
}
|
|
3710
3721
|
}
|
|
3711
3722
|
function getKeepAliveChild(vnode) {
|
|
3712
|
-
return isKeepAlive(vnode) ?
|
|
3723
|
+
return isKeepAlive(vnode) ? (
|
|
3724
|
+
// #7121 ensure get the child component subtree in case
|
|
3725
|
+
// it's been replaced during HMR
|
|
3726
|
+
vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0
|
|
3727
|
+
) : vnode;
|
|
3713
3728
|
}
|
|
3714
3729
|
function setTransitionHooks(vnode, hooks) {
|
|
3715
3730
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -5702,6 +5717,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5702
5717
|
};
|
|
5703
5718
|
}
|
|
5704
5719
|
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
5720
|
+
if (expectedTypes.length === 0) {
|
|
5721
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
5722
|
+
}
|
|
5705
5723
|
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
5706
5724
|
const expectedType = expectedTypes[0];
|
|
5707
5725
|
const receivedType = toRawType(value);
|
|
@@ -5971,6 +5989,20 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5971
5989
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
5972
5990
|
let domType = node.nodeType;
|
|
5973
5991
|
vnode.el = node;
|
|
5992
|
+
{
|
|
5993
|
+
if (!("__vnode" in node)) {
|
|
5994
|
+
Object.defineProperty(node, "__vnode", {
|
|
5995
|
+
value: vnode,
|
|
5996
|
+
enumerable: false
|
|
5997
|
+
});
|
|
5998
|
+
}
|
|
5999
|
+
if (!("__vueParentComponent" in node)) {
|
|
6000
|
+
Object.defineProperty(node, "__vueParentComponent", {
|
|
6001
|
+
value: parentComponent,
|
|
6002
|
+
enumerable: false
|
|
6003
|
+
});
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
5974
6006
|
if (patchFlag === -2) {
|
|
5975
6007
|
optimized = false;
|
|
5976
6008
|
vnode.dynamicChildren = null;
|
|
@@ -6132,15 +6164,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6132
6164
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
6133
6165
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
6134
6166
|
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
6135
|
-
const
|
|
6167
|
+
const forcePatch = type === "input" || type === "option";
|
|
6136
6168
|
{
|
|
6137
6169
|
if (dirs) {
|
|
6138
6170
|
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
6139
6171
|
}
|
|
6140
6172
|
if (props) {
|
|
6141
|
-
if (
|
|
6173
|
+
if (forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
6142
6174
|
for (const key in props) {
|
|
6143
|
-
if (
|
|
6175
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
6176
|
+
key[0] === ".") {
|
|
6144
6177
|
patchProp(
|
|
6145
6178
|
el,
|
|
6146
6179
|
key,
|
|
@@ -7897,6 +7930,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7897
7930
|
}
|
|
7898
7931
|
};
|
|
7899
7932
|
const TeleportImpl = {
|
|
7933
|
+
name: "Teleport",
|
|
7900
7934
|
__isTeleport: true,
|
|
7901
7935
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
|
|
7902
7936
|
const {
|
|
@@ -8318,7 +8352,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8318
8352
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
8319
8353
|
type = toRaw(type);
|
|
8320
8354
|
warn(
|
|
8321
|
-
`Vue received a Component
|
|
8355
|
+
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
8322
8356
|
`
|
|
8323
8357
|
Component that was made reactive: `,
|
|
8324
8358
|
type
|
|
@@ -9133,7 +9167,7 @@ Component that was made reactive: `,
|
|
|
9133
9167
|
return true;
|
|
9134
9168
|
}
|
|
9135
9169
|
|
|
9136
|
-
const version = "3.3.
|
|
9170
|
+
const version = "3.3.9";
|
|
9137
9171
|
const ssrUtils = null;
|
|
9138
9172
|
const resolveFilter = null;
|
|
9139
9173
|
const compatUtils = null;
|
|
@@ -10266,21 +10300,20 @@ Component that was made reactive: `,
|
|
|
10266
10300
|
el[assignKey] = getModelAssigner(vnode);
|
|
10267
10301
|
if (el.composing)
|
|
10268
10302
|
return;
|
|
10303
|
+
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10304
|
+
const newValue = value == null ? "" : value;
|
|
10305
|
+
if (elValue === newValue) {
|
|
10306
|
+
return;
|
|
10307
|
+
}
|
|
10269
10308
|
if (document.activeElement === el && el.type !== "range") {
|
|
10270
10309
|
if (lazy) {
|
|
10271
10310
|
return;
|
|
10272
10311
|
}
|
|
10273
|
-
if (trim && el.value.trim() ===
|
|
10274
|
-
return;
|
|
10275
|
-
}
|
|
10276
|
-
if ((number || el.type === "number") && looseToNumber(el.value) === value) {
|
|
10312
|
+
if (trim && el.value.trim() === newValue) {
|
|
10277
10313
|
return;
|
|
10278
10314
|
}
|
|
10279
10315
|
}
|
|
10280
|
-
|
|
10281
|
-
if (el.value !== newValue) {
|
|
10282
|
-
el.value = newValue;
|
|
10283
|
-
}
|
|
10316
|
+
el.value = newValue;
|
|
10284
10317
|
}
|
|
10285
10318
|
};
|
|
10286
10319
|
const vModelCheckbox = {
|
|
@@ -11188,6 +11221,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
11188
11221
|
return node;
|
|
11189
11222
|
}
|
|
11190
11223
|
}
|
|
11224
|
+
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
11191
11225
|
|
|
11192
11226
|
const decodeRE = /&(gt|lt|amp|apos|quot);/g;
|
|
11193
11227
|
const decodeMap = {
|
|
@@ -13416,7 +13450,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13416
13450
|
onExit();
|
|
13417
13451
|
};
|
|
13418
13452
|
}
|
|
13419
|
-
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
|
13420
13453
|
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
|
13421
13454
|
const stripParensRE = /^\(|\)$/g;
|
|
13422
13455
|
function parseForExpression(input, context) {
|
|
@@ -14005,7 +14038,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14005
14038
|
)
|
|
14006
14039
|
);
|
|
14007
14040
|
} else {
|
|
14008
|
-
const { name, arg, exp, loc } = prop;
|
|
14041
|
+
const { name, arg, exp, loc, modifiers } = prop;
|
|
14009
14042
|
const isVBind = name === "bind";
|
|
14010
14043
|
const isVOn = name === "on";
|
|
14011
14044
|
if (name === "slot") {
|
|
@@ -14065,6 +14098,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14065
14098
|
}
|
|
14066
14099
|
continue;
|
|
14067
14100
|
}
|
|
14101
|
+
if (isVBind && modifiers.includes("prop")) {
|
|
14102
|
+
patchFlag |= 32;
|
|
14103
|
+
}
|
|
14068
14104
|
const directiveTransform = context.directiveTransforms[name];
|
|
14069
14105
|
if (directiveTransform) {
|
|
14070
14106
|
const { props: props2, needRuntime } = directiveTransform(prop, node, context);
|
|
@@ -14950,8 +14986,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14950
14986
|
);
|
|
14951
14987
|
}
|
|
14952
14988
|
function checkDuplicatedValue() {
|
|
14953
|
-
const value =
|
|
14954
|
-
if (value) {
|
|
14989
|
+
const value = findDir(node, "bind");
|
|
14990
|
+
if (value && isStaticArgOf(value.arg, "value")) {
|
|
14955
14991
|
context.onError(
|
|
14956
14992
|
createDOMCompilerError(
|
|
14957
14993
|
60,
|