fix: 胶囊柱图source数量变化页面展示效果数量不变问题
This commit is contained in:
parent
094e7f3e67
commit
17108c2a2c
@ -53,8 +53,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, watch, reactive, PropType } from 'vue'
|
import { onMounted, watch, reactive, PropType } from 'vue'
|
||||||
import merge from 'lodash/merge'
|
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
|
||||||
import { useChartDataFetch } from '@/hooks'
|
import { useChartDataFetch } from '@/hooks'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import config, { option } from './config'
|
import config, { option } from './config'
|
||||||
@ -114,12 +112,11 @@ watch(
|
|||||||
|
|
||||||
const calcData = (data: any) => {
|
const calcData = (data: any) => {
|
||||||
mergeConfig(props.chartConfig.option)
|
mergeConfig(props.chartConfig.option)
|
||||||
|
|
||||||
calcCapsuleLengthAndLabelData()
|
calcCapsuleLengthAndLabelData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const mergeConfig = (data: any) => {
|
const mergeConfig = (data: any) => {
|
||||||
state.mergedConfig = merge(cloneDeep(state.defaultConfig), data || {})
|
state.mergedConfig = data || {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据解析
|
// 数据解析
|
||||||
|
Loading…
x
Reference in New Issue
Block a user