trying this again without blowing away the very pretty styling

This commit is contained in:
Scott Bell 2024-09-05 09:34:34 +02:00
parent 02cf70135e
commit 9aeb454fb6

View File

@ -26,10 +26,16 @@
<div class="c-cs__content c-cs__current-output-value">
<span class="c-cs__current-output-value__label">Current Output</span>
<span class="c-cs__current-output-value__value" aria-label="Current Output Value">
<template v-if="testDataApplied && currentTestOutput">
<template
v-if="testDataApplied && currentTestOutput !== undefined && currentTestOutput !== null"
>
{{ currentTestOutput }}
</template>
<template v-else-if="currentCompOutput && !testDataApplied">
<template
v-else-if="
!testDataApplied && currentCompOutput !== undefined && currentCompOutput !== null
"
>
{{ currentCompOutput }}
</template>
<template v-else> --- </template>
@ -136,7 +142,7 @@
<script setup>
import { evaluate } from 'mathjs';
import { inject, onBeforeMount, onBeforeUnmount, ref } from 'vue';
import { inject, onBeforeMount, onBeforeUnmount, ref, watch } from 'vue';
import ObjectPathString from '../../../ui/components/ObjectPathString.vue';
import CompsManager from '../CompsManager';
@ -155,7 +161,7 @@ const outputFormat = ref(null);
let outputTelemetryCollection;
defineProps({
const props = defineProps({
isEditing: {
type: Boolean,
required: true
@ -182,6 +188,16 @@ onBeforeUnmount(() => {
outputTelemetryCollection.destroy();
});
watch(
() => props.isEditing,
(editMode) => {
console.debug(`📢 Edit mode is: ${editMode}`);
if (!editMode) {
testDataApplied.value = false;
}
}
);
function reloadParameters() {
parameters.value = compsManager.getParameters();
domainObject.configuration.comps.parameters = parameters.value;