我发现了很多npm包,例如x-render,react-jsonschema-form,可以帮助制作表单,但我想编辑表ui中的数据。示例如下:
{
$schema: 'http://json-schema.org/draft-04/schema#',
title: 'json schema',
type: 'object',
properties: {
taskId: {
type: 'string',
title: 'taskId',
},
description: {
type: 'string',
title: 'description',
}
},
required: ['taskId'],
}
如果图像损坏,就像这样:
title | type | description | required
taskId | string | xxxxxxxxxxx | true
description | string | xxxxxxxxxxx | false
如果我正确理解您的要求,您需要一个 npm 包,它可以将 json 呈现到表中,并允许您通过 UI 对其进行编辑。这是正确的吗?
如果是这样,请检查 SlateJs,更具体地说是这个示例 https://www.slatejs.org/examples/tables
正如其中所述,您可以根据需要添加复杂的功能