fix: 修改组件不会一起变更的问题

This commit is contained in:
MTrun 2022-02-24 20:19:08 +08:00
parent d690f4277f
commit 6c2692bb96

View File

@ -236,7 +236,7 @@
</template>
<script setup lang="ts">
import { toRefs, PropType } from 'vue'
import { toRefs, PropType, watchEffect, computed } from 'vue'
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
import { axisConf } from '@/packages/chartConfiguration/echarts/index'
import {
@ -257,7 +257,21 @@ const props = defineProps({
}
})
const { title, xAxis, yAxis, legend } = toRefs(props.data)
const title = computed(() => {
return props.data.title
})
const xAxis = computed(() => {
return props.data.xAxis
})
const yAxis = computed(() => {
return props.data.yAxis
})
const legend = computed(() => {
return props.data.legend
})
</script>
<style lang="scss" scoped>