!439 CRUD生成字段默认值bug

Merge pull request !439 from Jon/develop
pull/435/MERGE
Karson 2023-04-20 01:58:54 +00:00 committed by Gitee
commit 2c09a10786
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) {