通用配置
title
文字标题
//标题文字,支持/n转行
text:'成绩展示',
//支持超链
link:'http://www.baidu.com',
// self/blank分别是超链接在当前窗口/新窗口打开
target:'blank',
文字样式(textStyle)
textStyle:{
color:'red',
//字体样式是否倾斜 'normal' 'italic' 'oblique'
fontStyle:"oblique",
//字体粗细 'normal' 'bold' 'bolder''lighter' 100 | 200 | 300 | 400...
fontWeight:'lighter',
//文字字体系列
fontFamily: 'monospace',
//字体大小 可以不加px
fontSize: 32,
//行高,未设置取父行高,直接写数值
lineHeight:56,
//宽高
width:32,
height:25
}
就是css里设置的属性,行高/字体大小/字体宽高 同时设置宽高会无效
具体设置数值大小时px可以省略
标题边框
//边框的宽度
borderWidth:5,
//边框的颜色
borderColor: "rgba(34, 222, 65, 1)",
//标题圆角 也可以直接写一个5代表四个角
borderRadius: [5, 5, 0, 0] //(顺时针左上,右上,右下,左下)
标题位置
left/top/bottom/right来设置
title: {
//标题文字,支持/n转行
text: '成绩展示',
//支持超链
link: 'http://www.baidu.com',
//self/blank分别是超链接在当前窗口/新窗口打开
target: 'blank',
//文字样式
textStyle: {
color: 'red',
//字体样式是否倾斜 'normal' 'italic' 'oblique'
fontStyle: "oblique",
//字体粗细 'normal' 'bold' 'bolder''lighter' 100 | 200 | 300 | 400...
fontWeight: 'lighter',
//文字字体系列
fontFamily: 'monospace',
//字体大小 可以不加px
fontSize: 22,
//行高,未设置取父行高,直接写数值
lineHeight: 66,
//宽高
width: 32,
height: 25,
},
//边框的宽度
borderWidth: 5,
//边框的颜色
borderColor: "rgba(34, 222, 65, 1)",
//标题圆角 也可以直接写一个5代表四个角
borderRadius: [5, 5, 0, 0], //(顺时针左上,右上,右下,左下)
top: 5,
left: 'auto'
},