@vue/compiler-sfc 3.6.0-alpha.3 → 3.6.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/compiler-sfc.cjs.js +28 -35
- package/dist/compiler-sfc.esm-browser.js +711 -11786
- package/package.json +6 -6
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.6.0-alpha.
|
|
2
|
+
* @vue/compiler-sfc v3.6.0-alpha.4
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2247,54 +2247,49 @@ const transformSrcset = (node, context, options = defaultAssetUrlOptions) => {
|
|
|
2247
2247
|
return;
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
|
-
|
|
2250
|
+
let content = "";
|
|
2251
2251
|
imageCandidates.forEach(({ url, descriptor }, index2) => {
|
|
2252
2252
|
if (shouldProcessUrl(url)) {
|
|
2253
2253
|
const { path: path2 } = parseUrl(url);
|
|
2254
|
-
let exp2;
|
|
2255
2254
|
if (path2) {
|
|
2255
|
+
let exp2 = "";
|
|
2256
2256
|
const existingImportsIndex = context.imports.findIndex(
|
|
2257
2257
|
(i) => i.path === path2
|
|
2258
2258
|
);
|
|
2259
2259
|
if (existingImportsIndex > -1) {
|
|
2260
|
-
exp2 =
|
|
2261
|
-
`_imports_${existingImportsIndex}`,
|
|
2262
|
-
false,
|
|
2263
|
-
attr.loc,
|
|
2264
|
-
3
|
|
2265
|
-
);
|
|
2260
|
+
exp2 = `_imports_${existingImportsIndex}`;
|
|
2266
2261
|
} else {
|
|
2267
|
-
exp2 =
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2262
|
+
exp2 = `_imports_${context.imports.length}`;
|
|
2263
|
+
context.imports.push({
|
|
2264
|
+
exp: compilerCore.createSimpleExpression(
|
|
2265
|
+
exp2,
|
|
2266
|
+
false,
|
|
2267
|
+
attr.loc,
|
|
2268
|
+
3
|
|
2269
|
+
),
|
|
2270
|
+
path: path2
|
|
2271
|
+
});
|
|
2274
2272
|
}
|
|
2275
|
-
|
|
2273
|
+
content += exp2;
|
|
2276
2274
|
}
|
|
2277
2275
|
} else {
|
|
2278
|
-
|
|
2279
|
-
`"${url}"`,
|
|
2280
|
-
false,
|
|
2281
|
-
attr.loc,
|
|
2282
|
-
3
|
|
2283
|
-
);
|
|
2284
|
-
compoundExpression.children.push(exp2);
|
|
2276
|
+
content += `"${url}"`;
|
|
2285
2277
|
}
|
|
2286
2278
|
const isNotLast = imageCandidates.length - 1 > index2;
|
|
2287
|
-
if (descriptor
|
|
2288
|
-
|
|
2289
|
-
} else if (descriptor) {
|
|
2290
|
-
compoundExpression.children.push(` + ' ${descriptor}'`);
|
|
2279
|
+
if (descriptor) {
|
|
2280
|
+
content += ` + ' ${descriptor}${isNotLast ? ", " : ""}'${isNotLast ? " + " : ""}`;
|
|
2291
2281
|
} else if (isNotLast) {
|
|
2292
|
-
|
|
2282
|
+
content += ` + ', ' + `;
|
|
2293
2283
|
}
|
|
2294
2284
|
});
|
|
2295
|
-
let exp =
|
|
2285
|
+
let exp = compilerCore.createSimpleExpression(
|
|
2286
|
+
content,
|
|
2287
|
+
false,
|
|
2288
|
+
attr.loc,
|
|
2289
|
+
3
|
|
2290
|
+
);
|
|
2296
2291
|
if (context.hoistStatic) {
|
|
2297
|
-
exp = context.hoist(
|
|
2292
|
+
exp = context.hoist(exp);
|
|
2298
2293
|
exp.constType = 3;
|
|
2299
2294
|
}
|
|
2300
2295
|
node.props[index] = {
|
|
@@ -20234,9 +20229,7 @@ function genModelProps(ctx) {
|
|
|
20234
20229
|
}
|
|
20235
20230
|
modelPropsDecl += `
|
|
20236
20231
|
${JSON.stringify(name)}: ${decl},`;
|
|
20237
|
-
const modifierPropName = JSON.stringify(
|
|
20238
|
-
name === "modelValue" ? `modelModifiers` : `${name}Modifiers`
|
|
20239
|
-
);
|
|
20232
|
+
const modifierPropName = JSON.stringify(shared.getModifierPropName(name));
|
|
20240
20233
|
modelPropsDecl += `
|
|
20241
20234
|
${modifierPropName}: {},`;
|
|
20242
20235
|
}
|
|
@@ -21759,7 +21752,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
21759
21752
|
return generator.toJSON();
|
|
21760
21753
|
}
|
|
21761
21754
|
|
|
21762
|
-
const version = "3.6.0-alpha.
|
|
21755
|
+
const version = "3.6.0-alpha.4";
|
|
21763
21756
|
const parseCache = parseCache$1;
|
|
21764
21757
|
const errorMessages = {
|
|
21765
21758
|
...CompilerDOM.errorMessages,
|