/**
* 生成表單參數
* @param array $info
* @return array
* @throws \FormBuilder\Exception\FormBuilderException
*/
public function form($info = [],int $file_type = 1)
{
return [
Form::radio('file_type', '素材類型', $info['file_type'] ?? $file_type)->options([['value' => 1, 'label' => '圖片'], ['value' => 2, 'label' => '視頻']]),
Form::select('pid', '上級分類', (int)($info['pid'] ?? ''))->setOptions($this->getCateList(['pid' => 0]))->filterable(true),
Form::input('name', '分類名稱', $info['name'] ?? '')->maxlength(30),
];
}
\app\services\system\attachment\SystemAttachmentCategoryServices.php"
解決修改分類后丟失類型,新增和修改都存在的問題
適合多店版 pro 2.3 2.3.1