mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
update src/packages/components/Charts/Mores/Process/index.vue.
之前那样UI值不会随着预览更新更新到UI上,接口数变了,UI不变。 前端小白不懂之前为啥要那么写,简单修改一下 Signed-off-by: 初级开发人员 <qinweiw@foxmail.com>
This commit is contained in:
parent
8d3ff7cc26
commit
f19dd0ee20
@ -49,16 +49,16 @@ const {
|
|||||||
dataset
|
dataset
|
||||||
} = toRefs(props.chartConfig.option)
|
} = toRefs(props.chartConfig.option)
|
||||||
|
|
||||||
const option = shallowReactive({
|
//const option = shallowReactive({
|
||||||
dataset: configOption.dataset
|
// dataset: configOption.dataset
|
||||||
})
|
//})
|
||||||
|
|
||||||
// 手动更新
|
// 手动更新
|
||||||
watch(
|
watch(
|
||||||
() => props.chartConfig.option.dataset,
|
() => props.chartConfig.option.dataset,
|
||||||
(newData: any) => {
|
(newData: any) => {
|
||||||
try {
|
try {
|
||||||
option.dataset = toNumber(newData, 2)
|
dataset.value = toNumber(newData, 2)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
@ -69,6 +69,6 @@ watch(
|
|||||||
)
|
)
|
||||||
// 预览更新
|
// 预览更新
|
||||||
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: number) => {
|
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: number) => {
|
||||||
option.dataset = toNumber(newData, 2)
|
dataset.value = toNumber(newData, 2)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user