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

之前创建的问卷,启用预览报错 #277

Closed
Cxiaohuiyang opened this issue Jun 12, 2024 · 1 comment
Closed

之前创建的问卷,启用预览报错 #277

Cxiaohuiyang opened this issue Jun 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Cxiaohuiyang
Copy link

Cxiaohuiyang commented Jun 12, 2024

分类

前端

系统

    Uncaught (in promise) TypeError: Cannot convert undefined or null to object
          at Function.keys (<anonymous>)
          at QuestionWrapper.vue:62:12
          at ReactiveEffect.fn (chunk-GLFS4MB4.js?v=ccac3a66:1615:17)
          at ReactiveEffect.run (chunk-GLFS4MB4.js?v=ccac3a66:1410:23)
          at get value (chunk-GLFS4MB4.js?v=ccac3a66:1627:111)
          at unref (chunk-GLFS4MB4.js?v=ccac3a66:1252:29)
          at Object.get (chunk-GLFS4MB4.js?v=ccac3a66:1676:39)
          at Proxy._sfc_render (QuestionWrapper.vue:5:20)
          at renderComponentRoot (chunk-GLFS4MB4.js?v=ccac3a66:2494:17)
          at ReactiveEffect.componentUpdateFn [as fn] (chunk-GLFS4MB4.js?v=ccac3a66:6834:46) 

复现步骤

 之前创建的问卷,启用问卷预览的时候提示错误

看了源码 : 老的问卷没有 rangeConfig: {}、建议把 QuestionWrapper.vue 文件中第61行新增判断改为

if (
       QUESTION_TYPE.RATES.includes(type) &&
       rest.rangeConfig &&
     Object.keys(rest.rangeConfig).filter((index) => rest.rangeConfig[index].isShowInput).length > 0
) {
        let { rangeConfig, othersValue } = useShowInput(field)
        moduleConfig.rangeConfig = unref(rangeConfig)
        moduleConfig.othersValue = unref(othersValue)
}
@sudoooooo sudoooooo added the bug Something isn't working label Jun 12, 2024
@sudoooooo
Copy link
Collaborator

@Cxiaohuiyang 感谢反馈,已fix:a7fa5778378efaad5a41d7b5c9730e46e94bc120。
issue先关闭了,欢迎提交更多反馈🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants