Page.vue 970 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <style lang="scss">
  2. @import '../style/style.scss';
  3. .el-pagination{
  4. li,button{
  5. border: 1px solid #CACACA !important;
  6. background-color: #fff !important;
  7. }
  8. .active{
  9. border:none !important;
  10. background: $mainColor !important;
  11. }
  12. }
  13. </style>
  14. <template>
  15. <el-pagination
  16. @current-change="getData"
  17. background :page-size='20'
  18. layout="total,prev, pager, next"
  19. :total="total">
  20. </el-pagination>
  21. </template>
  22. <script>
  23. export default {
  24. data(){
  25. return{
  26. page:1
  27. }
  28. },
  29. props: {
  30. total:'',
  31. },
  32. methods:{
  33. getData(type){
  34. // if(type == 1){
  35. // this.data.pageNumber=this.data.pageNumber-1
  36. // }else if(type == 2){
  37. // this.data.pageNumber=this.data.pageNumber+1
  38. // }
  39. this.page=type
  40. this.$emit('pageChange')
  41. }
  42. }
  43. }
  44. </script>