diff --git a/application/admin/command/Crud.php b/application/admin/command/Crud.php index 390cb953df717ac12b3887caaea4ec68ebdce061..d66f32291ee060d1e73f2b365888cdadc036be16 100755 --- a/application/admin/command/Crud.php +++ b/application/admin/command/Crud.php @@ -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) {