feat(Pagination): pagination item custom render (#7222)
* feat(Pagination): pagination item custom render * fix(Pagination): fix test result * fix(Pagination): expose page object directly
This commit is contained in:
@@ -31,6 +31,22 @@
|
||||
:next-text="t('nextText')"
|
||||
/>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="t('title4')">
|
||||
<van-pagination
|
||||
v-model="currentPage4"
|
||||
:total-items="125"
|
||||
:show-page-size="5"
|
||||
>
|
||||
<template #prev-text>
|
||||
<van-icon name="arrow-left" />
|
||||
</template>
|
||||
<template #next-text>
|
||||
<van-icon name="arrow" />
|
||||
</template>
|
||||
<template #page="{ text }">{{ text }}</template>
|
||||
</van-pagination>
|
||||
</demo-block>
|
||||
</demo-section>
|
||||
</template>
|
||||
|
||||
@@ -40,12 +56,14 @@ export default {
|
||||
'zh-CN': {
|
||||
title2: '简单模式',
|
||||
title3: '显示省略号',
|
||||
title4: '自定义渲染',
|
||||
prevText: '上一页',
|
||||
nextText: '下一页',
|
||||
},
|
||||
'en-US': {
|
||||
title2: 'Simple Mode',
|
||||
title3: 'Show ellipses',
|
||||
title4: 'Custom Render',
|
||||
prevText: 'Prev',
|
||||
nextText: 'Next',
|
||||
},
|
||||
@@ -56,6 +74,7 @@ export default {
|
||||
currentPage1: 1,
|
||||
currentPage2: 1,
|
||||
currentPage3: 1,
|
||||
currentPage4: 1,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user