const props = withDefaults(defineProps(), { pageSizes: () => [20, 50, 100], disabled: false }); const emit = defineEmits(); const pageCount = () => Math.max(1, Math.ceil(props.total / props.pageSize)); function move(page) { emit('pageChange', { page: Math.min(Math.max(1, page), pageCount()), pageSize: props.pageSize }); } function size(event) { emit('pageChange', { page: 1, pageSize: Number(event.target.value) }); } const __VLS_defaults = { pageSizes: () => [20, 50, 100], disabled: false }; const __VLS_ctx = { ...{}, ...{}, ...{}, ...{}, ...{}, }; let __VLS_components; let __VLS_intrinsics; let __VLS_directives; __VLS_asFunctionalElement1(__VLS_intrinsics.nav, __VLS_intrinsics.nav)({ ...{ class: "ks-paginator" }, 'aria-label': "목록 페이지", }); /** @type {__VLS_StyleScopedClasses['ks-paginator']} */ ; __VLS_asFunctionalElement1(__VLS_intrinsics.button, __VLS_intrinsics.button)({ ...{ onClick: (...[$event]) => { return (__VLS_ctx.move(__VLS_ctx.page - 1)); // @ts-ignore [move, page,]; } }, type: "button", disabled: (__VLS_ctx.disabled || __VLS_ctx.page <= 1), }); __VLS_asFunctionalElement1(__VLS_intrinsics.span, __VLS_intrinsics.span)({}); (__VLS_ctx.page); (__VLS_ctx.pageCount()); (__VLS_ctx.total); __VLS_asFunctionalElement1(__VLS_intrinsics.button, __VLS_intrinsics.button)({ ...{ onClick: (...[$event]) => { return (__VLS_ctx.move(__VLS_ctx.page + 1)); // @ts-ignore [move, page, page, page, disabled, pageCount, total,]; } }, type: "button", disabled: (__VLS_ctx.disabled || __VLS_ctx.page >= __VLS_ctx.pageCount()), }); __VLS_asFunctionalElement1(__VLS_intrinsics.label, __VLS_intrinsics.label)({}); __VLS_asFunctionalElement1(__VLS_intrinsics.select, __VLS_intrinsics.select)({ ...{ onChange: (__VLS_ctx.size) }, value: (__VLS_ctx.pageSize), disabled: (__VLS_ctx.disabled), }); for (const [item] of __VLS_vFor((__VLS_ctx.pageSizes))) { __VLS_asFunctionalElement1(__VLS_intrinsics.option, __VLS_intrinsics.option)({ key: (item), value: (item), }); (item); // @ts-ignore [page, disabled, disabled, pageCount, size, pageSize, pageSizes,]; } // @ts-ignore []; const __VLS_export = (await import('vue')).defineComponent({ __typeEmits: {}, __typeProps: {}, props: {}, }); export default {};