reactjs - react-jsonschema-form 的多列支持
解决方案
我找到了一个不是我喜欢的解决方案:
const ObjectFieldTemplate = (props: ObjectFieldTemplateProps) => {
return (
<div>
{props.title}
{props.description}
{props.properties.map(element => {
return <div className="property-wrapper">{element.content}</div>
})}
</div>
);
}
<Form ObjectFieldTemplate={ObjectFieldTemplate}>
调查了几个小时的谷歌搜索,我找到了另一个解决方案:
const uiSchema = {
"email": {
"ui:widget": "email",
'ui:column': 'xs6'
},
"password": {
"ui:widget": "password",
'ui:column': 'xs6'
}
};
这里的问题: ui:coumn: xs6 仅适用于引导主题。因为我使用的是材料 ui,所以不能使用这种方法,或者我错过了一些东西来让它运行。
对于更多或更好的解决方案,我真的很喜欢
推荐阅读
- abap - 比 CL_GUI_BTFEDITOR 性能更高的富文本控件?
- xml - Ontology OWL 从 Excel 导入 XML
- php - PHP:如何使用 preg_split 和匹配数据类型
- java - 与 intersectLinePolygon 相交的多边形和线行为不正常
- ios - 使用 UICollectionView 观察领域 - 竞争条件
- java - 无法将元素扫描到数组中
- c# - 从 StreamingAssets 文件夹读取/加载图像文件
- css - @font-face 不工作:(
- xslt - XSLT 2.0 重新格式化日期
- spring - Spring Boot 2 - 未找到安全标签库,java jsp 中的标签库版本错误