👑 [需求] 统一 Table,Descriptions,Form 的 Schema,新增抽象组件 #6149
tolerance-go
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🥰 需求描述
现在的组件很方便,可以再方便一点!
🧐 解决方案
名字我觉得可以叫做 IOComponent,用 type 做区分
可以提供一个 createSchemaItem 来创建最小的 schema item,我试过用 JSX 语法来封装,发现要想取值(pick props)方便就很难做组件封装,封装组件可以抽象业务,而且 JSX 语法可以有自己的状态和生命周期,但是其实这些想想是都可以用自定义对象实现的,所以我觉得用一个工厂方法代替 JSX 会简单好操作一些
🚑 其他信息
Beta Was this translation helpful? Give feedback.
All reactions