mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-02 18:28:40 +08:00
fix(echarts): theme setting supported
修复useECharts的theme参数不起作用的问题 fixed: #1095
This commit is contained in:
parent
e15b4f14db
commit
93812f734e
@ -4,7 +4,9 @@
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- **其它** 修复部分封装组件在使用插槽时报错的问题
|
||||
- **其它**
|
||||
- 修复部分封装组件在使用插槽时报错的问题
|
||||
- 修复`useECharts`的`theme`参数不起作用的问题
|
||||
|
||||
## 2.7.1(2021-08-16)
|
||||
|
||||
|
@ -11,9 +11,13 @@ import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
||||
|
||||
export function useECharts(
|
||||
elRef: Ref<HTMLDivElement>,
|
||||
theme: 'light' | 'dark' | 'default' = 'light'
|
||||
theme: 'light' | 'dark' | 'default' = 'default'
|
||||
) {
|
||||
const { getDarkMode } = useRootSetting();
|
||||
const { getDarkMode: getSysDarkMode } = useRootSetting();
|
||||
|
||||
const getDarkMode = computed(() => {
|
||||
return theme === 'default' ? getSysDarkMode.value : theme;
|
||||
});
|
||||
let chartInstance: echarts.ECharts | null = null;
|
||||
let resizeFn: Fn = resize;
|
||||
const cacheOptions = ref({}) as Ref<EChartsOption>;
|
||||
|
Loading…
Reference in New Issue
Block a user