Pre Merge pull request !406 from mengkang/develop

pull/406/MERGE
mengkang 2024-04-26 03:46:54 +00:00 committed by Gitee
commit 6b014bc760
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,7 @@ trait Backend
$list = $this->model
->where($where)
->order($sort, $order)
->field($this->listDisplayFields)
->paginate($limit);
$result = ['total' => $list->total(), 'rows' => $list->items()];
return json($result);

View File

@ -92,6 +92,12 @@ class Backend extends Controller
*/
protected $multiFields = 'status';
/**
* 列表默认显示字段
* @var array|string
*/
protected $listDisplayFields = '*';
/**
* Selectpage可显示的字段
*/