解决未启用状态下的接口显示错误
This commit is contained in:
parent
43fc4ebf57
commit
2a7d4efa59
10
admin.html
10
admin.html
@ -749,10 +749,14 @@
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
removeRoute: async function (index) {
|
removeRoute: async function (index) {
|
||||||
var actualIndex =
|
var pagedIndex =
|
||||||
(this.routePagination.currentPage - 1) * this.routePagination.pageSize +
|
(this.routePagination.currentPage - 1) * this.routePagination.pageSize +
|
||||||
index;
|
index;
|
||||||
this.form.routes.splice(actualIndex, 1);
|
var target = this.filteredRoutes[pagedIndex];
|
||||||
|
if (!target) return;
|
||||||
|
var realIndex = this.form.routes.indexOf(target);
|
||||||
|
if (realIndex === -1) return;
|
||||||
|
this.form.routes.splice(realIndex, 1);
|
||||||
await this.saveRoutes();
|
await this.saveRoutes();
|
||||||
},
|
},
|
||||||
getDefaultRouteForm: function () {
|
getDefaultRouteForm: function () {
|
||||||
@ -795,7 +799,7 @@
|
|||||||
(this.routePagination.currentPage - 1) * this.routePagination.pageSize +
|
(this.routePagination.currentPage - 1) * this.routePagination.pageSize +
|
||||||
index;
|
index;
|
||||||
var item =
|
var item =
|
||||||
this.form.routes[actualIndex] || { route: "", filePath: "mock/" };
|
this.filteredRoutes[actualIndex] || { route: "", filePath: "mock/" };
|
||||||
this.routeDialog.mode = "edit";
|
this.routeDialog.mode = "edit";
|
||||||
this.routeDialog.editingIndex = actualIndex;
|
this.routeDialog.editingIndex = actualIndex;
|
||||||
var matched = this.findApiByRoute(item.route || "");
|
var matched = this.findApiByRoute(item.route || "");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user