emit "init" event from MkPagination
This commit is contained in:
parent
8f14fec45b
commit
2a11c1ecf6
@ -104,6 +104,7 @@ const props = withDefaults(defineProps<{
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'queue', count: number): void;
|
(ev: 'queue', count: number): void;
|
||||||
(ev: 'status', error: boolean): void;
|
(ev: 'status', error: boolean): void;
|
||||||
|
(ev: 'init'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const rootEl = shallowRef<HTMLElement>();
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
@ -232,6 +233,8 @@ async function init(): Promise<void> {
|
|||||||
offset.value = res.length;
|
offset.value = res.length;
|
||||||
error.value = false;
|
error.value = false;
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
|
|
||||||
|
emit('init');
|
||||||
}, err => {
|
}, err => {
|
||||||
error.value = true;
|
error.value = true;
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user