修复crud生成文件时未选中id主键时导致编辑功能错误问题

pull/326/head
wanger 2021-05-25 17:10:53 +08:00 committed by F4nniu
parent 44fd7d14ec
commit 614384a2bb
1 changed files with 1 additions and 1 deletions

View File

@ -899,7 +899,7 @@ class Crud extends Command
'recyclebinJs' => '',
'headingHtml' => $headingHtml,
'recyclebinHtml' => $recyclebinHtml,
'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(explode(',', $fields))) . "']);" : '',
'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(in_array($priKey,explode(',', $fields))?explode(',', $fields):explode(',',$priKey.','.$fields))) . "']);" : '',
'appendAttrList' => implode(",\n", $appendAttrList),
'getEnumList' => implode("\n\n", $getEnumArr),
'getAttrList' => implode("\n\n", $getAttrArr),