mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-10-27 19:13:59 +08:00
feat: dynamically update the theme (#841)
Co-authored-by: GU Yiling <justice360@gmail.com>
This commit is contained in:
@ -252,7 +252,7 @@ export default defineComponent({
|
||||
);
|
||||
|
||||
watch(
|
||||
[realTheme, realInitOptions],
|
||||
realInitOptions,
|
||||
() => {
|
||||
cleanup();
|
||||
init();
|
||||
@ -262,6 +262,16 @@ export default defineComponent({
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
realTheme,
|
||||
(theme) => {
|
||||
chart.value?.setTheme(theme);
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
},
|
||||
);
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.group && chart.value) {
|
||||
chart.value.group = props.group;
|
||||
|
||||
Reference in New Issue
Block a user