### 配置項`partial`
> 獨立布局,表格獨立顯示
參數`boolean $partial 是否設置局部視圖`
> `true` 設置獨立布局
> `false` 不設置獨立布局
示例代碼:
~~~
return ViewBuilder::table()
->setTitle('會員列表')
->setPartial()
->setHideCheckbox(true)
->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', 'status']);
return $query;
})
->render($this);
~~~
示例圖示:
