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

关于 uform 的自定义布局(DOM 嵌套) #41

Closed
liuyiliuyi opened this issue May 7, 2019 · 5 comments
Closed

关于 uform 的自定义布局(DOM 嵌套) #41

liuyiliuyi opened this issue May 7, 2019 · 5 comments

Comments

@liuyiliuyi
Copy link

Help us to manage our issues by answering the following:

  1. How would you tag this issue?
  • Question
  1. Describe your issue:
  • 由于使用中的项目需要自定义布局,而不使用 uform 的布局结构,想给 Field 组件添加父节点,通过该父节点给 Field 定位
  • 但是在使用中发现,是存在问题的,该父节点会被独立出来并至于 form 元素的最底部,不再是嵌套的关系,即我希望的自定义布局失效了
  1. 复现地址
    20190507100440
@liuyiliuyi liuyiliuyi changed the title 关于 uform 关于 uform 的自定义布局 May 7, 2019
@liuyiliuyi liuyiliuyi changed the title 关于 uform 的自定义布局 关于 uform 的自定义布局(DOM 嵌套) May 7, 2019
@janryWang
Copy link
Collaborator

JSchema是不允许直接写dom标签的,只能通过https://alibaba.github.io/uform/#/97UlUl/3wF9F5UnUJ 该API来创建自定义布局组件,这样对于纯Schema数据驱动渲染表单的场景也是适用的,请了解我们的出发点

@liuyiliuyi
Copy link
Author

@janryWang 因为我自己实现了基于 next/Form 可视化拖拽生成表单的组件,有自己的 scheme ,该布局无法通过 createVirtualBox 定义,想问下有没有方法可以绕过该限制,按书写顺序正常渲染为 form 的子元素。

@liuyiliuyi
Copy link
Author

@janryWang 顺便问下可以建一个 钉钉群 吗,方便咨询,谢谢了 😁

@janryWang
Copy link
Collaborator

@janryWang 因为我自己实现了基于 next/Form 可视化拖拽生成表单的组件,有自己的 scheme ,该布局无法通过 createVirtualBox 定义,想问下有没有方法可以绕过该限制,按书写顺序正常渲染为 form 的子元素。

您可以通过 https://alibaba.github.io/uform/#/97UlUl/Roc5cniDiy 该API实现公共的拖拽容器(HOC),然后每次生成新的json-schema传给uform做渲染

@janryWang
Copy link
Collaborator

@janryWang 顺便问下可以建一个 钉钉群 吗,方便咨询,谢谢了 😁

image
刚建的微信群,欢迎加入

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

2 participants