fastadmin自定义列表下拉框筛选
作者:互联网
JS代码:
{field: 'type.name', title: __('Type.name'), searchList: $.getJSON("ai/activity_type/source")},
PHP代码:
public function source() { $json = cache('ai_activity_type'); if ($json === false) { $typeModel = new \app\admin\model\ai\ActivityType(); $list = $typeModel->field('name')->select(); $json = json($list); cache('ai_activity_type', $json); } return $json; }
标签:name,自定义,ai,cache,json,fastadmin,activity,type,下拉框 来源: https://www.cnblogs.com/sisl/p/16397251.html