const SaPagination = { template: ` `, emit: ['update:modelValue', 'pagination-change'], props: { modelValue: { type: Object, default: { page: 1, list_rows: 10, total: 0, } } }, setup(props, { emit }) { const { ref } = Vue const paginationData = ref(props.modelValue) function onChangeSize(e) { paginationData.value.list_rows = e emit('update:modelValue', paginationData.value) emit('pagination-change') } function onChangeCurrent(e) { paginationData.value.page = e emit('update:modelValue', paginationData.value) emit('pagination-change') } return { paginationData, onChangeSize, onChangeCurrent } } }