wip: migrate paging components to composition api
This commit is contained in:
parent
586c11251a
commit
d3315bda11
2 changed files with 131 additions and 168 deletions
|
|
@ -59,6 +59,10 @@ const props = withDefaults(defineProps<{
|
|||
displayLimit: 30,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'queue', count: number): void;
|
||||
}>();
|
||||
|
||||
const rootEl = ref<HTMLElement>();
|
||||
const items = ref([]);
|
||||
const queue = ref([]);
|
||||
|
|
@ -235,7 +239,7 @@ const append = (item) => {
|
|||
watch(props.pagination.params, init, { deep: true });
|
||||
watch(queue, (a, b) => {
|
||||
if (a.length === 0 && b.length === 0) return;
|
||||
this.$emit('queue', queue.value.length);
|
||||
emit('queue', queue.value.length);
|
||||
}, { deep: true });
|
||||
|
||||
init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue