From 345439ba4e306e2b8db445f2c83069aa70848a3d Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 21 Aug 2025 16:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/common/service/generat?= =?UTF-8?q?or/core/VueApiGenerator.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/generator/core/VueApiGenerator.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/common/service/generator/core/VueApiGenerator.php b/app/common/service/generator/core/VueApiGenerator.php index 1d86cd2..860a1f7 100644 --- a/app/common/service/generator/core/VueApiGenerator.php +++ b/app/common/service/generator/core/VueApiGenerator.php @@ -94,7 +94,10 @@ class VueApiGenerator extends BaseGenerator implements GenerateInterface public function getModuleGenerateDir() { $dir = dirname(app_path()) . '/admin/src/api/'; - $this->checkDir($dir); + if (!empty($this->classDir)) { + $dir .= $this->classDir . '/'; + $this->checkDir($dir); + } return $dir; } @@ -108,7 +111,10 @@ class VueApiGenerator extends BaseGenerator implements GenerateInterface public function getRuntimeGenerateDir() { $dir = $this->generatorDir . 'vue/src/api/'; - $this->checkDir($dir); + if (!empty($this->classDir)) { + $dir .= $this->classDir . '/'; + $this->checkDir($dir); + } return $dir; }