ant-design-vue/components/pagination/demo/itemRender.md

30 lines
545 B
Markdown
Raw Normal View History

2018-03-10 14:39:12 +00:00
<cn>
#### 上一步和下一步
修改上一步和下一步为文字链接。
</cn>
<us>
#### Prev and next
Use text link for prev and next button.
</us>
```html
<template>
<a-pagination :total="500" :itemRender="itemRender" />
</template>
<script>
export default {
methods: {
itemRender(current, type, originalElement) {
if (type === 'prev') {
return <a>Previous</a>;
} else if (type === 'next') {
return <a>Next</a>;
}
return originalElement;
}
}
}
</script>
```