beg*_*ner 3 gridview yii2-advanced-app
如何在 GRIDVIEW 的标题旁边添加图标?
像这样的东西。
[
'attribute' => 'address',
'format'=>'raw',
'label'=>'<i class=\"fa fa-map\"><\i>test',
],
Run Code Online (Sandbox Code Playgroud)
您应该将 DataColumn 的 'encodeLabel' 属性设置为 false
[
'attribute' => 'address',
'label' => '<span class="glyphicon glyphicon-star">' ,
'encodeLabel' => false,
],
Run Code Online (Sandbox Code Playgroud)