From 56c6b3fc7cf013784363fd7937a6271888db1a24 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 21 Aug 2025 16:17:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/common/service/generat?= =?UTF-8?q?or/core/VueEditGenerator.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/generator/core/VueEditGenerator.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/common/service/generator/core/VueEditGenerator.php b/app/common/service/generator/core/VueEditGenerator.php index 43b2e95..01243cc 100644 --- a/app/common/service/generator/core/VueEditGenerator.php +++ b/app/common/service/generator/core/VueEditGenerator.php @@ -65,6 +65,7 @@ class VueEditGenerator extends BaseGenerator implements GenerateInterface $this->getFormValidateContent(), $this->tableData['table_comment'], $this->getPkContent(), + $this->getApiDirContent(), $this->getTableName(), $this->getCheckBoxJoinContent(), $this->getCheckBoxSplitContent(), @@ -442,7 +443,11 @@ class VueEditGenerator extends BaseGenerator implements GenerateInterface */ public function getModuleGenerateDir() { - $dir = dirname(app_path()) . '/admin/src/views/' . $this->getTableName() . '/'; + $dir = dirname(app_path()) . '/admin/src/views/'; + if (!empty($this->classDir) && $this->classDir != $this->getLowerTableName()) { + $dir .= $this->classDir . '/'; + }; + $dir .= $this->getLowerTableName() . '/'; $this->checkDir($dir); return $dir; } @@ -456,7 +461,11 @@ class VueEditGenerator extends BaseGenerator implements GenerateInterface */ public function getRuntimeGenerateDir() { - $dir = $this->generatorDir . 'vue/src/views/' . $this->getTableName() . '/'; + $dir = $this->generatorDir . 'vue/src/views/'; + if (!empty($this->classDir) && $this->classDir != $this->getLowerTableName()) { + $dir .= $this->classDir . '/'; + }; + $dir .= $this->getLowerTableName() . '/'; $this->checkDir($dir); return $dir; }