@vue/compat 3.4.23 → 3.4.24
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 +48 -53
- package/dist/vue.cjs.prod.js +47 -48
- package/dist/vue.esm-browser.js +46 -50
- package/dist/vue.esm-browser.prod.js +4 -4
- package/dist/vue.esm-bundler.js +46 -50
- package/dist/vue.global.js +44 -47
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +31 -36
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +31 -36
- package/dist/vue.runtime.global.js +29 -33
- 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.24
|
|
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,19 @@ 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 (shapeFlag & 16) {
|
|
4602
|
+
return children[0];
|
|
4603
|
+
}
|
|
4604
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
4605
|
+
return children.default();
|
|
4606
|
+
}
|
|
4605
4607
|
}
|
|
4606
4608
|
function setTransitionHooks(vnode, hooks) {
|
|
4607
4609
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -6619,7 +6621,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6619
6621
|
return vm;
|
|
6620
6622
|
}
|
|
6621
6623
|
}
|
|
6622
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6624
|
+
Vue.version = `2.6.14-compat:${"3.4.24"}`;
|
|
6623
6625
|
Vue.config = singletonApp.config;
|
|
6624
6626
|
Vue.use = (p, ...options) => {
|
|
6625
6627
|
if (p && isFunction(p.install)) {
|
|
@@ -7738,23 +7740,17 @@ const normalizeVNodeSlots = (instance, children) => {
|
|
|
7738
7740
|
instance.slots.default = () => normalized;
|
|
7739
7741
|
};
|
|
7740
7742
|
const initSlots = (instance, children) => {
|
|
7743
|
+
const slots = instance.slots = createInternalObject();
|
|
7741
7744
|
if (instance.vnode.shapeFlag & 32) {
|
|
7742
7745
|
const type = children._;
|
|
7743
7746
|
if (type) {
|
|
7744
|
-
|
|
7745
|
-
def(
|
|
7747
|
+
extend(slots, children);
|
|
7748
|
+
def(slots, "_", type);
|
|
7746
7749
|
} 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);
|
|
7750
|
+
normalizeObjectSlots(children, slots, instance);
|
|
7757
7751
|
}
|
|
7752
|
+
} else if (children) {
|
|
7753
|
+
normalizeVNodeSlots(instance, children);
|
|
7758
7754
|
}
|
|
7759
7755
|
};
|
|
7760
7756
|
const updateSlots = (instance, children, optimized) => {
|
|
@@ -11472,7 +11468,7 @@ function isMemoSame(cached, memo) {
|
|
|
11472
11468
|
return true;
|
|
11473
11469
|
}
|
|
11474
11470
|
|
|
11475
|
-
const version = "3.4.
|
|
11471
|
+
const version = "3.4.24";
|
|
11476
11472
|
const warn = warn$1 ;
|
|
11477
11473
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11478
11474
|
const devtools = devtools$1 ;
|
|
@@ -11717,8 +11713,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
11717
11713
|
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
11718
11714
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
11719
11715
|
}
|
|
11720
|
-
forceReflow();
|
|
11721
11716
|
addTransitionClass(el, leaveActiveClass);
|
|
11717
|
+
forceReflow();
|
|
11722
11718
|
nextFrame(() => {
|
|
11723
11719
|
if (!el._isLeaving) {
|
|
11724
11720
|
return;
|
|
@@ -14823,7 +14819,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
14823
14819
|
if (parent.key === node) {
|
|
14824
14820
|
return !!parent.computed;
|
|
14825
14821
|
}
|
|
14826
|
-
return !grandparent
|
|
14822
|
+
return !grandparent ;
|
|
14827
14823
|
case "ClassProperty":
|
|
14828
14824
|
if (parent.key === node) {
|
|
14829
14825
|
return !!parent.computed;
|
|
@@ -14854,9 +14850,6 @@ function isReferenced(node, parent, grandparent) {
|
|
|
14854
14850
|
case "ExportDefaultSpecifier":
|
|
14855
14851
|
return false;
|
|
14856
14852
|
case "ExportSpecifier":
|
|
14857
|
-
if (grandparent == null ? void 0 : grandparent.source) {
|
|
14858
|
-
return false;
|
|
14859
|
-
}
|
|
14860
14853
|
return parent.local === node;
|
|
14861
14854
|
case "ImportDefaultSpecifier":
|
|
14862
14855
|
case "ImportNamespaceSpecifier":
|
|
@@ -16226,6 +16219,7 @@ function createTransformContext(root, {
|
|
|
16226
16219
|
vOnce: 0
|
|
16227
16220
|
},
|
|
16228
16221
|
parent: null,
|
|
16222
|
+
grandParent: null,
|
|
16229
16223
|
currentNode: root,
|
|
16230
16224
|
childIndex: 0,
|
|
16231
16225
|
inVOnce: false,
|
|
@@ -16400,6 +16394,7 @@ function traverseChildren(parent, context) {
|
|
|
16400
16394
|
const child = parent.children[i];
|
|
16401
16395
|
if (isString(child))
|
|
16402
16396
|
continue;
|
|
16397
|
+
context.grandParent = context.parent;
|
|
16403
16398
|
context.parent = parent;
|
|
16404
16399
|
context.childIndex = i;
|
|
16405
16400
|
context.onNodeRemoved = nodeRemoved;
|
|
@@ -17378,9 +17373,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
17378
17373
|
if (!ast) {
|
|
17379
17374
|
const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
|
|
17380
17375
|
try {
|
|
17381
|
-
ast = parser.
|
|
17376
|
+
ast = parser.parseExpression(source, {
|
|
17377
|
+
sourceType: "module",
|
|
17382
17378
|
plugins: context.expressionPlugins
|
|
17383
|
-
})
|
|
17379
|
+
});
|
|
17384
17380
|
} catch (e) {
|
|
17385
17381
|
context.onError(
|
|
17386
17382
|
createCompilerError(
|
|
@@ -18461,6 +18457,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18461
18457
|
if (arg)
|
|
18462
18458
|
mergeArgs.push(arg);
|
|
18463
18459
|
};
|
|
18460
|
+
const pushRefVForMarker = () => {
|
|
18461
|
+
if (context.scopes.vFor > 0) {
|
|
18462
|
+
properties.push(
|
|
18463
|
+
createObjectProperty(
|
|
18464
|
+
createSimpleExpression("ref_for", true),
|
|
18465
|
+
createSimpleExpression("true")
|
|
18466
|
+
)
|
|
18467
|
+
);
|
|
18468
|
+
}
|
|
18469
|
+
};
|
|
18464
18470
|
const analyzePatchFlag = ({ key, value }) => {
|
|
18465
18471
|
if (isStaticExp(key)) {
|
|
18466
18472
|
const name = key.content;
|
|
@@ -18504,14 +18510,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18504
18510
|
let isStatic = true;
|
|
18505
18511
|
if (name === "ref") {
|
|
18506
18512
|
hasRef = true;
|
|
18507
|
-
|
|
18508
|
-
properties.push(
|
|
18509
|
-
createObjectProperty(
|
|
18510
|
-
createSimpleExpression("ref_for", true),
|
|
18511
|
-
createSimpleExpression("true")
|
|
18512
|
-
)
|
|
18513
|
-
);
|
|
18514
|
-
}
|
|
18513
|
+
pushRefVForMarker();
|
|
18515
18514
|
if (value && context.inline) {
|
|
18516
18515
|
const binding = context.bindingMetadata[value.content];
|
|
18517
18516
|
if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
|
|
@@ -18573,18 +18572,14 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
18573
18572
|
) {
|
|
18574
18573
|
shouldUseBlock = true;
|
|
18575
18574
|
}
|
|
18576
|
-
if (isVBind && isStaticArgOf(arg, "ref")
|
|
18577
|
-
|
|
18578
|
-
createObjectProperty(
|
|
18579
|
-
createSimpleExpression("ref_for", true),
|
|
18580
|
-
createSimpleExpression("true")
|
|
18581
|
-
)
|
|
18582
|
-
);
|
|
18575
|
+
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
18576
|
+
pushRefVForMarker();
|
|
18583
18577
|
}
|
|
18584
18578
|
if (!arg && (isVBind || isVOn)) {
|
|
18585
18579
|
hasDynamicKeys = true;
|
|
18586
18580
|
if (exp) {
|
|
18587
18581
|
if (isVBind) {
|
|
18582
|
+
pushRefVForMarker();
|
|
18588
18583
|
pushMergeArg();
|
|
18589
18584
|
{
|
|
18590
18585
|
{
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.24
|
|
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,16 @@ 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 (shapeFlag & 16) {
|
|
3547
|
+
return children[0];
|
|
3548
|
+
}
|
|
3549
|
+
if (shapeFlag & 32 && isFunction(children.default)) {
|
|
3550
|
+
return children.default();
|
|
3551
|
+
}
|
|
3548
3552
|
}
|
|
3549
3553
|
function setTransitionHooks(vnode, hooks) {
|
|
3550
3554
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
@@ -5275,7 +5279,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5275
5279
|
return vm;
|
|
5276
5280
|
}
|
|
5277
5281
|
}
|
|
5278
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
5282
|
+
Vue.version = `2.6.14-compat:${"3.4.24"}`;
|
|
5279
5283
|
Vue.config = singletonApp.config;
|
|
5280
5284
|
Vue.use = (p, ...options) => {
|
|
5281
5285
|
if (p && isFunction(p.install)) {
|
|
@@ -6146,21 +6150,17 @@ const normalizeVNodeSlots = (instance, children) => {
|
|
|
6146
6150
|
instance.slots.default = () => normalized;
|
|
6147
6151
|
};
|
|
6148
6152
|
const initSlots = (instance, children) => {
|
|
6153
|
+
const slots = instance.slots = createInternalObject();
|
|
6149
6154
|
if (instance.vnode.shapeFlag & 32) {
|
|
6150
6155
|
const type = children._;
|
|
6151
6156
|
if (type) {
|
|
6152
|
-
|
|
6153
|
-
def(
|
|
6157
|
+
extend(slots, children);
|
|
6158
|
+
def(slots, "_", type);
|
|
6154
6159
|
} else {
|
|
6155
|
-
normalizeObjectSlots(
|
|
6156
|
-
children,
|
|
6157
|
-
instance.slots = createInternalObject());
|
|
6158
|
-
}
|
|
6159
|
-
} else {
|
|
6160
|
-
instance.slots = createInternalObject();
|
|
6161
|
-
if (children) {
|
|
6162
|
-
normalizeVNodeSlots(instance, children);
|
|
6160
|
+
normalizeObjectSlots(children, slots);
|
|
6163
6161
|
}
|
|
6162
|
+
} else if (children) {
|
|
6163
|
+
normalizeVNodeSlots(instance, children);
|
|
6164
6164
|
}
|
|
6165
6165
|
};
|
|
6166
6166
|
const updateSlots = (instance, children, optimized) => {
|
|
@@ -9138,7 +9138,7 @@ function isMemoSame(cached, memo) {
|
|
|
9138
9138
|
return true;
|
|
9139
9139
|
}
|
|
9140
9140
|
|
|
9141
|
-
const version = "3.4.
|
|
9141
|
+
const version = "3.4.24";
|
|
9142
9142
|
const warn$1 = NOOP;
|
|
9143
9143
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9144
9144
|
const devtools = void 0;
|
|
@@ -9383,8 +9383,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
9383
9383
|
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
9384
9384
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
9385
9385
|
}
|
|
9386
|
-
forceReflow();
|
|
9387
9386
|
addTransitionClass(el, leaveActiveClass);
|
|
9387
|
+
forceReflow();
|
|
9388
9388
|
nextFrame(() => {
|
|
9389
9389
|
if (!el._isLeaving) {
|
|
9390
9390
|
return;
|
|
@@ -10842,7 +10842,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10842
10842
|
setDevtoolsHook: setDevtoolsHook,
|
|
10843
10843
|
setTransitionHooks: setTransitionHooks,
|
|
10844
10844
|
shallowReactive: shallowReactive,
|
|
10845
|
-
shallowReadonly: shallowReadonly,
|
|
10845
|
+
shallowReadonly: shallowReadonly$1,
|
|
10846
10846
|
shallowRef: shallowRef,
|
|
10847
10847
|
ssrContextKey: ssrContextKey,
|
|
10848
10848
|
ssrUtils: ssrUtils,
|
|
@@ -12305,7 +12305,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
12305
12305
|
if (parent.key === node) {
|
|
12306
12306
|
return !!parent.computed;
|
|
12307
12307
|
}
|
|
12308
|
-
return !grandparent
|
|
12308
|
+
return !grandparent ;
|
|
12309
12309
|
case "ClassProperty":
|
|
12310
12310
|
if (parent.key === node) {
|
|
12311
12311
|
return !!parent.computed;
|
|
@@ -12336,9 +12336,6 @@ function isReferenced(node, parent, grandparent) {
|
|
|
12336
12336
|
case "ExportDefaultSpecifier":
|
|
12337
12337
|
return false;
|
|
12338
12338
|
case "ExportSpecifier":
|
|
12339
|
-
if (grandparent == null ? void 0 : grandparent.source) {
|
|
12340
|
-
return false;
|
|
12341
|
-
}
|
|
12342
12339
|
return parent.local === node;
|
|
12343
12340
|
case "ImportDefaultSpecifier":
|
|
12344
12341
|
case "ImportNamespaceSpecifier":
|
|
@@ -13666,6 +13663,7 @@ function createTransformContext(root, {
|
|
|
13666
13663
|
vOnce: 0
|
|
13667
13664
|
},
|
|
13668
13665
|
parent: null,
|
|
13666
|
+
grandParent: null,
|
|
13669
13667
|
currentNode: root,
|
|
13670
13668
|
childIndex: 0,
|
|
13671
13669
|
inVOnce: false,
|
|
@@ -13821,6 +13819,7 @@ function traverseChildren(parent, context) {
|
|
|
13821
13819
|
const child = parent.children[i];
|
|
13822
13820
|
if (isString(child))
|
|
13823
13821
|
continue;
|
|
13822
|
+
context.grandParent = context.parent;
|
|
13824
13823
|
context.parent = parent;
|
|
13825
13824
|
context.childIndex = i;
|
|
13826
13825
|
context.onNodeRemoved = nodeRemoved;
|
|
@@ -14787,9 +14786,10 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
14787
14786
|
if (!ast) {
|
|
14788
14787
|
const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
|
|
14789
14788
|
try {
|
|
14790
|
-
ast = parser.
|
|
14789
|
+
ast = parser.parseExpression(source, {
|
|
14790
|
+
sourceType: "module",
|
|
14791
14791
|
plugins: context.expressionPlugins
|
|
14792
|
-
})
|
|
14792
|
+
});
|
|
14793
14793
|
} catch (e) {
|
|
14794
14794
|
context.onError(
|
|
14795
14795
|
createCompilerError(
|
|
@@ -15845,6 +15845,16 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15845
15845
|
if (arg)
|
|
15846
15846
|
mergeArgs.push(arg);
|
|
15847
15847
|
};
|
|
15848
|
+
const pushRefVForMarker = () => {
|
|
15849
|
+
if (context.scopes.vFor > 0) {
|
|
15850
|
+
properties.push(
|
|
15851
|
+
createObjectProperty(
|
|
15852
|
+
createSimpleExpression("ref_for", true),
|
|
15853
|
+
createSimpleExpression("true")
|
|
15854
|
+
)
|
|
15855
|
+
);
|
|
15856
|
+
}
|
|
15857
|
+
};
|
|
15848
15858
|
const analyzePatchFlag = ({ key, value }) => {
|
|
15849
15859
|
if (isStaticExp(key)) {
|
|
15850
15860
|
const name = key.content;
|
|
@@ -15888,14 +15898,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15888
15898
|
let isStatic = true;
|
|
15889
15899
|
if (name === "ref") {
|
|
15890
15900
|
hasRef = true;
|
|
15891
|
-
|
|
15892
|
-
properties.push(
|
|
15893
|
-
createObjectProperty(
|
|
15894
|
-
createSimpleExpression("ref_for", true),
|
|
15895
|
-
createSimpleExpression("true")
|
|
15896
|
-
)
|
|
15897
|
-
);
|
|
15898
|
-
}
|
|
15901
|
+
pushRefVForMarker();
|
|
15899
15902
|
if (value && context.inline) {
|
|
15900
15903
|
const binding = context.bindingMetadata[value.content];
|
|
15901
15904
|
if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
|
|
@@ -15957,18 +15960,14 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15957
15960
|
) {
|
|
15958
15961
|
shouldUseBlock = true;
|
|
15959
15962
|
}
|
|
15960
|
-
if (isVBind && isStaticArgOf(arg, "ref")
|
|
15961
|
-
|
|
15962
|
-
createObjectProperty(
|
|
15963
|
-
createSimpleExpression("ref_for", true),
|
|
15964
|
-
createSimpleExpression("true")
|
|
15965
|
-
)
|
|
15966
|
-
);
|
|
15963
|
+
if (isVBind && isStaticArgOf(arg, "ref")) {
|
|
15964
|
+
pushRefVForMarker();
|
|
15967
15965
|
}
|
|
15968
15966
|
if (!arg && (isVBind || isVOn)) {
|
|
15969
15967
|
hasDynamicKeys = true;
|
|
15970
15968
|
if (exp) {
|
|
15971
15969
|
if (isVBind) {
|
|
15970
|
+
pushRefVForMarker();
|
|
15972
15971
|
pushMergeArg();
|
|
15973
15972
|
{
|
|
15974
15973
|
if (isCompatEnabled(
|