Blame view

src/components/pagination/pagination.vue 782 Bytes
simon committed
1 2 3

<template>
	<div class="comp">
simon committed
4
		<div class="pagination gird-g">
simon committed
5 6 7 8 9 10 11 12 13
			<span class="pointer" :class="{'disabled' : cur == 1}">
				<a @click="prevPage()">上一页</a>
			</span>
			<span @click="selPage(index)" class="page-num pointer" v-for="(index,idx) in indexs" :key="idx" v-bind:class="{ 'active': cur == index}">
				<a>{{index}}</a>
			</span>
			<span class="pointer" :class="{'disabled' : cur == total}">
				<a @click="nextPage()">下一页</a>
			</span>
simon committed
14

simon committed
15 16 17 18 19 20 21 22 23 24 25 26
			<span></span>
			<input v-model="sel" class="ipt" :placeholder="cur" type="text">
			<span>/ {{total}}</span>
			<span @click="jumpPage" class="jump pointer">跳转</span>
		</div>
	</div>
</template>

<script src="./pagination.js"></script>
<style lang="scss" scoped>
@import "./pagination.scss";
</style>