@vue/compat 3.3.0-alpha.2 → 3.3.0-alpha.4
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 +69 -69
- package/dist/vue.cjs.prod.js +63 -63
- package/dist/vue.esm-browser.js +59 -59
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +59 -59
- package/dist/vue.global.js +59 -59
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +2 -2
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +2 -2
- package/dist/vue.runtime.global.js +2 -2
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -6646,7 +6646,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6646
6646
|
return vm;
|
|
6647
6647
|
}
|
|
6648
6648
|
}
|
|
6649
|
-
Vue.version = `2.6.14-compat:${"3.3.0-alpha.
|
|
6649
|
+
Vue.version = `2.6.14-compat:${"3.3.0-alpha.4"}`;
|
|
6650
6650
|
Vue.config = singletonApp.config;
|
|
6651
6651
|
Vue.use = (p, ...options) => {
|
|
6652
6652
|
if (p && isFunction(p.install)) {
|
|
@@ -10632,7 +10632,7 @@ Component that was made reactive: `,
|
|
|
10632
10632
|
return true;
|
|
10633
10633
|
}
|
|
10634
10634
|
|
|
10635
|
-
const version = "3.3.0-alpha.
|
|
10635
|
+
const version = "3.3.0-alpha.4";
|
|
10636
10636
|
const ssrUtils = null;
|
|
10637
10637
|
const resolveFilter = resolveFilter$1 ;
|
|
10638
10638
|
const _compatUtils = {
|
|
@@ -12863,16 +12863,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12863
12863
|
);
|
|
12864
12864
|
}
|
|
12865
12865
|
function isText$1(node) {
|
|
12866
|
-
return node.type === 5 || node.type ===
|
|
12866
|
+
return node.type === 5 || node.type === 2;
|
|
12867
12867
|
}
|
|
12868
12868
|
function isVSlot(p) {
|
|
12869
12869
|
return p.type === 7 && p.name === "slot";
|
|
12870
12870
|
}
|
|
12871
12871
|
function isTemplateNode(node) {
|
|
12872
|
-
return node.type ===
|
|
12872
|
+
return node.type === 1 && node.tagType === 3;
|
|
12873
12873
|
}
|
|
12874
12874
|
function isSlotOutlet(node) {
|
|
12875
|
-
return node.type ===
|
|
12875
|
+
return node.type === 1 && node.tagType === 2;
|
|
12876
12876
|
}
|
|
12877
12877
|
function getVNodeHelper(ssr, isComponent) {
|
|
12878
12878
|
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
@@ -13191,12 +13191,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13191
13191
|
const shouldCondense = context.options.whitespace !== "preserve";
|
|
13192
13192
|
for (let i = 0; i < nodes.length; i++) {
|
|
13193
13193
|
const node = nodes[i];
|
|
13194
|
-
if (node.type ===
|
|
13194
|
+
if (node.type === 2) {
|
|
13195
13195
|
if (!context.inPre) {
|
|
13196
13196
|
if (!/[^\t\r\n\f ]/.test(node.content)) {
|
|
13197
13197
|
const prev = nodes[i - 1];
|
|
13198
13198
|
const next = nodes[i + 1];
|
|
13199
|
-
if (!prev || !next || shouldCondense && (prev.type ===
|
|
13199
|
+
if (!prev || !next || shouldCondense && (prev.type === 3 && next.type === 3 || prev.type === 3 && next.type === 1 || prev.type === 1 && next.type === 3 || prev.type === 1 && next.type === 1 && /[\r\n]/.test(node.content))) {
|
|
13200
13200
|
removedWhitespace = true;
|
|
13201
13201
|
nodes[i] = null;
|
|
13202
13202
|
} else {
|
|
@@ -13208,14 +13208,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13208
13208
|
} else {
|
|
13209
13209
|
node.content = node.content.replace(/\r\n/g, "\n");
|
|
13210
13210
|
}
|
|
13211
|
-
} else if (node.type ===
|
|
13211
|
+
} else if (node.type === 3 && !context.options.comments) {
|
|
13212
13212
|
removedWhitespace = true;
|
|
13213
13213
|
nodes[i] = null;
|
|
13214
13214
|
}
|
|
13215
13215
|
}
|
|
13216
13216
|
if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
|
|
13217
13217
|
const first = nodes[0];
|
|
13218
|
-
if (first && first.type ===
|
|
13218
|
+
if (first && first.type === 2) {
|
|
13219
13219
|
first.content = first.content.replace(/^\r?\n/, "");
|
|
13220
13220
|
}
|
|
13221
13221
|
}
|
|
@@ -13223,9 +13223,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13223
13223
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
13224
13224
|
}
|
|
13225
13225
|
function pushNode(nodes, node) {
|
|
13226
|
-
if (node.type ===
|
|
13226
|
+
if (node.type === 2) {
|
|
13227
13227
|
const prev = last(nodes);
|
|
13228
|
-
if (prev && prev.type ===
|
|
13228
|
+
if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
|
|
13229
13229
|
prev.content += node.content;
|
|
13230
13230
|
prev.loc.end = node.loc.end;
|
|
13231
13231
|
prev.loc.source += node.loc.source;
|
|
@@ -13272,7 +13272,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13272
13272
|
advanceBy(context, match.index + match[0].length - prevIndex + 1);
|
|
13273
13273
|
}
|
|
13274
13274
|
return {
|
|
13275
|
-
type:
|
|
13275
|
+
type: 3,
|
|
13276
13276
|
content,
|
|
13277
13277
|
loc: getSelection(context, start)
|
|
13278
13278
|
};
|
|
@@ -13290,7 +13290,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13290
13290
|
advanceBy(context, closeIndex + 1);
|
|
13291
13291
|
}
|
|
13292
13292
|
return {
|
|
13293
|
-
type:
|
|
13293
|
+
type: 3,
|
|
13294
13294
|
content,
|
|
13295
13295
|
loc: getSelection(context, start)
|
|
13296
13296
|
};
|
|
@@ -13326,7 +13326,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13326
13326
|
)) {
|
|
13327
13327
|
const loc = getSelection(context, element.loc.end);
|
|
13328
13328
|
inlineTemplateProp.value = {
|
|
13329
|
-
type:
|
|
13329
|
+
type: 2,
|
|
13330
13330
|
content: loc.source,
|
|
13331
13331
|
loc
|
|
13332
13332
|
};
|
|
@@ -13433,7 +13433,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13433
13433
|
}
|
|
13434
13434
|
}
|
|
13435
13435
|
return {
|
|
13436
|
-
type:
|
|
13436
|
+
type: 1,
|
|
13437
13437
|
ns,
|
|
13438
13438
|
tag,
|
|
13439
13439
|
tagType,
|
|
@@ -13639,7 +13639,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13639
13639
|
type: 6,
|
|
13640
13640
|
name,
|
|
13641
13641
|
value: value && {
|
|
13642
|
-
type:
|
|
13642
|
+
type: 2,
|
|
13643
13643
|
content: value.content,
|
|
13644
13644
|
loc: value.loc
|
|
13645
13645
|
},
|
|
@@ -13729,7 +13729,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13729
13729
|
const start = getCursor(context);
|
|
13730
13730
|
const content = parseTextData(context, endIndex, mode);
|
|
13731
13731
|
return {
|
|
13732
|
-
type:
|
|
13732
|
+
type: 2,
|
|
13733
13733
|
content,
|
|
13734
13734
|
loc: getSelection(context, start)
|
|
13735
13735
|
};
|
|
@@ -13838,7 +13838,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13838
13838
|
}
|
|
13839
13839
|
function isSingleElementRoot(root, child) {
|
|
13840
13840
|
const { children } = root;
|
|
13841
|
-
return children.length === 1 && child.type ===
|
|
13841
|
+
return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
|
|
13842
13842
|
}
|
|
13843
13843
|
function walk(node, context, doNotHoistNode = false) {
|
|
13844
13844
|
const { children } = node;
|
|
@@ -13846,7 +13846,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13846
13846
|
let hoistedCount = 0;
|
|
13847
13847
|
for (let i = 0; i < children.length; i++) {
|
|
13848
13848
|
const child = children[i];
|
|
13849
|
-
if (child.type ===
|
|
13849
|
+
if (child.type === 1 && child.tagType === 0) {
|
|
13850
13850
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
13851
13851
|
if (constantType > 0) {
|
|
13852
13852
|
if (constantType >= 2) {
|
|
@@ -13871,7 +13871,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13871
13871
|
}
|
|
13872
13872
|
}
|
|
13873
13873
|
}
|
|
13874
|
-
if (child.type ===
|
|
13874
|
+
if (child.type === 1) {
|
|
13875
13875
|
const isComponent = child.tagType === 1;
|
|
13876
13876
|
if (isComponent) {
|
|
13877
13877
|
context.scopes.vSlot++;
|
|
@@ -13895,7 +13895,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13895
13895
|
if (hoistedCount && context.transformHoist) {
|
|
13896
13896
|
context.transformHoist(children, context, node);
|
|
13897
13897
|
}
|
|
13898
|
-
if (hoistedCount && hoistedCount === originalCount && node.type ===
|
|
13898
|
+
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
13899
13899
|
node.codegenNode.children = context.hoist(
|
|
13900
13900
|
createArrayExpression(node.codegenNode.children)
|
|
13901
13901
|
);
|
|
@@ -13904,7 +13904,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13904
13904
|
function getConstantType(node, context) {
|
|
13905
13905
|
const { constantCache } = context;
|
|
13906
13906
|
switch (node.type) {
|
|
13907
|
-
case
|
|
13907
|
+
case 1:
|
|
13908
13908
|
if (node.tagType !== 0) {
|
|
13909
13909
|
return 0;
|
|
13910
13910
|
}
|
|
@@ -13976,8 +13976,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13976
13976
|
constantCache.set(node, 0);
|
|
13977
13977
|
return 0;
|
|
13978
13978
|
}
|
|
13979
|
-
case
|
|
13980
|
-
case
|
|
13979
|
+
case 2:
|
|
13980
|
+
case 3:
|
|
13981
13981
|
return 3;
|
|
13982
13982
|
case 9:
|
|
13983
13983
|
case 11:
|
|
@@ -14251,7 +14251,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14251
14251
|
} else if (children.length > 1) {
|
|
14252
14252
|
let patchFlag = 64;
|
|
14253
14253
|
let patchFlagText = PatchFlagNames[64];
|
|
14254
|
-
if (children.filter((c) => c.type !==
|
|
14254
|
+
if (children.filter((c) => c.type !== 3).length === 1) {
|
|
14255
14255
|
patchFlag |= 2048;
|
|
14256
14256
|
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
14257
14257
|
}
|
|
@@ -14305,7 +14305,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14305
14305
|
}
|
|
14306
14306
|
}
|
|
14307
14307
|
switch (node.type) {
|
|
14308
|
-
case
|
|
14308
|
+
case 3:
|
|
14309
14309
|
if (!context.ssr) {
|
|
14310
14310
|
context.helper(CREATE_COMMENT);
|
|
14311
14311
|
}
|
|
@@ -14322,7 +14322,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14322
14322
|
break;
|
|
14323
14323
|
case 10:
|
|
14324
14324
|
case 11:
|
|
14325
|
-
case
|
|
14325
|
+
case 1:
|
|
14326
14326
|
case 0:
|
|
14327
14327
|
traverseChildren(node, context);
|
|
14328
14328
|
break;
|
|
@@ -14336,7 +14336,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14336
14336
|
function createStructuralDirectiveTransform(name, fn) {
|
|
14337
14337
|
const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
|
|
14338
14338
|
return (node, context) => {
|
|
14339
|
-
if (node.type ===
|
|
14339
|
+
if (node.type === 1) {
|
|
14340
14340
|
const { props } = node;
|
|
14341
14341
|
if (node.tagType === 3 && props.some(isVSlot)) {
|
|
14342
14342
|
return;
|
|
@@ -14579,7 +14579,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14579
14579
|
context.pure = false;
|
|
14580
14580
|
}
|
|
14581
14581
|
function isText(n) {
|
|
14582
|
-
return isString(n) || n.type === 4 || n.type ===
|
|
14582
|
+
return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
|
|
14583
14583
|
}
|
|
14584
14584
|
function genNodeListAsArray(nodes, context) {
|
|
14585
14585
|
const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n));
|
|
@@ -14620,7 +14620,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14620
14620
|
return;
|
|
14621
14621
|
}
|
|
14622
14622
|
switch (node.type) {
|
|
14623
|
-
case
|
|
14623
|
+
case 1:
|
|
14624
14624
|
case 9:
|
|
14625
14625
|
case 11:
|
|
14626
14626
|
assert(
|
|
@@ -14629,7 +14629,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14629
14629
|
);
|
|
14630
14630
|
genNode(node.codegenNode, context);
|
|
14631
14631
|
break;
|
|
14632
|
-
case
|
|
14632
|
+
case 2:
|
|
14633
14633
|
genText(node, context);
|
|
14634
14634
|
break;
|
|
14635
14635
|
case 4:
|
|
@@ -14644,7 +14644,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14644
14644
|
case 8:
|
|
14645
14645
|
genCompoundExpression(node, context);
|
|
14646
14646
|
break;
|
|
14647
|
-
case
|
|
14647
|
+
case 3:
|
|
14648
14648
|
genComment(node, context);
|
|
14649
14649
|
break;
|
|
14650
14650
|
case 13:
|
|
@@ -14950,7 +14950,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14950
14950
|
node.content,
|
|
14951
14951
|
context
|
|
14952
14952
|
);
|
|
14953
|
-
} else if (node.type ===
|
|
14953
|
+
} else if (node.type === 1) {
|
|
14954
14954
|
for (let i = 0; i < node.props.length; i++) {
|
|
14955
14955
|
const dir = node.props[i];
|
|
14956
14956
|
if (dir.type === 7 && dir.name !== "for") {
|
|
@@ -15040,12 +15040,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15040
15040
|
let i = siblings.indexOf(node);
|
|
15041
15041
|
while (i-- >= -1) {
|
|
15042
15042
|
const sibling = siblings[i];
|
|
15043
|
-
if (sibling && sibling.type ===
|
|
15043
|
+
if (sibling && sibling.type === 3) {
|
|
15044
15044
|
context.removeNode(sibling);
|
|
15045
15045
|
comments.unshift(sibling);
|
|
15046
15046
|
continue;
|
|
15047
15047
|
}
|
|
15048
|
-
if (sibling && sibling.type ===
|
|
15048
|
+
if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
|
|
15049
15049
|
context.removeNode(sibling);
|
|
15050
15050
|
continue;
|
|
15051
15051
|
}
|
|
@@ -15058,7 +15058,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15058
15058
|
context.removeNode();
|
|
15059
15059
|
const branch = createIfBranch(node, dir);
|
|
15060
15060
|
if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
|
|
15061
|
-
!(context.parent && context.parent.type ===
|
|
15061
|
+
!(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
|
|
15062
15062
|
branch.children = [...comments, ...branch.children];
|
|
15063
15063
|
}
|
|
15064
15064
|
{
|
|
@@ -15131,7 +15131,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15131
15131
|
);
|
|
15132
15132
|
const { children } = branch;
|
|
15133
15133
|
const firstChild = children[0];
|
|
15134
|
-
const needFragmentWrapper = children.length !== 1 || firstChild.type !==
|
|
15134
|
+
const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
|
|
15135
15135
|
if (needFragmentWrapper) {
|
|
15136
15136
|
if (children.length === 1 && firstChild.type === 11) {
|
|
15137
15137
|
const vnodeCall = firstChild.codegenNode;
|
|
@@ -15140,7 +15140,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15140
15140
|
} else {
|
|
15141
15141
|
let patchFlag = 64;
|
|
15142
15142
|
let patchFlagText = PatchFlagNames[64];
|
|
15143
|
-
if (!branch.isTemplateIf && children.filter((c) => c.type !==
|
|
15143
|
+
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
|
|
15144
15144
|
patchFlag |= 2048;
|
|
15145
15145
|
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
15146
15146
|
}
|
|
@@ -15235,7 +15235,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15235
15235
|
const { children } = forNode;
|
|
15236
15236
|
if (isTemplate) {
|
|
15237
15237
|
node.children.some((c) => {
|
|
15238
|
-
if (c.type ===
|
|
15238
|
+
if (c.type === 1) {
|
|
15239
15239
|
const key = findProp(c, "key");
|
|
15240
15240
|
if (key) {
|
|
15241
15241
|
context.onError(
|
|
@@ -15249,7 +15249,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15249
15249
|
}
|
|
15250
15250
|
});
|
|
15251
15251
|
}
|
|
15252
|
-
const needFragmentWrapper = children.length !== 1 || children[0].type !==
|
|
15252
|
+
const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
|
|
15253
15253
|
const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
|
|
15254
15254
|
if (slotOutlet) {
|
|
15255
15255
|
childBlock = slotOutlet.codegenNode;
|
|
@@ -15468,7 +15468,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15468
15468
|
|
|
15469
15469
|
const defaultFallback = createSimpleExpression(`undefined`, false);
|
|
15470
15470
|
const trackSlotScopes = (node, context) => {
|
|
15471
|
-
if (node.type ===
|
|
15471
|
+
if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
|
|
15472
15472
|
const vSlot = findDir(node, "slot");
|
|
15473
15473
|
if (vSlot) {
|
|
15474
15474
|
vSlot.exp;
|
|
@@ -15514,7 +15514,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15514
15514
|
const slotElement = children[i];
|
|
15515
15515
|
let slotDir;
|
|
15516
15516
|
if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
|
|
15517
|
-
if (slotElement.type !==
|
|
15517
|
+
if (slotElement.type !== 3) {
|
|
15518
15518
|
implicitDefaultChildren.push(slotElement);
|
|
15519
15519
|
}
|
|
15520
15520
|
continue;
|
|
@@ -15561,7 +15561,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15561
15561
|
let prev;
|
|
15562
15562
|
while (j--) {
|
|
15563
15563
|
prev = children[j];
|
|
15564
|
-
if (prev.type !==
|
|
15564
|
+
if (prev.type !== 3) {
|
|
15565
15565
|
break;
|
|
15566
15566
|
}
|
|
15567
15567
|
}
|
|
@@ -15695,7 +15695,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15695
15695
|
for (let i = 0; i < children.length; i++) {
|
|
15696
15696
|
const child = children[i];
|
|
15697
15697
|
switch (child.type) {
|
|
15698
|
-
case
|
|
15698
|
+
case 1:
|
|
15699
15699
|
if (child.tagType === 2 || hasForwardedSlots(child.children)) {
|
|
15700
15700
|
return true;
|
|
15701
15701
|
}
|
|
@@ -15714,16 +15714,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15714
15714
|
return false;
|
|
15715
15715
|
}
|
|
15716
15716
|
function isNonWhitespaceContent(node) {
|
|
15717
|
-
if (node.type !==
|
|
15717
|
+
if (node.type !== 2 && node.type !== 12)
|
|
15718
15718
|
return true;
|
|
15719
|
-
return node.type ===
|
|
15719
|
+
return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
|
|
15720
15720
|
}
|
|
15721
15721
|
|
|
15722
15722
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
15723
15723
|
const transformElement = (node, context) => {
|
|
15724
15724
|
return function postTransformElement() {
|
|
15725
15725
|
node = context.currentNode;
|
|
15726
|
-
if (!(node.type ===
|
|
15726
|
+
if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
|
|
15727
15727
|
return;
|
|
15728
15728
|
}
|
|
15729
15729
|
const { tag, props } = node;
|
|
@@ -15794,7 +15794,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15794
15794
|
if (hasDynamicTextChild && getConstantType(child, context) === 0) {
|
|
15795
15795
|
patchFlag |= 1;
|
|
15796
15796
|
}
|
|
15797
|
-
if (hasDynamicTextChild || type ===
|
|
15797
|
+
if (hasDynamicTextChild || type === 2) {
|
|
15798
15798
|
vnodeChildren = child;
|
|
15799
15799
|
} else {
|
|
15800
15800
|
vnodeChildren = node.children;
|
|
@@ -16478,7 +16478,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16478
16478
|
};
|
|
16479
16479
|
|
|
16480
16480
|
const transformText = (node, context) => {
|
|
16481
|
-
if (node.type === 0 || node.type ===
|
|
16481
|
+
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
16482
16482
|
return () => {
|
|
16483
16483
|
const children = node.children;
|
|
16484
16484
|
let currentContainer = void 0;
|
|
@@ -16510,7 +16510,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16510
16510
|
// as-is since the runtime has dedicated fast path for this by directly
|
|
16511
16511
|
// setting textContent of the element.
|
|
16512
16512
|
// for component root it's always normalized anyway.
|
|
16513
|
-
children.length === 1 && (node.type === 0 || node.type ===
|
|
16513
|
+
children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
|
|
16514
16514
|
// custom directives can potentially add DOM elements arbitrarily,
|
|
16515
16515
|
// we need to avoid setting textContent of the element at runtime
|
|
16516
16516
|
// to avoid accidentally overwriting the DOM elements added
|
|
@@ -16527,7 +16527,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16527
16527
|
const child = children[i];
|
|
16528
16528
|
if (isText$1(child) || child.type === 8) {
|
|
16529
16529
|
const callArgs = [];
|
|
16530
|
-
if (child.type !==
|
|
16530
|
+
if (child.type !== 2 || child.content !== " ") {
|
|
16531
16531
|
callArgs.push(child);
|
|
16532
16532
|
}
|
|
16533
16533
|
if (!context.ssr && getConstantType(child, context) === 0) {
|
|
@@ -16552,7 +16552,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16552
16552
|
|
|
16553
16553
|
const seen$1 = /* @__PURE__ */ new WeakSet();
|
|
16554
16554
|
const transformOnce = (node, context) => {
|
|
16555
|
-
if (node.type ===
|
|
16555
|
+
if (node.type === 1 && findDir(node, "once", true)) {
|
|
16556
16556
|
if (seen$1.has(node) || context.inVOnce) {
|
|
16557
16557
|
return;
|
|
16558
16558
|
}
|
|
@@ -16641,7 +16641,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16641
16641
|
if (node.type === 5) {
|
|
16642
16642
|
rewriteFilter(node.content, context);
|
|
16643
16643
|
}
|
|
16644
|
-
if (node.type ===
|
|
16644
|
+
if (node.type === 1) {
|
|
16645
16645
|
node.props.forEach((prop) => {
|
|
16646
16646
|
if (prop.type === 7 && prop.name !== "for" && prop.exp) {
|
|
16647
16647
|
rewriteFilter(prop.exp, context);
|
|
@@ -16782,7 +16782,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16782
16782
|
|
|
16783
16783
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
16784
16784
|
const transformMemo = (node, context) => {
|
|
16785
|
-
if (node.type ===
|
|
16785
|
+
if (node.type === 1) {
|
|
16786
16786
|
const dir = findDir(node, "memo");
|
|
16787
16787
|
if (!dir || seen.has(node)) {
|
|
16788
16788
|
return;
|
|
@@ -16971,7 +16971,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16971
16971
|
};
|
|
16972
16972
|
|
|
16973
16973
|
const transformStyle = (node) => {
|
|
16974
|
-
if (node.type ===
|
|
16974
|
+
if (node.type === 1) {
|
|
16975
16975
|
node.props.forEach((p, i) => {
|
|
16976
16976
|
if (p.type === 6 && p.name === "style" && p.value) {
|
|
16977
16977
|
node.props[i] = {
|
|
@@ -17261,7 +17261,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17261
17261
|
};
|
|
17262
17262
|
|
|
17263
17263
|
const transformTransition = (node, context) => {
|
|
17264
|
-
if (node.type ===
|
|
17264
|
+
if (node.type === 1 && node.tagType === 1) {
|
|
17265
17265
|
const component = context.isBuiltInComponent(node.tag);
|
|
17266
17266
|
if (component === TRANSITION) {
|
|
17267
17267
|
return () => {
|
|
@@ -17281,7 +17281,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17281
17281
|
);
|
|
17282
17282
|
}
|
|
17283
17283
|
const child = node.children[0];
|
|
17284
|
-
if (child.type ===
|
|
17284
|
+
if (child.type === 1) {
|
|
17285
17285
|
for (const p of child.props) {
|
|
17286
17286
|
if (p.type === 7 && p.name === "show") {
|
|
17287
17287
|
node.props.push({
|
|
@@ -17299,14 +17299,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17299
17299
|
};
|
|
17300
17300
|
function hasMultipleChildren(node) {
|
|
17301
17301
|
const children = node.children = node.children.filter(
|
|
17302
|
-
(c) => c.type !==
|
|
17302
|
+
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
17303
17303
|
);
|
|
17304
17304
|
const child = children[0];
|
|
17305
17305
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
17306
17306
|
}
|
|
17307
17307
|
|
|
17308
17308
|
const ignoreSideEffectTags = (node, context) => {
|
|
17309
|
-
if (node.type ===
|
|
17309
|
+
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
17310
17310
|
context.onError(
|
|
17311
17311
|
createDOMCompilerError(61, node.loc)
|
|
17312
17312
|
);
|