mirror of https://gitee.com/karson/fastadmin.git
一键生成CRUD多选字段和多图字段支持text类型
解决当字段类型为多选项或多图片时varchar(255)不够存储的情况,数据库字段使用text符合多选字段名或多图片规则时依然生成多选菜单。pull/180/head
parent
290bfc4f75
commit
7e73e0b562
|
|
@ -678,7 +678,7 @@ class Crud extends Command
|
|||
|
||||
$formAddElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => $defaultValue]);
|
||||
$formEditElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => "\$row.{$field}"]);
|
||||
} elseif ($inputType == 'textarea') {
|
||||
} elseif ($inputType == 'textarea' && !$this->isMatchSuffix($field, $this->selectpagesSuffix) && !$this->isMatchSuffix($field, $this->imageField)) {
|
||||
$cssClassArr[] = $this->isMatchSuffix($field, $this->editorSuffix) ? $this->editorClass : '';
|
||||
$attrArr['class'] = implode(' ', $cssClassArr);
|
||||
$attrArr['rows'] = 5;
|
||||
|
|
|
|||
Loading…
Reference in New Issue