如果想要顯示多個字段需要在所需要查詢的控制器中添加$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}">
