1.依赖仓库的版本(Dependencies versions):
- react:18.2.0
- form-render:v2.5.2
- antd:5.25.1
2.问题描述(Bug description):
多选组件空的时候设置只读没问题,一旦有值后,设置只读直接起飞,截图如下
3.出现问题的 schema demo(Reproduction schema demo):
{
"title": "材质",
"type": "array",
"props": {
"mode": "tags",
"options": [
{
"label": "塑料",
"title": "材质",
"options": [
{
"label": "丙烯腈-丁二烯-苯乙烯共聚物",
"value": "丙烯腈-丁二烯-苯乙烯共聚物"
},
{
"label": "聚乙烯",
"value": "聚乙烯"
},
{
"label": "聚丙烯",
"value": "聚丙烯"
},
{
"label": "聚氯乙烯",
"value": "聚氯乙烯"
},
{
"label": "聚苯乙烯",
"value": "聚苯乙烯"
},
{
"label": "涤纶树脂",
"value": "涤纶树脂"
}
]
},
{
"label": "金属",
"title": "材质",
"options": [
{
"label": "铝",
"value": "铝"
},
{
"label": "铜 ",
"value": "铜 "
},
{
"label": "铁 ",
"value": "铁 "
},
{
"label": "锌 ",
"value": "锌 "
},
{
"label": "银 ",
"value": "银 "
},
{
"label": "金 ",
"value": "金 "
},
{
"label": "铝合金",
"value": "铝合金"
}
]
},
{
"label": "不锈钢",
"title": "材质",
"options": [
{
"label": "201不锈钢",
"value": "201不锈钢"
},
{
"label": "202不锈钢",
"value": "202不锈钢"
},
{
"label": "301不锈钢",
"value": "301不锈钢"
},
{
"label": "304不锈钢",
"value": "304不锈钢"
},
{
"label": "316不锈钢",
"value": "316不锈钢"
},
{
"label": "309不锈钢",
"value": "309不锈钢"
},
{
"label": "321不锈钢",
"value": "321不锈钢"
},
{
"label": "409不锈钢",
"value": "409不锈钢"
},
{
"label": "410不锈钢",
"value": "410不锈钢"
},
{
"label": "430不锈钢",
"value": "430不锈钢"
}
]
},
{
"label": "玻璃",
"title": "材质",
"options": [
{
"label": "普通玻璃",
"value": "普通玻璃"
},
{
"label": "钢化玻璃",
"value": "钢化玻璃"
}
]
}
]
},
"widget": "select"
}
4.最小复现 demo(Reproduction demo):
把上面的代码复制到playground,随便设置一些值,然后把input的readOnly属性设置为true,就报错了
https://xrender.fun/playground
1.依赖仓库的版本(Dependencies versions):
2.问题描述(Bug description):
多选组件空的时候设置只读没问题,一旦有值后,设置只读直接起飞,截图如下
3.出现问题的 schema demo(Reproduction schema demo):
{ "title": "材质", "type": "array", "props": { "mode": "tags", "options": [ { "label": "塑料", "title": "材质", "options": [ { "label": "丙烯腈-丁二烯-苯乙烯共聚物", "value": "丙烯腈-丁二烯-苯乙烯共聚物" }, { "label": "聚乙烯", "value": "聚乙烯" }, { "label": "聚丙烯", "value": "聚丙烯" }, { "label": "聚氯乙烯", "value": "聚氯乙烯" }, { "label": "聚苯乙烯", "value": "聚苯乙烯" }, { "label": "涤纶树脂", "value": "涤纶树脂" } ] }, { "label": "金属", "title": "材质", "options": [ { "label": "铝", "value": "铝" }, { "label": "铜 ", "value": "铜 " }, { "label": "铁 ", "value": "铁 " }, { "label": "锌 ", "value": "锌 " }, { "label": "银 ", "value": "银 " }, { "label": "金 ", "value": "金 " }, { "label": "铝合金", "value": "铝合金" } ] }, { "label": "不锈钢", "title": "材质", "options": [ { "label": "201不锈钢", "value": "201不锈钢" }, { "label": "202不锈钢", "value": "202不锈钢" }, { "label": "301不锈钢", "value": "301不锈钢" }, { "label": "304不锈钢", "value": "304不锈钢" }, { "label": "316不锈钢", "value": "316不锈钢" }, { "label": "309不锈钢", "value": "309不锈钢" }, { "label": "321不锈钢", "value": "321不锈钢" }, { "label": "409不锈钢", "value": "409不锈钢" }, { "label": "410不锈钢", "value": "410不锈钢" }, { "label": "430不锈钢", "value": "430不锈钢" } ] }, { "label": "玻璃", "title": "材质", "options": [ { "label": "普通玻璃", "value": "普通玻璃" }, { "label": "钢化玻璃", "value": "钢化玻璃" } ] } ] }, "widget": "select" }4.最小复现 demo(Reproduction demo):
把上面的代码复制到playground,随便设置一些值,然后把input的readOnly属性设置为true,就报错了
https://xrender.fun/playground