Open CelestialPossession opened 6 months ago
好的,我们检查检查
@extend(Text) function fancy (tooltipInfo: InterfaceObj) { .fontSize(tooltipInfo.textStyle.fontSize || $r('app.float.fontSize')) .fontColor(tooltipInfo.textStyle.color || $r('app.float.color')) .fontWeight(tooltipInfo.textStyle.fontWeight || $r('app.float.fontWeight')) .fontFamily(tooltipInfo.textStyle.fontFamily || $r('app.float.fontFamily')) }
'app.float.xxxxx'无法引用,resource.base.element中没有float.json,写成font.json了
版本"@mcui/mccharts": "^1.0.2",目前只能注释上述默认风格来通过编译
你好,是直接注释@Extend(Text) function fancy (tooltipInfo: InterfaceObj) { // .fontSize(tooltipInfo.textStyle.fontSize || $r('app.float.fontSize')) // .fontColor(tooltipInfo.textStyle.color || $r('app.float.color')) // .fontWeight(tooltipInfo.textStyle.fontWeight || $r('app.float.fontWeight')) // .fontFamily(tooltipInfo.textStyle.fontFamily || $r('app.float.fontFamily')) // }吗
简单粗暴注释 @extend(Text) function fancy (tooltipInfo: InterfaceObj) { .fontSize(tooltipInfo.textStyle.fontSize )//|| $r('app.float.fontSize') .fontColor(tooltipInfo.textStyle.color )//|| $r('app.float.color') .fontWeight(tooltipInfo.textStyle.fontWeight)// || $r('app.float.fontWeight') .fontFamily(tooltipInfo.textStyle.fontFamily )//|| $r('app.float.fontFamily') } 或者全部修改float为font。
已经更新2.0,你可以更新到2.0试试看
@Extend(Text) function fancy (tooltipInfo: InterfaceObj) { .fontSize(tooltipInfo.textStyle.fontSize || $r('app.float.fontSize')) .fontColor(tooltipInfo.textStyle.color || $r('app.float.color')) .fontWeight(tooltipInfo.textStyle.fontWeight || $r('app.float.fontWeight')) .fontFamily(tooltipInfo.textStyle.fontFamily || $r('app.float.fontFamily')) }
'app.float.xxxxx'无法引用,resource.base.element中没有float.json,写成font.json了
版本"@mcui/mccharts": "^1.0.2",目前只能注释上述默认风格来通过编译