feat: use withDefaults for ProjectCardGrid
This commit is contained in:
parent
daeefeb487
commit
479b786761
@ -11,24 +11,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {computed, type PropType} from 'vue'
|
import {computed} from 'vue'
|
||||||
import type {IProject} from '@/modelTypes/IProject'
|
import type {IProject} from '@/modelTypes/IProject'
|
||||||
|
|
||||||
import ProjectCard from './ProjectCard.vue'
|
import ProjectCard from './ProjectCard.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = withDefaults(defineProps<{
|
||||||
projects: {
|
projects: IProject[],
|
||||||
type: Array as PropType<IProject[]>,
|
showArchived?: boolean,
|
||||||
default: () => [],
|
itemLimit?: boolean
|
||||||
},
|
}>(), {
|
||||||
showArchived: {
|
projects: () => [],
|
||||||
default: false,
|
showArchived: false,
|
||||||
type: Boolean,
|
itemLimit: false,
|
||||||
},
|
|
||||||
itemLimit: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const filteredProjects = computed(() => {
|
const filteredProjects = computed(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user