优化下拉列表组件,修复若干BUG

This commit is contained in:
2026-03-19 09:50:06 +08:00
parent 9b9ff7f13a
commit abcb9b7b9a
4 changed files with 56 additions and 10 deletions

View File

@@ -263,11 +263,28 @@ class Admin extends Backend
}
/**
* 远程下拉(Admin 无自定义,走父类默认列表
* 远程下拉(返回管理员列表供 remoteSelect 使用
*/
public function select(Request $request): Response
{
return parent::select($request);
$response = $this->initializeBackend($request);
if ($response !== null) {
return $response;
}
list($where, $alias, $limit, $order) = $this->queryBuilder();
$res = $this->model
->withoutField('login_failure,password,salt')
->withJoin($this->withJoinTable ?? [], $this->withJoinType ?? 'LEFT')
->alias($alias)
->where($where)
->order($order)
->paginate($limit);
return $this->success('', [
'list' => $res->items(),
'total' => $res->total(),
]);
}
private function checkGroupAuth(array $groups): ?Response