0
它與風格有關。當gridview中有更多的列時,動作列的佈局將變爲垂直(見附圖)。我怎樣才能改變它是水平的?我找不到爲什麼它在Bootstrap css中變得垂直。Yii2 Gridview Actioncolumn Layout
謝謝!
vertical layout of actioncolumn
它與風格有關。當gridview中有更多的列時,動作列的佈局將變爲垂直(見附圖)。我怎樣才能改變它是水平的?我找不到爲什麼它在Bootstrap css中變得垂直。Yii2 Gridview Actioncolumn Layout
謝謝!
vertical layout of actioncolumn
試圖迫使風格寬度:
[
'class' => ActionColumn::className(),
'contentOptions' => function ($model, $key, $index, $column) {
return ['style' => 'min-width:150px'];
}
]
更改爲你所需要的寬度。
謝謝!它很棒!有沒有辦法直接在樣式表中設置它? – zhangsquall
當然!在contentOptions中,您可以返回['class'=>'yourClass'] –