فهرست منبع

字段类型调整

liaofei 2 سال پیش
والد
کامیت
5178fca71a
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      crmeb/app/services/system/SystemCrudServices.php

+ 4 - 0
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);
             }
         }