This commit is contained in:
philipp lang 2024-07-15 16:59:29 +02:00
parent bf1388dbd9
commit 158cd2d352
1 changed files with 23 additions and 20 deletions

View File

@ -53,7 +53,7 @@
</div> </div>
</template> </template>
<script lang="js" setup> <script setup>
import {ref, inject, computed} from 'vue'; import {ref, inject, computed} from 'vue';
const axios = inject('axios'); const axios = inject('axios');
const emit = defineEmits(['update:modelValue']); const emit = defineEmits(['update:modelValue']);
@ -70,7 +70,7 @@ const props = defineProps({
id: { id: {
required: true, required: true,
type: String, type: String,
} },
}); });
const comparatorOptions = ref([ const comparatorOptions = ref([
@ -144,14 +144,17 @@ const fieldOptions = computed(() =>
); );
function addCondition() { function addCondition() {
emit('update:modelValue', {...props.modelValue, ifs: [ emit('update:modelValue', {
...props.modelValue,
ifs: [
...props.modelValue.ifs, ...props.modelValue.ifs,
{ {
field: null, field: null,
comparator: null, comparator: null,
value: null, value: null,
} },
]}); ],
});
} }
const locked = ref(false); const locked = ref(false);