🎨 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"
>
<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 }}
</option>
</select>
@@ -77,14 +81,18 @@ const {
getUniqueValues
} = 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(() => {
if (!filterProperty.value) return [];
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() {
setFilter(filterProperty.value, filterValue.value, filterMode.value);