@vue/compiler-ssr 3.5.12 → 3.5.14
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/compiler-ssr.cjs.js +34 -24
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-ssr v3.5.
|
|
2
|
+
* @vue/compiler-ssr v3.5.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -363,24 +363,27 @@ const ssrTransformElement = (node, context) => {
|
|
|
363
363
|
];
|
|
364
364
|
}
|
|
365
365
|
} else if (directives.length && !node.children.length) {
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
compilerDom.
|
|
378
|
-
compilerDom.createSimpleExpression(
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
366
|
+
const vText = compilerDom.findDir(node, "text");
|
|
367
|
+
if (!vText) {
|
|
368
|
+
const tempId = `_temp${context.temps++}`;
|
|
369
|
+
propsExp.arguments = [
|
|
370
|
+
compilerDom.createAssignmentExpression(
|
|
371
|
+
compilerDom.createSimpleExpression(tempId, false),
|
|
372
|
+
mergedProps
|
|
373
|
+
)
|
|
374
|
+
];
|
|
375
|
+
rawChildrenMap.set(
|
|
376
|
+
node,
|
|
377
|
+
compilerDom.createConditionalExpression(
|
|
378
|
+
compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false),
|
|
379
|
+
compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [
|
|
380
|
+
compilerDom.createSimpleExpression(`${tempId}.textContent`, false)
|
|
381
|
+
]),
|
|
382
|
+
compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false),
|
|
383
|
+
false
|
|
384
|
+
)
|
|
385
|
+
);
|
|
386
|
+
}
|
|
384
387
|
}
|
|
385
388
|
if (needTagForRuntime) {
|
|
386
389
|
propsExp.arguments.push(`"${node.tag}"`);
|
|
@@ -1196,11 +1199,18 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
1196
1199
|
checkDuplicatedValue();
|
|
1197
1200
|
node.children = [compilerDom.createInterpolation(model, model.loc)];
|
|
1198
1201
|
} else if (node.tag === "select") {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1202
|
+
const processChildren = (children) => {
|
|
1203
|
+
children.forEach((child) => {
|
|
1204
|
+
if (child.type === 1) {
|
|
1205
|
+
processOption(child);
|
|
1206
|
+
} else if (child.type === 11) {
|
|
1207
|
+
processChildren(child.children);
|
|
1208
|
+
} else if (child.type === 9) {
|
|
1209
|
+
child.branches.forEach((b) => processChildren(b.children));
|
|
1210
|
+
}
|
|
1211
|
+
});
|
|
1212
|
+
};
|
|
1213
|
+
processChildren(node.children);
|
|
1204
1214
|
} else {
|
|
1205
1215
|
context.onError(
|
|
1206
1216
|
compilerDom.createDOMCompilerError(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.14",
|
|
4
4
|
"description": "@vue/compiler-ssr",
|
|
5
5
|
"main": "dist/compiler-ssr.cjs.js",
|
|
6
6
|
"types": "dist/compiler-ssr.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vue/shared": "3.5.
|
|
32
|
-
"@vue/compiler-dom": "3.5.
|
|
31
|
+
"@vue/shared": "3.5.14",
|
|
32
|
+
"@vue/compiler-dom": "3.5.14"
|
|
33
33
|
}
|
|
34
34
|
}
|