@vue/compat 3.4.23 → 3.4.25
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 +51 -54
- package/dist/vue.cjs.prod.js +50 -49
- package/dist/vue.esm-browser.js +49 -51
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +49 -51
- package/dist/vue.global.js +47 -48
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +34 -37
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +34 -37
- package/dist/vue.runtime.global.js +32 -34
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2586,11 +2586,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2586
2586
|
warnedInvalidKeys[key] = true;
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
|
-
if (instance && config["OPTIONS_DATA_MERGE"] != null) {
|
|
2590
|
-
warn$1(
|
|
2591
|
-
`Deprecation config "${"OPTIONS_DATA_MERGE"}" can only be configured globally.`
|
|
2592
|
-
);
|
|
2593
|
-
}
|
|
2594
2589
|
}
|
|
2595
2590
|
function getCompatConfigForKey(key, instance) {
|
|
2596
2591
|
const instanceConfig = instance && instance.type.compatConfig;
|
|
@@ -2973,21 +2968,21 @@ function renderComponentRoot(instance) {
|
|
|
2973
2968
|
vnode,
|
|
2974
2969
|
proxy,
|
|
2975
2970
|
withProxy,
|
|
2976
|
-
props,
|
|
2977
2971
|
propsOptions: [propsOptions],
|
|
2978
2972
|
slots,
|
|
2979
2973
|
attrs,
|
|
2980
2974
|
emit,
|
|
2981
2975
|
render,
|
|
2982
2976
|
renderCache,
|
|
2977
|
+
props,
|
|
2983
2978
|
data,
|
|
2984
2979
|
setupState,
|
|
2985
2980
|
ctx,
|
|
2986
2981
|
inheritAttrs
|
|
2987
2982
|
} = instance;
|
|
2983
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
2988
2984
|
let result;
|
|
2989
2985
|
let fallthroughAttrs;
|
|
2990
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
2991
2986
|
{
|
|
2992
2987
|
accessedAttrs = false;
|
|
2993
2988
|
}
|
|
@@ -3009,7 +3004,7 @@ function renderComponentRoot(instance) {
|
|
|
3009
3004
|
thisProxy,
|
|
3010
3005
|
proxyToUse,
|
|
3011
3006
|
renderCache,
|
|
3012
|
-
props,
|
|
3007
|
+
true ? shallowReadonly(props) : props,
|
|
3013
3008
|
setupState,
|
|
3014
3009
|
data,
|
|
3015
3010
|
ctx
|
|
@@ -3023,7 +3018,7 @@ function renderComponentRoot(instance) {
|
|
|
3023
3018
|
}
|
|
3024
3019
|
result = normalizeVNode(
|
|
3025
3020
|
render2.length > 1 ? render2(
|
|
3026
|
-
props,
|
|
3021
|
+
true ? shallowReadonly(props) : props,
|
|
3027
3022
|
true ? {
|
|
3028
3023
|
get attrs() {
|
|
3029
3024
|
markAttrsAccessed();
|
|
@@ -3033,9 +3028,8 @@ function renderComponentRoot(instance) {
|
|
|
3033
3028
|
emit
|
|
3034
3029
|
} : { attrs, slots, emit }
|
|
3035
3030
|
) : render2(
|
|
3036
|
-
props,
|
|
3031
|
+
true ? shallowReadonly(props) : props,
|
|
3037
3032
|
null
|
|
3038
|
-
/* we know it doesn't need it */
|
|
3039
3033
|
)
|
|
3040
3034
|
);
|
|
3041
3035
|
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
@@ -4597,11 +4591,21 @@ function emptyPlaceholder(vnode) {
|
|
|
4597
4591
|
}
|
|
4598
4592
|
}
|
|
4599
4593
|
function getKeepAliveChild(vnode) {
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4594
|
+
if (!isKeepAlive(vnode)) {
|
|
4595
|
+
return vnode;
|
|
4596
|
+
}
|
|
4597
|
+
if (vnode.component) {
|
|
4598
|
+
return vnode.component.subTree;
|
|
4599
|
+
}
|
|
4600
|
+
const { shapeFlag, children } = vnode;
|
|
4601
|
+
if (children) {
|
|
4602
|
+
if (shapeFlag & 16) {
|
|
4603
|
+
return children[0];
|
|
4604
|
+
}
|
|
4605
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
4606
|
+
return children.default();
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4605
4609
|
}
|
|
4606
4610
|
function setTransitionHooks(vnode, hooks) {
|
|
4607
4611
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6619,7 +6623,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6619
6623
|
return vm;
|
|
6620
6624
|
}
|
|
6621
6625
|
}
|
|
6622
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6626
|
+
Vue.version = `2.6.14-compat:${"3.4.25"}`;
|
|
6623
6627
|
Vue.config = singletonApp.config;
|
|
6624
6628
|
Vue.use = (p, ...options) => {
|
|
6625
6629
|
if (p && isFunction(p.install)) {
|
|
@@ -7256,7 +7260,7 @@ function shouldSkipAttr(key, instance) {
|
|
|
7256
7260
|
return false;
|
|
7257
7261
|
}
|
|
7258
7262
|
|
|
7259
|
-
const internalObjectProto =
|
|
7263
|
+
const internalObjectProto = {};
|
|
7260
7264
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
7261
7265
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
7262
7266
|
|
|
@@ -7738,23 +7742,17 @@ const normalizeVNodeSlots = (instance, children) => {
|
|
|
7738
7742
|
instance.slots.default = () => normalized;
|
|
7739
7743
|
};
|
|
7740
7744
|
const initSlots = (instance, children) => {
|
|
7745
|
+
const slots = instance.slots = createInternalObject();
|
|
7741
7746
|
if (instance.vnode.shapeFlag & 32) {
|
|
7742
7747
|
const type = children._;
|
|
7743
7748
|
if (type) {
|
|
7744
|
-
|
|
7745
|
-
def(
|
|
7749
|
+
extend(slots, children);
|
|
7750
|
+
def(slots, "_", type);
|
|
7746
7751
|
} else {
|
|
7747
|
-
normalizeObjectSlots(
|
|
7748
|
-
children,
|
|
7749
|
-
instance.slots = createInternalObject(),
|
|
7750
|
-
instance
|
|
7751
|
-
);
|
|
7752
|
-
}
|
|
7753
|
-
} else {
|
|
7754
|
-
instance.slots = createInternalObject();
|
|
7755
|
-
if (children) {
|
|
7756
|
-
normalizeVNodeSlots(instance, children);
|
|
7752
|
+
normalizeObjectSlots(children, slots, instance);
|
|
7757
7753
|
}
|
|
7754
|
+
} else if (children) {
|
|
7755
|
+
normalizeVNodeSlots(instance, children);
|
|
7758
7756
|
}
|
|
7759
7757
|
};
|
|
7760
7758
|
const updateSlots = (instance, children, optimized) => {
|
|
@@ -11472,7 +11470,7 @@ function isMemoSame(cached, memo) {
|
|
|
11472
11470
|
return true;
|
|
11473
11471
|
}
|
|
11474
11472
|
|
|
11475
|
-
const version = "3.4.
|
|
11473
|
+
const version = "3.4.25";
|
|
11476
11474
|
const warn = warn$1 ;
|
|
11477
11475
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11478
11476
|
const devtools = devtools$1 ;
|
|
@@ -11717,8 +11715,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
11717
11715
|
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11718
11716
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
11719
11717
|
}
|
|
11720
|
-
forceReflow();
|
|
11721
11718
|
addTransitionClass(el, leaveActiveClass);
|
|
11719
|
+
forceReflow();
|
|
11722
11720
|
nextFrame(() => {
|
|
11723
11721
|
if (!el._isLeaving) {
|
|
11724
11722
|
return;
|
|
@@ -14823,7 +14821,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
14823
14821
|
if (parent.key === node) {
|
|
14824
14822
|
return !!parent.computed;
|
|
14825
14823
|
}
|
|
14826
|
-
return !grandparent
|
|
14824
|
+
return !grandparent ;
|
|
14827
14825
|
case "ClassProperty":
|
|
14828
14826
|
if (parent.key === node) {
|
|
14829
14827
|
return !!parent.computed;
|
|
@@ -14854,9 +14852,6 @@ function isReferenced(node, parent, grandparent) {
|
|
|
14854
14852
|
case "ExportDefaultSpecifier":
|
|
14855
14853
|
return false;
|
|
14856
14854
|
case "ExportSpecifier":
|
|
14857
|
-
if (grandparent == null ? void 0 : grandparent.source) {
|
|
14858
|
-
return false;
|
|
14859
|
-
}
|
|
14860
14855
|
return parent.local === node;
|
|
14861
14856
|
case "ImportDefaultSpecifier":
|
|
14862
14857
|
case "ImportNamespaceSpecifier":
|
|
@@ -16226,6 +16221,7 @@ function createTransformContext(root, {
|
|
|
16226
16221
|
vOnce: 0
|
|
16227
16222
|
},
|
|
16228
16223
|
parent: null,
|
|
16224
|
+
grandParent: null,
|
|
16229
16225
|
currentNode: root,
|
|
16230
16226
|
childIndex: 0,
|
|
16231
16227
|
inVOnce: false,
|
|
@@ -16400,6 +16396,7 @@ function traverseChildren(parent, context) {
|
|
|
16400
16396
|
const child = parent.children[i];
|
|
16401
16397
|
if (isString(child))
|
|
16402
16398
|
continue;
|
|
16399
|
+
context.grandParent = context.parent;
|
|
16403
16400
|
context.parent = parent;
|
|
16404
16401
|
context.childIndex = i;
|
|
16405
16402
|
context.onNodeRemoved = nodeRemoved;
|
|
@@ -17378,9 +17375,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
17378
17375
|
if (!ast) {
|
|
17379
17376
|
const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
|
|
17380
17377
|
try {
|
|
17381
|
-
ast = parser.
|
|
17378
|
+
ast = parser.parseExpression(source, {
|
|
17379
|
+
sourceType: "module",
|
|
17382
17380
|
plugins: context.expressionPlugins
|
|
17383
|
-
})
|
|
17381
|
+
});
|
|
17384
17382
|
} catch (e) {
|
|
17385
17383
|
context.onError(
|
|
17386
17384
|
createCompilerError(
|
|
@@ -18461,6 +18459,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18461
18459
|
if (arg)
|
|
18462
18460
|
mergeArgs.push(arg);
|
|
18463
18461
|
};
|
|
18462
|
+
const pushRefVForMarker = () => {
|
|
18463
|
+
if (context.scopes.vFor > 0) {
|
|
18464
|
+
properties.push(
|
|
18465
|
+
createObjectProperty(
|
|
18466
|
+
createSimpleExpression("ref_for", true),
|
|
18467
|
+
createSimpleExpression("true")
|
|
18468
|
+
)
|
|
18469
|
+
);
|
|
18470
|
+
}
|
|
18471
|
+
};
|
|
18464
18472
|
const analyzePatchFlag = ({ key, value }) => {
|
|
18465
18473
|
if (isStaticExp(key)) {
|
|
18466
18474
|
const name = key.content;
|
|
@@ -18504,14 +18512,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18504
18512
|
let isStatic = true;
|
|
18505
18513
|
if (name === "ref") {
|
|
18506
18514
|
hasRef = true;
|
|
18507
|
-
|
|
18508
|
-
properties.push(
|
|
18509
|
-
createObjectProperty(
|
|
18510
|
-
createSimpleExpression("ref_for", true),
|
|
18511
|
-
createSimpleExpression("true")
|
|
18512
|
-
)
|
|
18513
|
-
);
|
|
18514
|
-
}
|
|
18515
|
+
pushRefVForMarker();
|
|
18515
18516
|
if (value && context.inline) {
|
|
18516
18517
|
const binding = context.bindingMetadata[value.content];
|
|
18517
18518
|
if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
|
|
@@ -18573,18 +18574,14 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18573
18574
|
) {
|
|
18574
18575
|
shouldUseBlock = true;
|
|
18575
18576
|
}
|
|
18576
|
-
if (isVBind && isStaticArgOf(arg, "ref")
|
|
18577
|
-
|
|
18578
|
-
createObjectProperty(
|
|
18579
|
-
createSimpleExpression("ref_for", true),
|
|
18580
|
-
createSimpleExpression("true")
|
|
18581
|
-
)
|
|
18582
|
-
);
|
|
18577
|
+
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
18578
|
+
pushRefVForMarker();
|
|
18583
18579
|
}
|
|
18584
18580
|
if (!arg && (isVBind || isVOn)) {
|
|
18585
18581
|
hasDynamicKeys = true;
|
|
18586
18582
|
if (exp) {
|
|
18587
18583
|
if (isVBind) {
|
|
18584
|
+
pushRefVForMarker();
|
|
18588
18585
|
pushMergeArg();
|
|
18589
18586
|
{
|
|
18590
18587
|
{
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1184,7 +1184,7 @@ function readonly(target) {
|
|
|
1184
1184
|
readonlyMap
|
|
1185
1185
|
);
|
|
1186
1186
|
}
|
|
1187
|
-
function shallowReadonly(target) {
|
|
1187
|
+
function shallowReadonly$1(target) {
|
|
1188
1188
|
return createReactiveObject(
|
|
1189
1189
|
target,
|
|
1190
1190
|
true,
|
|
@@ -2102,21 +2102,21 @@ function renderComponentRoot(instance) {
|
|
|
2102
2102
|
vnode,
|
|
2103
2103
|
proxy,
|
|
2104
2104
|
withProxy,
|
|
2105
|
-
props,
|
|
2106
2105
|
propsOptions: [propsOptions],
|
|
2107
2106
|
slots,
|
|
2108
2107
|
attrs,
|
|
2109
2108
|
emit,
|
|
2110
2109
|
render,
|
|
2111
2110
|
renderCache,
|
|
2111
|
+
props,
|
|
2112
2112
|
data,
|
|
2113
2113
|
setupState,
|
|
2114
2114
|
ctx,
|
|
2115
2115
|
inheritAttrs
|
|
2116
2116
|
} = instance;
|
|
2117
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
2117
2118
|
let result;
|
|
2118
2119
|
let fallthroughAttrs;
|
|
2119
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
2120
2120
|
try {
|
|
2121
2121
|
if (vnode.shapeFlag & 4) {
|
|
2122
2122
|
const proxyToUse = withProxy || proxy;
|
|
@@ -2135,7 +2135,7 @@ function renderComponentRoot(instance) {
|
|
|
2135
2135
|
thisProxy,
|
|
2136
2136
|
proxyToUse,
|
|
2137
2137
|
renderCache,
|
|
2138
|
-
props,
|
|
2138
|
+
false ? shallowReadonly(props) : props,
|
|
2139
2139
|
setupState,
|
|
2140
2140
|
data,
|
|
2141
2141
|
ctx
|
|
@@ -2147,7 +2147,7 @@ function renderComponentRoot(instance) {
|
|
|
2147
2147
|
if (false) ;
|
|
2148
2148
|
result = normalizeVNode(
|
|
2149
2149
|
render2.length > 1 ? render2(
|
|
2150
|
-
props,
|
|
2150
|
+
false ? shallowReadonly(props) : props,
|
|
2151
2151
|
false ? {
|
|
2152
2152
|
get attrs() {
|
|
2153
2153
|
markAttrsAccessed();
|
|
@@ -2157,9 +2157,8 @@ function renderComponentRoot(instance) {
|
|
|
2157
2157
|
emit
|
|
2158
2158
|
} : { attrs, slots, emit }
|
|
2159
2159
|
) : render2(
|
|
2160
|
-
props,
|
|
2160
|
+
false ? shallowReadonly(props) : props,
|
|
2161
2161
|
null
|
|
2162
|
-
/* we know it doesn't need it */
|
|
2163
2162
|
)
|
|
2164
2163
|
);
|
|
2165
2164
|
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
@@ -3540,11 +3539,18 @@ function emptyPlaceholder(vnode) {
|
|
|
3540
3539
|
}
|
|
3541
3540
|
}
|
|
3542
3541
|
function getKeepAliveChild(vnode) {
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
)
|
|
3542
|
+
if (!isKeepAlive(vnode)) {
|
|
3543
|
+
return vnode;
|
|
3544
|
+
}
|
|
3545
|
+
const { shapeFlag, children } = vnode;
|
|
3546
|
+
if (children) {
|
|
3547
|
+
if (shapeFlag & 16) {
|
|
3548
|
+
return children[0];
|
|
3549
|
+
}
|
|
3550
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
3551
|
+
return children.default();
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3548
3554
|
}
|
|
3549
3555
|
function setTransitionHooks(vnode, hooks) {
|
|
3550
3556
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -5275,7 +5281,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5275
5281
|
return vm;
|
|
5276
5282
|
}
|
|
5277
5283
|
}
|
|
5278
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5284
|
+
Vue.version = `2.6.14-compat:${"3.4.25"}`;
|
|
5279
5285
|
Vue.config = singletonApp.config;
|
|
5280
5286
|
Vue.use = (p, ...options) => {
|
|
5281
5287
|
if (p && isFunction(p.install)) {
|
|
@@ -5802,7 +5808,7 @@ function shouldSkipAttr(key, instance) {
|
|
|
5802
5808
|
return false;
|
|
5803
5809
|
}
|
|
5804
5810
|
|
|
5805
|
-
const internalObjectProto =
|
|
5811
|
+
const internalObjectProto = {};
|
|
5806
5812
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5807
5813
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5808
5814
|
|
|
@@ -6146,21 +6152,17 @@ const normalizeVNodeSlots = (instance, children) => {
|
|
|
6146
6152
|
instance.slots.default = () => normalized;
|
|
6147
6153
|
};
|
|
6148
6154
|
const initSlots = (instance, children) => {
|
|
6155
|
+
const slots = instance.slots = createInternalObject();
|
|
6149
6156
|
if (instance.vnode.shapeFlag & 32) {
|
|
6150
6157
|
const type = children._;
|
|
6151
6158
|
if (type) {
|
|
6152
|
-
|
|
6153
|
-
def(
|
|
6159
|
+
extend(slots, children);
|
|
6160
|
+
def(slots, "_", type);
|
|
6154
6161
|
} else {
|
|
6155
|
-
normalizeObjectSlots(
|
|
6156
|
-
children,
|
|
6157
|
-
instance.slots = createInternalObject());
|
|
6158
|
-
}
|
|
6159
|
-
} else {
|
|
6160
|
-
instance.slots = createInternalObject();
|
|
6161
|
-
if (children) {
|
|
6162
|
-
normalizeVNodeSlots(instance, children);
|
|
6162
|
+
normalizeObjectSlots(children, slots);
|
|
6163
6163
|
}
|
|
6164
|
+
} else if (children) {
|
|
6165
|
+
normalizeVNodeSlots(instance, children);
|
|
6164
6166
|
}
|
|
6165
6167
|
};
|
|
6166
6168
|
const updateSlots = (instance, children, optimized) => {
|
|
@@ -9138,7 +9140,7 @@ function isMemoSame(cached, memo) {
|
|
|
9138
9140
|
return true;
|
|
9139
9141
|
}
|
|
9140
9142
|
|
|
9141
|
-
const version = "3.4.
|
|
9143
|
+
const version = "3.4.25";
|
|
9142
9144
|
const warn$1 = NOOP;
|
|
9143
9145
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9144
9146
|
const devtools = void 0;
|
|
@@ -9383,8 +9385,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
9383
9385
|
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
9384
9386
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
9385
9387
|
}
|
|
9386
|
-
forceReflow();
|
|
9387
9388
|
addTransitionClass(el, leaveActiveClass);
|
|
9389
|
+
forceReflow();
|
|
9388
9390
|
nextFrame(() => {
|
|
9389
9391
|
if (!el._isLeaving) {
|
|
9390
9392
|
return;
|
|
@@ -10842,7 +10844,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10842
10844
|
setDevtoolsHook: setDevtoolsHook,
|
|
10843
10845
|
setTransitionHooks: setTransitionHooks,
|
|
10844
10846
|
shallowReactive: shallowReactive,
|
|
10845
|
-
shallowReadonly: shallowReadonly,
|
|
10847
|
+
shallowReadonly: shallowReadonly$1,
|
|
10846
10848
|
shallowRef: shallowRef,
|
|
10847
10849
|
ssrContextKey: ssrContextKey,
|
|
10848
10850
|
ssrUtils: ssrUtils,
|
|
@@ -12305,7 +12307,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
12305
12307
|
if (parent.key === node) {
|
|
12306
12308
|
return !!parent.computed;
|
|
12307
12309
|
}
|
|
12308
|
-
return !grandparent
|
|
12310
|
+
return !grandparent ;
|
|
12309
12311
|
case "ClassProperty":
|
|
12310
12312
|
if (parent.key === node) {
|
|
12311
12313
|
return !!parent.computed;
|
|
@@ -12336,9 +12338,6 @@ function isReferenced(node, parent, grandparent) {
|
|
|
12336
12338
|
case "ExportDefaultSpecifier":
|
|
12337
12339
|
return false;
|
|
12338
12340
|
case "ExportSpecifier":
|
|
12339
|
-
if (grandparent == null ? void 0 : grandparent.source) {
|
|
12340
|
-
return false;
|
|
12341
|
-
}
|
|
12342
12341
|
return parent.local === node;
|
|
12343
12342
|
case "ImportDefaultSpecifier":
|
|
12344
12343
|
case "ImportNamespaceSpecifier":
|
|
@@ -13666,6 +13665,7 @@ function createTransformContext(root, {
|
|
|
13666
13665
|
vOnce: 0
|
|
13667
13666
|
},
|
|
13668
13667
|
parent: null,
|
|
13668
|
+
grandParent: null,
|
|
13669
13669
|
currentNode: root,
|
|
13670
13670
|
childIndex: 0,
|
|
13671
13671
|
inVOnce: false,
|
|
@@ -13821,6 +13821,7 @@ function traverseChildren(parent, context) {
|
|
|
13821
13821
|
const child = parent.children[i];
|
|
13822
13822
|
if (isString(child))
|
|
13823
13823
|
continue;
|
|
13824
|
+
context.grandParent = context.parent;
|
|
13824
13825
|
context.parent = parent;
|
|
13825
13826
|
context.childIndex = i;
|
|
13826
13827
|
context.onNodeRemoved = nodeRemoved;
|
|
@@ -14787,9 +14788,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
14787
14788
|
if (!ast) {
|
|
14788
14789
|
const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
|
|
14789
14790
|
try {
|
|
14790
|
-
ast = parser.
|
|
14791
|
+
ast = parser.parseExpression(source, {
|
|
14792
|
+
sourceType: "module",
|
|
14791
14793
|
plugins: context.expressionPlugins
|
|
14792
|
-
})
|
|
14794
|
+
});
|
|
14793
14795
|
} catch (e) {
|
|
14794
14796
|
context.onError(
|
|
14795
14797
|
createCompilerError(
|
|
@@ -15845,6 +15847,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15845
15847
|
if (arg)
|
|
15846
15848
|
mergeArgs.push(arg);
|
|
15847
15849
|
};
|
|
15850
|
+
const pushRefVForMarker = () => {
|
|
15851
|
+
if (context.scopes.vFor > 0) {
|
|
15852
|
+
properties.push(
|
|
15853
|
+
createObjectProperty(
|
|
15854
|
+
createSimpleExpression("ref_for", true),
|
|
15855
|
+
createSimpleExpression("true")
|
|
15856
|
+
)
|
|
15857
|
+
);
|
|
15858
|
+
}
|
|
15859
|
+
};
|
|
15848
15860
|
const analyzePatchFlag = ({ key, value }) => {
|
|
15849
15861
|
if (isStaticExp(key)) {
|
|
15850
15862
|
const name = key.content;
|
|
@@ -15888,14 +15900,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15888
15900
|
let isStatic = true;
|
|
15889
15901
|
if (name === "ref") {
|
|
15890
15902
|
hasRef = true;
|
|
15891
|
-
|
|
15892
|
-
properties.push(
|
|
15893
|
-
createObjectProperty(
|
|
15894
|
-
createSimpleExpression("ref_for", true),
|
|
15895
|
-
createSimpleExpression("true")
|
|
15896
|
-
)
|
|
15897
|
-
);
|
|
15898
|
-
}
|
|
15903
|
+
pushRefVForMarker();
|
|
15899
15904
|
if (value && context.inline) {
|
|
15900
15905
|
const binding = context.bindingMetadata[value.content];
|
|
15901
15906
|
if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
|
|
@@ -15957,18 +15962,14 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15957
15962
|
) {
|
|
15958
15963
|
shouldUseBlock = true;
|
|
15959
15964
|
}
|
|
15960
|
-
if (isVBind && isStaticArgOf(arg, "ref")
|
|
15961
|
-
|
|
15962
|
-
createObjectProperty(
|
|
15963
|
-
createSimpleExpression("ref_for", true),
|
|
15964
|
-
createSimpleExpression("true")
|
|
15965
|
-
)
|
|
15966
|
-
);
|
|
15965
|
+
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
15966
|
+
pushRefVForMarker();
|
|
15967
15967
|
}
|
|
15968
15968
|
if (!arg && (isVBind || isVOn)) {
|
|
15969
15969
|
hasDynamicKeys = true;
|
|
15970
15970
|
if (exp) {
|
|
15971
15971
|
if (isVBind) {
|
|
15972
|
+
pushRefVForMarker();
|
|
15972
15973
|
pushMergeArg();
|
|
15973
15974
|
{
|
|
15974
15975
|
if (isCompatEnabled(
|