🎨 Refactor components to use modular structure and computed properties for improved maintainability and reusability in Gamemaster Explorer and FilterPanel

This commit is contained in:
2026-01-29 04:02:13 +00:00
parent 6cce9ba646
commit 4c50f296fc
2 changed files with 35 additions and 203 deletions

View File

@@ -64,9 +64,16 @@ const props = defineProps({
data: {
type: Array,
default: () => []
},
filterState: {
type: Object,
default: null
}
});
const internalFilterState = useJsonFilter();
const activeFilterState = computed(() => props.filterState || internalFilterState);
const {
filterProperty,
filterValue,
@@ -79,7 +86,7 @@ const {
setFilter,
clearFilters,
getUniqueValues
} = useJsonFilter();
} = activeFilterState.value;
const hasData = computed(
() => Array.isArray(props.data) && props.data.length > 0