mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
修改代码生成
This commit is contained in:
parent
81a73688b5
commit
f8929fe968
@ -619,14 +619,18 @@ class SystemCrud extends AuthController
|
||||
continue;
|
||||
}
|
||||
if (isset($item['is_table']) && $item['is_table']) {
|
||||
$label = '';
|
||||
if (in_array($item['from_type'], ['frameImageOne', 'frameImages'])) {
|
||||
$keyName = 'slot';
|
||||
} elseif (in_array($item['from_type'], ['radio', 'select', 'checkbox'])) {
|
||||
$label = app()->make(Make::class)->getAttrPrefix();
|
||||
} else {
|
||||
$keyName = 'key';
|
||||
}
|
||||
|
||||
$columns[] = [
|
||||
'title' => $item['table_name'] ?: $item['comment'],
|
||||
$keyName => $item['field'],
|
||||
$keyName => $item['field'] . $label,
|
||||
'from_type' => $item['from_type'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -142,6 +142,18 @@ abstract class Make
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字段后缀
|
||||
* @return string
|
||||
* @author 等风来
|
||||
* @email 136327134@qq.com
|
||||
* @date 2023/5/22
|
||||
*/
|
||||
public function getAttrPrefix()
|
||||
{
|
||||
return $this->attrPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @author 等风来
|
||||
@ -204,7 +216,7 @@ abstract class Make
|
||||
public function setFilePathName(string $filePathName = '')
|
||||
{
|
||||
if ($filePathName) {
|
||||
$this->filePathName = $filePathName;
|
||||
// $this->filePathName = $filePathName;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user