提交者
Gitee
一键生成CRUD多选字段和多图字段支持text类型
解决当字段类型为多选项或多图片时varchar(255)不够存储的情况,数据库字段使用text符合多选字段名或多图片规则时依然生成多选菜单。
正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -678,7 +678,7 @@ class Crud extends Command | @@ -678,7 +678,7 @@ class Crud extends Command | ||
678 | 678 | ||
679 | $formAddElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => $defaultValue]); | 679 | $formAddElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => $defaultValue]); |
680 | $formEditElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => "\$row.{$field}"]); | 680 | $formEditElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'fieldList' => $this->getFieldListName($field), 'attrStr' => Form::attributes($attrArr), 'selectedValue' => "\$row.{$field}"]); |
681 | - } elseif ($inputType == 'textarea') { | 681 | + } elseif ($inputType == 'textarea' && !$this->isMatchSuffix($field, $this->selectpagesSuffix) && !$this->isMatchSuffix($field, $this->imageField)) { |
682 | $cssClassArr[] = $this->isMatchSuffix($field, $this->editorSuffix) ? $this->editorClass : ''; | 682 | $cssClassArr[] = $this->isMatchSuffix($field, $this->editorSuffix) ? $this->editorClass : ''; |
683 | $attrArr['class'] = implode(' ', $cssClassArr); | 683 | $attrArr['class'] = implode(' ', $cssClassArr); |
684 | $attrArr['rows'] = 5; | 684 | $attrArr['rows'] = 5; |
-
请 注册 或 登录 后发表评论