注意 : 一样要加:
'format' => 'raw',
[
'attribute' => 'good_url',
'headerOptions' => ['width' => '150'],
'format' => 'raw',
'value' => function ($model) {
$url = $model->good_url;
$count = "<input type='button' width='150px' value='查看'>";
return Html::a($count, $url, ['title' => '查看','target'=>'_blank']);
}
],