@vue/compiler-ssr 3.3.3 → 3.3.5
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 +31 -1
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -1084,7 +1084,37 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
1084
1084
|
} else if (node.tag === "textarea") {
|
|
1085
1085
|
checkDuplicatedValue();
|
|
1086
1086
|
node.children = [compilerDom.createInterpolation(model, model.loc)];
|
|
1087
|
-
} else if (node.tag === "select")
|
|
1087
|
+
} else if (node.tag === "select") {
|
|
1088
|
+
node.children.forEach((option) => {
|
|
1089
|
+
if (option.type === 1) {
|
|
1090
|
+
const plainNode = option;
|
|
1091
|
+
if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
|
|
1092
|
+
const value = findValueBinding(plainNode);
|
|
1093
|
+
plainNode.ssrCodegenNode.elements.push(
|
|
1094
|
+
compilerDom.createConditionalExpression(
|
|
1095
|
+
compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
|
|
1096
|
+
compilerDom.createConditionalExpression(
|
|
1097
|
+
compilerDom.createCallExpression(`Array.isArray`, [model]),
|
|
1098
|
+
compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
|
|
1099
|
+
model,
|
|
1100
|
+
value
|
|
1101
|
+
]),
|
|
1102
|
+
compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
|
|
1103
|
+
model,
|
|
1104
|
+
value
|
|
1105
|
+
])
|
|
1106
|
+
)
|
|
1107
|
+
]),
|
|
1108
|
+
compilerDom.createSimpleExpression(" selected", true),
|
|
1109
|
+
compilerDom.createSimpleExpression("", true),
|
|
1110
|
+
false
|
|
1111
|
+
/* no newline */
|
|
1112
|
+
)
|
|
1113
|
+
);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
});
|
|
1117
|
+
} else {
|
|
1088
1118
|
context.onError(
|
|
1089
1119
|
compilerDom.createDOMCompilerError(
|
|
1090
1120
|
57,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
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.3.
|
|
32
|
-
"@vue/compiler-dom": "3.3.
|
|
31
|
+
"@vue/shared": "3.3.5",
|
|
32
|
+
"@vue/compiler-dom": "3.3.5"
|
|
33
33
|
}
|
|
34
34
|
}
|