我已将小部件调整为:
> import kartik / grid / GridView
{{ use('kartik/grid/GridView') }}
>使用GridView :: widget(...)
{{
grid_view_widget(
{
'dataProvider': dataProvider,
'export': false,
'responsive': true,
'condensed': true,
'toolbar': [
'{export}',
'{toggleData}'
]
}
)
}}
但桌子被剪切,工具栏未显示:
答案 0 :(得分:0)
尝试
GridView::widget([
'dataProvider' => $dataProvider,
'columns' => $columns,
'pjax' => true,
'condensed' => true,
'panel' => [
'heading' => '<h3 class="panel-title">' . $this->title,
'before' => Html::a('<i class="glyphicon glyphicon-plus"></i>', ['create'],
['class' => 'btn btn-success']) . ' ' .
Html::a('<i class="glyphicon glyphicon-repeat"></i>', ['index'], ['class' => 'btn btn-info']),
],
'export' => false,
'toolbar' => [
'{toggleData}'
]])
使用此至少您的工具栏将会显示。让我知道发生什么事。 :)