ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 列表渲染 List ```php public function lists_view($active = 1,$title = ''){ // dump(C()); $model = Model::app('forms@Form.data'); $map['active_id'] = $active; $title && $map['username|telephone'] = array('like','%'.$title.'%'); $lists = $this->lists($model,$map); $testurl = au('test'); // 模拟数据 ui('list')->title('UI列表渲染') ->tab('数据分类A',au('lists_view',['active'=>1]),$active == 1) ->tab('数据分类B',au('lists_view',['active'=>4]),$active == 4) ->search('搜索姓名或手机号','title','text','支持模糊搜索,这是描述') ->buttonNew(au('configs'))->buttonDisable($testurl)->buttonEnable($testurl) ->buttonClear('data_dev') ->ajaxButton($testurl,'status=1','批量删除测试') ->keyId() ->keyText('username','姓名字段') ->keyText('telephone','手机号字段') ->keyAddress('地址信息') ->keyCreateTime() ->keyDoActionEdit($testurl) ->keyDoActionDel($testurl) ->injectPage($this->_inject_page) ->data($lists) ->display(); } ``` ![示意图](https://box.kancloud.cn/2016-08-09_57a95134a2236.png)