wip: refactor(client): migrate paging components to composition api

This commit is contained in:
syuilo
2022-01-14 10:25:51 +09:00
parent 27778f839a
commit 28193f12ca
14 changed files with 791 additions and 1596 deletions

View File

@@ -10,7 +10,7 @@
<template #default="{ items }">
<XList v-slot="{ item }" :items="items" :direction="'down'" :no-gap="false" :ad="false">
<XNote :key="item.id" :note="item.note" :class="$style.note" @update:note="noteUpdated(item, $event)"/>
<XNote :key="item.id" :note="item.note" :class="$style.note"/>
</XList>
</template>
</MkPagination>
@@ -32,13 +32,6 @@ const pagination = {
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
const noteUpdated = (item, note) => {
pagingComponent.value?.updateItem(item.id, old => ({
...old,
note: note,
}));
};
defineExpose({
[symbols.PAGE_INFO]: {
title: i18n.locale.favorites,
@@ -53,4 +46,4 @@ defineExpose({
background: var(--panel);
border-radius: var(--radius);
}
</style>
</style>