<script setup lang="ts">
import { ref } from 'vue'
const emit:any = defineEmits([]);
const props = defineProps({
  data: Object,
});
const data = ref({})
data.value = props.data
function handleCurrentChange(val:number) {
    emit("pagination", val);
    data.value.count = val
}
</script>
<template>
       <div class="news-content-section pt-60" v-if="data.total">
            <div class="container">
                <div class="row newBox">
                    <div class="col-lg-12 col-md-12 content" >
                        <div  class="page mt-30 mb-30">
                            <div class="d-flex justify-content-center align-items-end cannot_selected" style="position:relative">
                                <div class="page-des align-items-start cannot_selected">共<span> {{ Math.ceil(data.total / data.size)}}</span>页，共<span> {{data.total}}</span>条信息</div>
                                <el-pagination 
                                    prev-text="上一页" 
                                    next-text='下一页' 
                                    :page-size="data.size" 
                                    :current-page="data.count" 
                                    background layout="prev, pager, next"
                                    :total="data.total" 
                                    @current-change="handleCurrentChange"
                                    >
                                </el-pagination>
                                <div class="page-des2 align-items-end cannot_selected pc">前往第
                                    <input v-model="data.count" class="previous" @change="currentChange" /> 页
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
</template>
<style lang="scss" scoped>

</style>
