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

[Bug Report] 在Vue2中使用@formily/element有问题 #4138

Open
1 task
GpingFeng opened this issue Apr 28, 2024 · 4 comments
Open
1 task

[Bug Report] 在Vue2中使用@formily/element有问题 #4138

GpingFeng opened this issue Apr 28, 2024 · 4 comments

Comments

@GpingFeng
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开控制台,控制台报错,页面无法展示。

What is expected?

期望能够正常展示

What is actually happening?

控制台报错,页面无法展示。

Package

@formily/element@2.2.19


怀疑是 @vue/composition-api 的问题?或者是哪个版本不兼容的问题?

@GpingFeng
Copy link
Author

GpingFeng commented Apr 28, 2024

上面示例的报错:

image

我项目中的报错:(我理解也是同一个问题?)
image

@GpingFeng
Copy link
Author

我在项目中将 Vue.use(VueCompositionAPI) 去掉,发现标签页可以渲染。但 JSON Schema 不能渲染。也就是这个问题

然后我看了一下源码,发现 @formily/vue 中的 ReactiveField 组件中这里的 field 是空的(直接就是 undefined),所以导致了没有渲染

image

@GpingFeng
Copy link
Author

看到是由这个组件注入的,但发现这个组件并没有执行。。。。

image

但实际中又是渲染了

image

@GpingFeng
Copy link
Author

GpingFeng commented May 4, 2024

已找到问题,是因为公司内部源没有及时同步 @formily/element 版本,导致版本不对导致。

这个问题可以 Close 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant