1.標題居中
//left的值為'left', 'center', 'right' title:{ left:'center' }
2.主副標題之間的間距
title:{ //默認為10 itemGap:20 }
3.標題文本樣式
title:{ text:'標題文本', textStyle:{ //文字顏色 color:'#ccc', //字體風格,'normal','italic','oblique' fontStyle:'normal', //字體粗細 'normal','bold','bolder','lighter',100 | 200 | 300 | 400... fontWeight:'bold', //字體系列 fontFamily:'sans-serif'
//字體大小
fontSize:18
} }
4.副標題
title:{ subtext:'副標題', //副標題文本樣式 subtextStyle:{} }
5.grid組件離容器左側的距離。
title:{ // left 的值可以是像 20 這樣的具體像素值,可以是像 '20%' 這樣相對於容器高寬的百分比,也可以是 'left', 'center', 'right'。 //如果 left 的值為'left', 'center', 'right',組件會根據相應的位置自動對齊。 left:'center' }
同理,top,right,bottom用法同left.