更新 app/common/service/generator/core/VueEditGenerator.php

This commit is contained in:
mkm 2025-08-21 16:17:06 +08:00
parent 345439ba4e
commit 56c6b3fc7c

View File

@ -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;
}