From 03c2c83f68ec3cbf90507f628183ee71820fe880 Mon Sep 17 00:00:00 2001 From: dongzp <975303544@qq.com> Date: Tue, 9 Jun 2026 14:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BBMock=E6=95=B0=E6=8D=AE=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E7=9B=B4=E6=8E=A5=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin.html | 11 ++++++++++- mock/test.txt | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/admin.html b/admin.html index 1f21881..482bca9 100644 --- a/admin.html +++ b/admin.html @@ -84,7 +84,7 @@ @@ -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"}