Open a847244052 opened 8 months ago
选项1和选项2对应两个不同输入框,分别定义了校验规则,都是不通过
json:
[ { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "select", "field": "Frf8622qi89yz", "title": "选择器", "info": "", "props": { "_optionType": 2 }, "options": [ { "value": "1", "label": "选项1" }, { "value": "2", "label": "选项2" } ], "_fc_drag_tag": "select", "hidden": false, "display": true } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "radio", "field": "F6h41okrd5njr8", "title": "单选框", "info": "", "effect": { "fetch": "" }, "options": [ { "value": "1", "label": "选项1" }, { "value": "2", "label": "选项2" } ], "_fc_drag_tag": "radio", "hidden": false, "display": true, "$required": "aa", "control": [ { "value": "1", "rule": [ "Fu2t1okrd6vken" ] }, { "value": "2", "rule": [ "F4ci1okrgm993u" ] } ] }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "input", "field": "Fu2t1okrd6vken", "title": "输入框", "info": "value1", "_fc_drag_tag": "input", "hidden": false, "display": true, "$required": false, "props": { "type": "number", "maxlength": null, "minlength": null, "clearable": false }, "validate": [ { "trigger": "change", "mode": "len", "message": "aaa", "len": 3, "type": "number" } ] } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "input", "field": "F4ci1okrgm993u", "title": "输入框", "info": "value2", "props": { "type": "number", "showWordLimit": true, "autofocus": true }, "_fc_drag_tag": "input", "hidden": false, "display": true, "$required": false, "validate": [ { "trigger": "blur", "mode": "min", "message": "最小值是1", "min": 1, "type": "number" } ] } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true } ]
input组件的value类型是string,需要选择string
选项1和选项2对应两个不同输入框,分别定义了校验规则,都是不通过
json:
[ { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "select", "field": "Frf8622qi89yz", "title": "选择器", "info": "", "props": { "_optionType": 2 }, "options": [ { "value": "1", "label": "选项1" }, { "value": "2", "label": "选项2" } ], "_fc_drag_tag": "select", "hidden": false, "display": true } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "radio", "field": "F6h41okrd5njr8", "title": "单选框", "info": "", "effect": { "fetch": "" }, "options": [ { "value": "1", "label": "选项1" }, { "value": "2", "label": "选项2" } ], "_fc_drag_tag": "radio", "hidden": false, "display": true, "$required": "aa", "control": [ { "value": "1", "rule": [ "Fu2t1okrd6vken" ] }, { "value": "2", "rule": [ "F4ci1okrgm993u" ] } ] }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "input", "field": "Fu2t1okrd6vken", "title": "输入框", "info": "value1", "_fc_drag_tag": "input", "hidden": false, "display": true, "$required": false, "props": { "type": "number", "maxlength": null, "minlength": null, "clearable": false }, "validate": [ { "trigger": "change", "mode": "len", "message": "aaa", "len": 3, "type": "number" } ] } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true }, { "type": "FcRow", "children": [ { "type": "col", "props": { "span": 12 }, "children": [ { "type": "input", "field": "F4ci1okrgm993u", "title": "输入框", "info": "value2", "props": { "type": "number", "showWordLimit": true, "autofocus": true }, "_fc_drag_tag": "input", "hidden": false, "display": true, "$required": false, "validate": [ { "trigger": "blur", "mode": "min", "message": "最小值是1", "min": 1, "type": "number" } ] } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true } ], "_fc_drag_tag": "col", "hidden": false, "display": true } ], "_fc_drag_tag": "row", "hidden": false, "display": true } ]