From 86dcd212e1349eab93d44f312c041f373a904657 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 18 Nov 2022 16:10:44 +0100 Subject: [PATCH] Update plot-indicator to properly work on v3 --- src/components/charts/PlotIndicator.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/charts/PlotIndicator.vue b/src/components/charts/PlotIndicator.vue index 1aea4ce5..be419c78 100644 --- a/src/components/charts/PlotIndicator.vue +++ b/src/components/charts/PlotIndicator.vue @@ -92,11 +92,11 @@ export default defineComponent({ Reset, }, props: { - value: { required: true, type: Object as () => Record }, + modelValue: { required: true, type: Object as () => Record }, columns: { required: true, type: Array as () => string[] }, addNew: { required: true, type: Boolean }, }, - emits: ['input'], + emits: ['update:modelValue'], setup(props, { emit }) { const selColor = ref(randomColor()); const graphType = ref(ChartType.line); @@ -127,7 +127,7 @@ export default defineComponent({ }; }); const emitIndicator = () => { - emit('input', combinedIndicator.value); + emit('update:modelValue', combinedIndicator.value); }; const clickCancel = () => { @@ -136,13 +136,13 @@ export default defineComponent({ }; watch( - () => props.value, + () => props.modelValue, () => { - [selAvailableIndicator.value] = Object.keys(props.value); + [selAvailableIndicator.value] = Object.keys(props.modelValue); cancelled.value = false; - if (selAvailableIndicator.value && props.value) { - selColor.value = props.value[selAvailableIndicator.value].color || randomColor(); - graphType.value = props.value[selAvailableIndicator.value].type || ChartType.line; + if (selAvailableIndicator.value && props.modelValue) { + selColor.value = props.modelValue[selAvailableIndicator.value].color || randomColor(); + graphType.value = props.modelValue[selAvailableIndicator.value].type || ChartType.line; } }, );