feat:新增图表颜色滤镜

This commit is contained in:
奔跑的面条
2022-04-19 22:07:54 +08:00
parent 96581511f8
commit 43c46c873c
5 changed files with 121 additions and 23 deletions
+4 -1
View File
@@ -44,9 +44,12 @@ export const animationsClass = (animations: string[]) => {
return ''
}
// 样式
export const getStyle = (styles: StylesType) => {
const { opacity, saturate, contrast, hueRotate, brightness } = styles
return {
// 透明度
opacity: styles.opacity
opacity: opacity,
filter: `saturate(${saturate}) contrast(${contrast}) hue-rotate(${hueRotate}deg) brightness(${brightness})`
}
}