@vue/compiler-ssr 3.5.11 → 3.5.13

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-ssr v3.5.11
2
+ * @vue/compiler-ssr v3.5.13
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 tempId = `_temp${context.temps++}`;
367
- propsExp.arguments = [
368
- compilerDom.createAssignmentExpression(
369
- compilerDom.createSimpleExpression(tempId, false),
370
- mergedProps
371
- )
372
- ];
373
- rawChildrenMap.set(
374
- node,
375
- compilerDom.createConditionalExpression(
376
- compilerDom.createSimpleExpression(`"textContent" in ${tempId}`, false),
377
- compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [
378
- compilerDom.createSimpleExpression(`${tempId}.textContent`, false)
379
- ]),
380
- compilerDom.createSimpleExpression(`${tempId}.innerHTML ?? ''`, false),
381
- false
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
- node.children.forEach((child) => {
1200
- if (child.type === 1) {
1201
- processOption(child);
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.11",
3
+ "version": "3.5.13",
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/compiler-dom": "3.5.11",
32
- "@vue/shared": "3.5.11"
31
+ "@vue/shared": "3.5.13",
32
+ "@vue/compiler-dom": "3.5.13"
33
33
  }
34
34
  }