zhang_li 5 months ago
parent
commit
8834c53cfc
  1. 18
      src/packages/components/Charts/Bars/BarCommon/index.vue

18
src/packages/components/Charts/Bars/BarCommon/index.vue

@ -49,13 +49,14 @@ const replaceMergeArr = ref<string[]>()
const dataset1 = ref() const dataset1 = ref()
const dataset2 = ref(props.chartConfig.option) const dataset2 = ref(props.chartConfig.option)
const key = ref(0) const key = ref(0)
const option = computed(() => { const option = ref()
if(dataset1.value){ // const option = computed(() => {
dataset2.value.dataset = dataset1.value // if(dataset1.value){
} // dataset2.value.dataset = dataset1.value
key.value++ // }
return mergeTheme(dataset2.value, props.themeSetting, includes) // key.value++
}) // return mergeTheme(dataset2.value, props.themeSetting, includes)
// })
// dataset // dataset
watch( watch(
@ -87,6 +88,9 @@ const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore,(da
source : res.source, source : res.source,
dimensions : res.dimensions, dimensions : res.dimensions,
} }
dataset2.value.dataset = dataset1.value
option.value = mergeTheme(dataset2.value, props.themeSetting, includes)
key.value++
}) })
</script> </script>

Loading…
Cancel
Save