[英]How to add an image before a radio input in jsonschema-form lib?
I'm using jsonschema-form lib and I would like to add an image before a radio input.我正在使用jsonschema-form lib ,我想在无线电输入之前添加一个图像。
This image is an example of the final result:此图像是最终结果的示例:
My JSONSchema is:我的 JSONSchema 是:
"type": "object",
"title": "Title",
"properties": {
"turni": {
"type": "string",
"format": "radio",
"enum": ["optA", "optB", "optC"],
"enumNames": ["a", "b", "c"],
"images":["url-a", "url-b", "url-c"]
}
}
How I can customize a radio widget for my purpouse?如何根据我的目的自定义收音机小部件?
I solved this issue in this way:我以这种方式解决了这个问题:
"turns": {
"type": "string",
"represents": "turns",
"enum": "option1", "option2", "option3"],
"enumNames": ["a", "b", "c"],
"uniqueItems": true,
"imgs":["data:image/png;base64,...",
"data:image/png;base64,...",
"data:image/png;base64,..."
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.