[Feature] Hope "tooltip" supports "rich". 希望“tooltip”支持“rich”
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### What problem does this feature solve?
目前`tooltip`不支持`rich`,`renderMode:'richText'`似乎是一个没用的选项,在没有dom的微信小程序里,没办法自定义不同的样式。
Currently, `rich`is not supported by`tooltip`, and`renderMode:'richText'`seems to be a useless option. In wechat applets without DOM, there is no way to customize different styles.
```js
option = {
tooltip: {
renderMode: 'richText',
formatter({ name, value }) {
return `{name|${name}}:{value|${value}}`;
},
// invalid 无效
rich: {
name: { color: 'red' },
value: { color: 'blue' }
},
textStyle: {
// invalid 无效
rich: {
name: { color: 'red' },
value: { color: 'blue' }
}
}
},
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
}
]
};
```
### What does the proposed API look like?
`tooltip.rich`
or
`tooltip.textStyle.rich`
Contributor guide
Assessment
This issue has not been assessed yet.