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 6598135bb6baba9c9316db6c35ee6212af351ce3
6 changes: 3 additions & 3 deletions web/src/render/components/MainRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useSurveyStore } from '../stores/survey'

const surveyStore = useSurveyStore()
const questionStore = useQuestionStore()
const { renderData, needHideFields, showLogicHideFields } = storeToRefs(questionStore)
const { renderData, needHideFields, showLogicHideFields, isFinallyPage } = storeToRefs(questionStore)


const { rules, formValues } = storeToRefs(surveyStore)
Expand All @@ -34,15 +34,15 @@ const handleChangeData = (data: any) => {
watch(() => renderData.value, (value: any) => {
if(value.length ){
const displaylist = value[0].filter((item: any) => !needHideFields.value.includes(item.field))
if(displaylist.length === 0){
if(displaylist.length === 0 && !isFinallyPage.value){
questionStore.addPageIndex()
}
}
})
watch(() => { return needHideFields.value.concat(showLogicHideFields.value) }, (value: any)=> {
if(renderData.value.length ){
const displaylist = renderData.value[0].filter((item: any) => !value.includes(item.field))
if(displaylist.length === 0){
if(displaylist.length === 0 && !isFinallyPage.value){
questionStore.addPageIndex()
}
}
Expand Down