[Feature] Hope "tooltip" supports "rich". 希望“tooltip”支持“rich”
- Ngôn ngữ chính
- TypeScript
- Star
- 67.3k
- Fork
- 19.8k
- Merge trung bình
- 15 giờ 17 phút
- Pull request đã merge (30 ngày)
- 5
Mô tả
### 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`
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cách đường dẫn tooltip's renderMode:'richText' sử dụng đầu ra của formatter trong trình kết xuất WeChat mini-program/no-DOM. Xác minh rằng API tooltip.rich hoặc tooltip.textStyle.rich đã chọn áp dụng các kiểu được đặt tên cho đầu ra {name|...} và {value|...}, đồng thời xác nhận rằng ví dụ hiển thị các màu khác nhau.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, typescript
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100