Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 缺陷修复回流 #466

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
fix: 修复分页下没有题目则跳过分页
  • Loading branch information
taoshuang committed Dec 31, 2024
commit e422718ab4d04d3bb222b3ca87da19bdf761634a
8 changes: 7 additions & 1 deletion web/src/render/stores/question.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ export const useQuestionStore = defineStore('question', () => {
const { startIndex, endIndex } = getSorter()
const data = questionList.value[0]
if (!data || !Array.isArray(data) || data.length === 0) return []
return [data.slice(startIndex, endIndex)]
const list = [data.slice(startIndex, endIndex)]
const displaylist = list[0].filter(item => !needHideFields.value.includes(item.field))

if (displaylist.length === 0 && !isFinallyPage.value) {
addPageIndex()
}
return list
})

const isFinallyPage = computed(() => {
Expand Down