change view of listview
This commit is contained in:
parent
144bc1d58e
commit
31c6410eba
|
@ -16,31 +16,31 @@
|
|||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<div class="q-pa-md">
|
||||
<q-card style="height: 70vh; max-width: 1800px" class="q-pa-md">
|
||||
<div ref="scrollDiv" class="scroll" style="height: 100%">
|
||||
<q-infinite-scroll :offset="250" @load="load">
|
||||
<q-list>
|
||||
<q-item id="bbb">
|
||||
<q-btn label="Ältere Veranstaltungen laden" @click="load(-1)" />
|
||||
</q-item>
|
||||
<template v-for="(events, index) in agendas" :key="index">
|
||||
<q-separator />
|
||||
<q-item-label overline>{{ index }}</q-item-label>
|
||||
<q-item v-for="(event, idx) in events" :key="idx"
|
||||
><event-slot :model-value="event" />{{ idx }}</q-item
|
||||
>
|
||||
</template>
|
||||
</q-list>
|
||||
<template #loading>
|
||||
<div class="row justify-center q-my-md">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
</template>
|
||||
</q-infinite-scroll>
|
||||
</div>
|
||||
</q-card>
|
||||
<!-- <div class="q-pa-md"> -->
|
||||
<!-- <q-card style="height: 70vh; max-width: 1800px" class="q-pa-md"> -->
|
||||
<div ref="scrollDiv" class="scroll" style="height: 100%">
|
||||
<q-infinite-scroll :offset="250" @load="load">
|
||||
<q-list>
|
||||
<q-item id="bbb">
|
||||
<q-btn label="Ältere Veranstaltungen laden" @click="load(-1)" />
|
||||
</q-item>
|
||||
<template v-for="(events, index) in agendas" :key="index">
|
||||
<q-separator />
|
||||
<q-item-label header>{{ asDate(index) }}</q-item-label>
|
||||
<q-item v-for="(event, idx) in events" :key="idx">
|
||||
<event-slot :model-value="event" />
|
||||
</q-item>
|
||||
</template>
|
||||
</q-list>
|
||||
<template #loading>
|
||||
<div class="row justify-center q-my-md">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
</template>
|
||||
</q-infinite-scroll>
|
||||
</div>
|
||||
<!-- </q-card> -->
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -157,6 +157,15 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
|
||||
function asDate(value: string) {
|
||||
if (value) {
|
||||
const year = parseInt(value.substring(0, 4));
|
||||
const month = parseInt(value.substring(4, 6)) - 1;
|
||||
const day = parseInt(value.substring(6, 8));
|
||||
return date.formatDate(new Date(year, month, day), 'DD.MM.YYYY');
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
agendas,
|
||||
asYear,
|
||||
|
@ -167,6 +176,7 @@ export default defineComponent({
|
|||
editDone,
|
||||
load,
|
||||
remove,
|
||||
asDate,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue