forked from Wroclaw/WorkshopTasker
Initial commit
This commit is contained in:
commit
1e63e008af
48 changed files with 12715 additions and 0 deletions
34
components/pagedList.vue
Normal file
34
components/pagedList.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
records: Array<any>,
|
||||
recordKey: string,
|
||||
variant?: "default" | "inset" | "accordion" | "popout",
|
||||
modelValue?: any,
|
||||
}>();
|
||||
|
||||
// eslint-disable-next-line func-call-spacing
|
||||
defineEmits<{
|
||||
(e: "update:modelValue", value: typeof props.modelValue): void,
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VExpansionPanels
|
||||
multiple
|
||||
:v-model="modelValue"
|
||||
@update:model-value="(e: any) => $emit('update:modelValue', e)"
|
||||
>
|
||||
<VExpansionPanel
|
||||
v-for="record in records"
|
||||
:key="record[recordKey]"
|
||||
:variant="props.variant ?? 'default'"
|
||||
>
|
||||
<template #title>
|
||||
<slot name="title" :record="record" />
|
||||
</template>
|
||||
<template #text>
|
||||
<slot name="text" :record="record" />
|
||||
</template>
|
||||
</VExpansionPanel>
|
||||
</VExpansionPanels>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue