wip: migrate paging components to composition api

This commit is contained in:
syuilo
2022-01-10 00:45:20 +09:00
parent d3315bda11
commit f9882a0c5c
4 changed files with 52 additions and 17 deletions

View File

@ -32,8 +32,7 @@ const props = defineProps<{
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
const updated = (oldValue, newValue) => {
const i = pagingComponent.value.items.findIndex(n => n === oldValue);
pagingComponent.value.items[i] = newValue;
pagingComponent.value?.updateItem(oldValue.id, () => newValue);
};
defineExpose({