crud自动生成字段默认值判断

Signed-off-by: Jon <363516862@qq.com>
pull/439/head
Jon 2023-03-28 09:01:05 +00:00 committed by Gitee
parent b281396aee
commit cecf1ad1cd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 0 deletions

View File

@ -957,6 +957,11 @@ class Crud extends Command
$attrArr['size'] = 50;
}
//字段默认值判断
if ('NULL' == $defaultValue || "''" == $defaultValue) {
$defaultValue = '';
}
$formAddElement = Form::input($inputType, $fieldName, $defaultValue, $attrArr);
$formEditElement = Form::input($inputType, $fieldName, $editValue, $attrArr);
if ($search && $replace) {