Page.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: $color !important;
  11. }
  12. }
  13. </style>
  14. <template>
  15. <el-pagination
  16. @current-change="getData"
  17. background :page-size='20'
  18. @size-change="handleSizeChange"
  19. :page-sizes="[1,20, 30, 40, 50,60,70,80,90,100]"
  20. layout="sizes,total,prev, pager, next"
  21. :total="total">
  22. </el-pagination>
  23. </template>
  24. <script>
  25. export default {
  26. data(){
  27. return{
  28. page:1
  29. }
  30. },
  31. props: {
  32. total:'',
  33. },
  34. methods:{
  35. getData(type){
  36. // if(type == 1){
  37. // this.data.pageNumber=this.data.pageNumber-1
  38. // }else if(type == 2){
  39. // this.data.pageNumber=this.data.pageNumber+1
  40. // }
  41. this.page=type
  42. this.$emit('pageChange')
  43. },
  44. handleSizeChange(val){
  45. this.$emit('pageChange',val)
  46. }
  47. }
  48. }
  49. </script>