- Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPageNav.vue
65 lines (61 loc) · 1.22 KB
/
PageNav.vue
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
<template>
<component:is="tag":class="className"@click="wave">
<av-if="prev"class="page-link"href="#"aria-label="Previous">
<spanaria-hidden="true">«</span>
<spanclass="sr-only">Previous</span>
</a>
<av-if="next"class="page-link"href="#"aria-label="Next">
<spanaria-hidden="true">»</span>
<spanclass="sr-only">Next</span>
</a>
</component>
</template>
<script>
importwavesfrom'../../mixins/waves';
constPageNav= {
props: {
tag: {
type:String,
default:"li"
},
active: {
type:Boolean,
default:false
},
disabled: {
type:Boolean,
default:false
},
href: {
type:String
},
waves: {
type:Boolean,
default:true
},
prev: {
type:Boolean,
default:false
},
next: {
type:Boolean,
default:false
}
},
computed: {
className() {
return [
'page-item',
this.active?'active':false,
this.disabled?'disabled':false,
this.waves?'ripple-parent':false
];
}
},
mixins: [waves]
};
exportdefaultPageNav;
export { PageNavasmdbPageNav };
</script>
<style scoped>
</style>