Decomposed the main SearchResultView into smaller, reusable components under 'src/components/SearchResult/' to improve maintainability and scalability. - Added specific components for different result types like SummaryCard, AdditiveList, MaterialCard, and PrepackagedList. - Updated 'router/index.ts' to reflect the new structure. - Included project planning and proposal documents in 'project_document/'.
34 lines
598 B
Vue
34 lines
598 B
Vue
<template>
|
|
<div class="list-container">
|
|
<MaterialCard
|
|
v-for="item in items"
|
|
:key="item.id"
|
|
:item="item"
|
|
@click="onItemClick(item)"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import MaterialCard from './MaterialCard.vue';
|
|
|
|
const props = defineProps({
|
|
items: {
|
|
type: Array as () => any[],
|
|
required: true,
|
|
default: () => []
|
|
}
|
|
});
|
|
|
|
const emit = defineEmits(['item-click']);
|
|
|
|
const onItemClick = (item: any) => {
|
|
emit('item-click', item);
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.list-container {
|
|
/* Styles for the list container if needed */
|
|
}
|
|
</style> |