!439 CRUD生成字段默认值bug

Merge pull request !439 from Jon/develop
pull/446/head
Karson 2023-04-20 01:58:54 +00:00
parent db5574582e
commit 0a062a8d63
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) {