mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-04 20:59:26 +08:00
fix: 解决渐变组件预览无法更新的问题
This commit is contained in:
parent
199c6abcb1
commit
159a165457
@ -10,7 +10,7 @@ import { PropType, toRefs, shallowReactive, watch } from 'vue'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartDataFetch } from '@/hooks'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
import { option as configOption } from './config'
|
||||
import { option as configOption } from './config'
|
||||
|
||||
const props = defineProps({
|
||||
chartConfig: {
|
||||
@ -26,11 +26,13 @@ const option = shallowReactive({
|
||||
const { w, h } = toRefs(props.chartConfig.attr)
|
||||
const { size, gradient } = toRefs(props.chartConfig.option)
|
||||
|
||||
|
||||
watch(
|
||||
() => props.chartConfig.option.dataset,
|
||||
(newData: any) => {
|
||||
option.dataset = newData
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user