visibility fix

This commit is contained in:
2023-02-14 23:03:37 +01:00
parent 81e4fe8e95
commit 9f0c08813f

View File

@@ -11,7 +11,7 @@ defineProps(['query', 'queryOptions', 'i18n']);
defineEmits(['update:query', 'update:queryOptions']);
const level = ref(0);
const isVisible = ref(true);
</script>
<template>
@@ -23,12 +23,12 @@ const level = ref(0);
<div class="flex items-center justify-between border-b bg-red-300">
<div class="p-3 text-gray-700 text-lg font-bold">Query Builder</div>
<div class="p-3 flex">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> v-if="!isVisible"</svg>
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path> v-else </svg>
<svg v-if="!isVisible" @click="isVisible = true" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>
<svg v-else @click="isVisible = false" class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg>
</div>
</div>
<JsonQueryBuilderGroup :currentQuery="query" :queryOptions="queryOptions" :level="level+1"> </JsonQueryBuilderGroup>
<JsonQueryBuilderGroup v-if="isVisible" :currentQuery="query" :queryOptions="queryOptions" :level="level+1"> </JsonQueryBuilderGroup>
<div class="h-50 w-full rounded-lg bg-white ">
<!-- Header -->