diff --git a/admin.html b/admin.html
index 1f21881..482bca9 100644
--- a/admin.html
+++ b/admin.html
@@ -84,7 +84,7 @@
- {{ scope.row.filePath }}
+ {{ scope.row.filePath }}
@@ -842,6 +842,15 @@
};
this.mockFileDialog.visible = true;
},
+ openMockFileFromRoute: function (routeRow) {
+ var filePath = routeRow.filePath || "";
+ var mockFile = this.mockFiles.find(function (f) { return f.filePath === filePath; });
+ if (!mockFile) {
+ this.$message.warning("未找到对应的 Mock 文件:" + filePath);
+ return;
+ }
+ this.openMockFileDialogForEdit(mockFile);
+ },
openMockFileDialogForCopy: function (item) {
this.mockFileDialog.mode = "copy";
this.mockFileDialog.form = {
diff --git a/mock/test.txt b/mock/test.txt
index 0f0016a..965bd54 100644
--- a/mock/test.txt
+++ b/mock/test.txt
@@ -1 +1 @@
-{"code":0,"msg":"ok"}
+{"code":0,"msg":"3"}