對於標籤的大小,你需要設置的configuration object傳遞給GoldenLayout,和調整樣式表dimensions.headerHeight
財產。
JS:
var myLayout = new GoldenLayout({
dimensions: {
headerHeight: 46
},
content:[{
type: 'row',
content:[{
type: 'component',
componentName: 'test-component'
},{
type: 'component',
componentName: 'test-component'
}]
}]
});
CSS:
.lm_tab {
height: 40px !important;
}
最低限度: Updated Fiddle
更新
,使這一切看起來不錯,更新line-height
爲.lm_tab
,更改height
的.lm_close_tab
,並更改top
的位置.lm_controls
。
CSS:
.lm_tab {
height: 40px !important;
line-height:40px;
}
.lm_close_tab {
height: 35px !important;
}
.lm_controls {
top:13px;
}
Updated Fiddle 2
有點棘手(需要手動設置內容頂部的CSS偏移,並在頭高度的CSS),但有效地運行......也許是有用還設置'line-height:40px;'不垂直對齊文字 –
當然。爲了我的用途,我更新了一些樣式,使所有內容一致。查看我最近的更新。 – Joshua