ol-base-components 2.7.7 → 2.7.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "2.7.7",
3
+ "version": "2.7.8",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
package/src/bin/add.js CHANGED
@@ -252,37 +252,6 @@ try {
252
252
 
253
253
  // 输出成功信息
254
254
  console.log(`✅ 模板已生成并保存到 ${outputPath}`);
255
- console.log(` 文件路径: ${outputPath}`);
256
-
257
- // 输出功能总结
258
- const features = [];
259
- if (exportAnswer.hasExport) features.push("导出功能");
260
- if (operationsAnswer.operations.includes("add")) features.push("新增功能");
261
- if (operationsAnswer.operations.includes("edit")) features.push("编辑功能");
262
- if (operationsAnswer.operations.includes("delete")) features.push("删除功能");
263
- if (operationsAnswer.operations.includes("detail")) features.push("详情功能");
264
-
265
- if (features.length > 0) {
266
- console.log(`🔧 已添加功能: ${features.join(", ")}`);
267
- }
268
-
269
- console.log(`📚 模块名: ${moduleAnswer.swaggerModule}`);
270
- if (idField) {
271
- console.log(`🆔 ID字段: ${idField}`);
272
- }
273
-
274
- // 显示接口地址预览
275
- if (operationsAnswer.operations.length > 0) {
276
- const pageUrl = pageUrlAnswer.pageUrl;
277
- const baseUrl = pageUrl.replace(/-paged-result.*$/, "").replace(/\/[^\/]*$/, "");
278
- console.log(`🔗 基础接口: ${baseUrl}`);
279
- if (addUrl) console.log(`➕ 新增接口: ${addUrl}`);
280
- if (editUrl) console.log(`✏️ 编辑接口: ${editUrl}`);
281
- if (deleteUrl) console.log(`��️ 删除接口: ${deleteUrl}`);
282
- if (detailUrl) console.log(`��️ 详情接口: ${detailUrl}`);
283
- }
284
-
285
- console.log("\n 模板生成完成!");
286
255
  } catch (error) {
287
256
  stopSpinner();
288
257
  console.error("❌ 发生错误:", error.message);
@@ -40,11 +40,17 @@ const vue2Template = (moduleName, config = {}) => {
40
40
 
41
41
  if (config.pageUrl) pageUrlKey = generateKeyName(config.pageUrl, "get");
42
42
  if (config.exportUrl) exportUrlKey = generateKeyName(config.exportUrl, "post");
43
- if (config.detailUrl) baseUrlKey = detailUrlKey = generateKeyName(config.detailUrl, "get");
44
- if (config.editUrl) baseUrlKey = editUrlKey = generateKeyName(config.editUrl, "put");
43
+ if (config.detailUrl) {
44
+ detailUrlKey = generateKeyName(config.detailUrl, "get");
45
+ baseUrlKey = `${detailUrlKey}CompleteUrl`; //补充后缀
46
+ }
47
+ if (config.editUrl) {
48
+ editUrlKey = generateKeyName(config.editUrl, "put");
49
+ baseUrlKey = `${editUrlKey}CompleteUrl`; //补充后缀
50
+ }
45
51
  if (config.addUrl) baseUrlKey = addUrlKey = generateKeyName(config.addUrl, "post");
46
52
  if (config.deleteUrl) deleteUrlKey = generateKeyName(config.deleteUrl, "delete");
47
- if (baseUrlKey) baseUrlKey = `${baseUrlKey}CompleteUrl`; //补充后缀
53
+
48
54
  // 生成导入语句
49
55
  const generateImports = () => {
50
56
  const imports = [];