### 配置項`title`
> 配置當前表格的標題
參數`string $title`
> 值`string`如:`日志列表`
示例代碼:
~~~
return ViewBuilder::table()
->setTitle('會員列表')
->setPage(true)
->setHideCheckbox(false)
->setColumns([
'password',
'username' => table_column_helper('用戶名', ['style' => ['min-width' => '100px']]),
'an_mobile' => table_column_helper('電話', ['style' => ['min-width' => '100px']], function($item){
return '+' . $item['an'] . ' ' . $item['mobile'];
}),
'email' => table_column_helper('郵箱', ['style' => ['min-width' => '200px']]),
])
->setQuery(function () {
$query = AdminUser::find()->select(['id', 'username', 'password', 'email', 'an', 'mobile']);
return $query;
})
->setOrderBy('id DESC')
->setPrimaryKey('id')
->render($this);
~~~
示例圖示:
