Merge branch 'dev'

This commit is contained in:
奔跑的面条 2024-11-21 20:58:09 +08:00
commit 7eef25cf3f
2 changed files with 10 additions and 0 deletions

View File

@ -36,6 +36,8 @@
import { computed, PropType, toRefs, watch, reactive, ref } from 'vue' import { computed, PropType, toRefs, watch, reactive, ref } from 'vue'
import { CreateComponentType } from '@/packages/index.d' import { CreateComponentType } from '@/packages/index.d'
import { icon } from '@/plugins' import { icon } from '@/plugins'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
import { useChartDataFetch } from '@/hooks'
const props = defineProps({ const props = defineProps({
chartConfig: { chartConfig: {
@ -83,6 +85,13 @@ watch(
deep: true deep: true
} }
) )
// setdata
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
props.chartConfig.option.dataset = newData
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -170,6 +170,7 @@ watch(
dimensions: any dimensions: any
} | null } | null
) => { ) => {
noData.value = false
if (newData && targetData?.value?.chartConfig?.chartFrame === ChartFrameEnum.ECHARTS) { if (newData && targetData?.value?.chartConfig?.chartFrame === ChartFrameEnum.ECHARTS) {
// DataSet // DataSet
source.value = newData source.value = newData