xtype: 'polar',
store: store,
colors: Mocoolka.util.ColorPatterns.getBaseColors(),//取颜色列表
interactions: ['rotate', 'itemhighlight'],
legend: {
docked: 'bottom',
verticalWidth: 100
},
//这里定义颜色类
Ext.define('Mocoolka.touch.chart.util.ColorPatterns', {
singleton: true,
requires: ['Ext.draw.Color'],
colors: ["#115fa6", "#94ae0a", "#a61120", "#ff8809", "#ffd13e", "#a61187", "#24ad9a", "#7c7474", "#a66111", "#00FF99", "#333399", "#339999", "#660099", "#FF0033"],//这里就是颜色列表
alternateClassName: 'mkColorUtil',
getBaseColors: function (index) {
if (index == null) {
return this.colors.slice()
} else {
return this.colors[index]
}
},
设置cls
cls属性就相当于html中的class,所以你可以在你的button属性中加入
cls:'red'
同时在当前button所在页面加入样式.red{background-color:red},这里的样式跟平常用的那些html都一样,加图片还是怎么的,你都随便写。
2.设置style属性
里面直接写入你的样式就行了“background:....”
3.动态设置
setCls() 和 setStyle()
4.加ui
加了ui后,你在开发人员工具中就能看到,class的变化了,然后你要在你所引用的ext样式中添加对应的样式,一般这个是做主题的时候用的多,你要找到你引用的css文件所对应的原scss文件,然后改scss文件,在编译生成css文件,总之有点麻烦,需要安装ruby和compass,ruby下载安装,compass,你上网上搜下,就会告诉你怎么装了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)