🎨 Improve code readability by reformatting template and computed properties

This commit is contained in:
2026-01-29 03:56:40 +00:00
parent 139c58cdae
commit 2945042d34

View File

@@ -8,7 +8,11 @@
@change="applyFilter" @change="applyFilter"
> >
<option value="">All Properties</option> <option value="">All Properties</option>
<option v-for="path in availablePaths" :key="path.path" :value="path.path"> <option
v-for="path in availablePaths"
:key="path.path"
:value="path.path"
>
{{ path.breadcrumb }} {{ path.breadcrumb }}
</option> </option>
</select> </select>
@@ -77,14 +81,18 @@ const {
getUniqueValues getUniqueValues
} = useJsonFilter(); } = useJsonFilter();
const hasData = computed(() => Array.isArray(props.data) && props.data.length > 0); const hasData = computed(
() => Array.isArray(props.data) && props.data.length > 0
);
const valueSuggestions = computed(() => { const valueSuggestions = computed(() => {
if (!filterProperty.value) return []; if (!filterProperty.value) return [];
return getUniqueValues(filterProperty.value).slice(0, 50); return getUniqueValues(filterProperty.value).slice(0, 50);
}); });
const valueListId = computed(() => `filter-values-${filterProperty.value || 'all'}`); const valueListId = computed(
() => `filter-values-${filterProperty.value || 'all'}`
);
function applyFilter() { function applyFilter() {
setFilter(filterProperty.value, filterValue.value, filterMode.value); setFilter(filterProperty.value, filterValue.value, filterMode.value);