1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
| <template>
| <div class="paginatio">
| <el-icon
| ><ArrowLeft
| class="page-btn"
| :disabled="noPre || pageNum == 1"
| v-click="()=>setChangePageNum('pre')"
| /></el-icon>
| <div class="pageNum">
| {{ pageNum }}
| </div>
|
| <el-icon
| ><ArrowRight
| class="page-btn"
| :disabled="noNext"
| v-click="()=>setChangePageNum('next')"
| /></el-icon>
| </div>
| </template>
|
| <script setup>
| import { ArrowLeft, ArrowRight } from "@element-plus/icons-vue";
| const emit = defineEmits('changePageNum')
| const props = defineProps({
| noNext: {
| type: Boolean,
| },
| noPre: {
| type: Boolean,
| },
| pageNum: {
| type: Number,
| default: 1,
| },
| // changePageNum: {
| // type: Function,
| // },
| });
|
| const setChangePageNum = (type)=>{
| emit('changePageNum',type)
| }
| </script>
| <style lang="scss" scoped>
| .pagitation-wrapper {
| color: #fff;
| .page-btn {
| background: #2c3138 !important;
| color: #fff !important;
| cursor: pointer;
| }
| }
| .paginatio {
| display: flex;
| justify-content: center;
| align-items: center;
| font-size: 16px;
| font-weight: bold;
| }
|
| .paginatio .pageNum {
| margin: 0 15px;
| position: relative;
| }
|
| .paginatio .page-btn {
| background: #ececec;
| color: #000;
| cursor: pointer;
| }
| </style>
|
|