From 5178fca71aa49925bd7dcaa5880ff3fb701c277d Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Thu, 11 May 2023 16:53:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/system/SystemCrudServices.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crmeb/app/services/system/SystemCrudServices.php b/crmeb/app/services/system/SystemCrudServices.php index 60fc8ce66..715653606 100644 --- a/crmeb/app/services/system/SystemCrudServices.php +++ b/crmeb/app/services/system/SystemCrudServices.php @@ -811,6 +811,10 @@ class SystemCrudServices extends BaseServices if (in_array($fieldType, ['text', 'longtext', 'tinytext'])) { unset($option['limit']); } + //判断字段类型 + if ($fieldType == 'boolean' && isset($option['default']) && $option['default'] === '') { + unset($option['default']); + } $table->addColumn($item['field'], $this->changeTabelRule($item['field_type']), $option); } }