fastadmin SelectPage field显示多个字段

如果想要显示多个字段需要在所需要查询的控制器中添加
$selectpageFields = 'id,name';

html中

<input id="c-user_id" data-rule="required" 
data-source="user/index"
class="form-control selectpage"
name="row[user_id]" type="text" data-live-search="true"
data-field="phone" //搜索字段
data-params='{"custom[phone]":["notin","[null]"]}' //搜索条件
data-format-item=
"{phone} - {nickName}"  //显示的内容 data-primary-key="user_id"      //选择的主键 value="{$row.user_id|htmlentities}">

 

posted @ 2021-04-20 14:33  张志健  阅读(2542)  评论(0编辑  收藏  举报