Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2025-11-20 17:51:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f52131e3529c67b3dec9daaf589eed24c87b274a
f52131e3
1 parent
5fc7e825
fix(PaginationField): 修复最后一页时上一页按钮显示逻辑
最后一页时根据 submitButton.is_back 控制上一页按钮的显示,保持逻辑一致性
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
src/components/PaginationField/index.vue
src/components/PaginationField/index.vue
View file @
f52131e
...
...
@@ -39,7 +39,15 @@ const props = defineProps({
const emit = defineEmits(['prev', 'next', 'submit'])
const showPrev = computed(() => props.current > 0)
/**
* @description 是否显示上一页按钮(最后一页且 is_back 为 false 时不显示)
* @returns {import('vue').ComputedRef<boolean>}
*/
const showPrev = computed(() => {
// 非最后一页按原逻辑显示;最后一页由 submitButton.is_back 控制显示与否
if (!showSubmit.value) return props.current > 0
return props.current > 0 && props.submitButton?.is_back !== false
})
const showNext = computed(() => props.current < props.total - 1)
const showSubmit = computed(() => props.current === props.total - 1)
...
...
Please
register
or
login
to post a comment