wip: refactor(client): migrate paging components to composition api
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
<template #default="{ items: notes }">
|
||||
<div class="giivymft" :class="{ noGap }">
|
||||
<XList ref="notes" v-slot="{ item: note }" :items="notes" :direction="pagination.reversed ? 'up' : 'down'" :reversed="pagination.reversed" :no-gap="noGap" :ad="true" class="notes">
|
||||
<XNote :key="note._featuredId_ || note._prId_ || note.id" class="qtqtichx" :note="note" @update:note="updated(note, $event)"/>
|
||||
<XNote :key="note._featuredId_ || note._prId_ || note.id" class="qtqtichx" :note="note"/>
|
||||
</XList>
|
||||
</div>
|
||||
</template>
|
||||
@ -31,10 +31,6 @@ const props = defineProps<{
|
||||
|
||||
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
||||
|
||||
const updated = (oldValue, newValue) => {
|
||||
pagingComponent.value?.updateItem(oldValue.id, () => newValue);
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
prepend: (note) => {
|
||||
pagingComponent.value?.prepend(note);
|
||||
|
Reference in New Issue
Block a user