Pre Merge pull request !96 from daidai/dev

This commit is contained in:
daidai 2022-11-18 01:27:54 +00:00 committed by Gitee
commit a8664fdd38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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 || {}
} }
// //