mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改全局设置不触发的问题
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import merge from 'lodash/merge'
|
||||
import pick from 'lodash/pick'
|
||||
|
||||
/**
|
||||
* * ECharts option 统一前置处理
|
||||
* @param option
|
||||
@@ -6,3 +9,18 @@ export const echartOptionProfixHandle = (option: any) => {
|
||||
option['backgroundColor'] = 'rgba(0,0,0,0)'
|
||||
return option
|
||||
}
|
||||
|
||||
/**
|
||||
* * 合并 color 和全局配置项
|
||||
* @param option 配置
|
||||
* @param themeSetting 设置
|
||||
* @param excludes 排除元素
|
||||
* @returns object
|
||||
*/
|
||||
export const mergeTheme = <T, U, E extends keyof U> (
|
||||
option: T,
|
||||
themeSetting: U,
|
||||
includes: E[] = []
|
||||
) => {
|
||||
return merge(pick(themeSetting, includes), option)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user