We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本号 (version) @form-create/element-ui@2.5.17
UI 框架的版本 (UI version) element-ui 2.13.0
问题描述 (Issue) 当 rule 里的配置有 control 时,formCreate.create() 根据 rule 创建表单实例 fApi,使用 fApi.fields() 获取的表单全部字段名时,control 中配置的表单项的名字全是 push 到数组末尾的,并不是跟随在 control 的父级的字段后面,或根据 prepend 或 append 的设置排放。
复现步骤/生成规则 (Duplicate steps/generate rules) const rule = [ { "type": "select", "field": "distributor", "title": "经销商名称", "_fc_drag_tag": "select", "hidden": false, "display": true, "control": [ { "handle": val => true, "prepend": "distributor", "rule": [ { "type": "input", "value": "", "field": "dealerCode", "title": "经销商编码", "_fc_drag_tag": "input", "hidden": false, "display": true } ] } ] }, { "type": "input", "field": "Fmkr1ng9y8slnq", "title": "输入框", "info": "", "_fc_drag_tag": "input", "hidden": false, "display": true } ] formCreate.create(ruleTest).fields() 输出:['distributor', 'inputbox', 'dealerCode']
期望的结果 (Desired outcome) 因为 control 中写了 "prepend": "distributor",则希望输出: ['dealerCode', 'distributor', 'inputbox'] 没有 prepend 时,默认为: ['distributor', 'dealerCode', 'inputbox'] 若设置了 append,则排在 append 的后面。
各位大佬帮我看看喃,是我使用、理解错误了,还是说 form-create 确实有这个问题。
The text was updated successfully, but these errors were encountered:
官方例子好像就是这样的,不知道有什么方法可以处理掉。
Sorry, something went wrong.
No branches or pull requests
版本号 (version) @form-create/element-ui@2.5.17
UI 框架的版本 (UI version) element-ui 2.13.0
问题描述 (Issue)
当 rule 里的配置有 control 时,formCreate.create() 根据 rule 创建表单实例 fApi,使用 fApi.fields() 获取的表单全部字段名时,control 中配置的表单项的名字全是 push 到数组末尾的,并不是跟随在 control 的父级的字段后面,或根据 prepend 或 append 的设置排放。
复现步骤/生成规则 (Duplicate steps/generate rules)
const rule = [
{
"type": "select",
"field": "distributor",
"title": "经销商名称",
"_fc_drag_tag": "select",
"hidden": false,
"display": true,
"control": [
{
"handle": val => true,
"prepend": "distributor",
"rule": [
{
"type": "input",
"value": "",
"field": "dealerCode",
"title": "经销商编码",
"_fc_drag_tag": "input",
"hidden": false,
"display": true
}
]
}
]
},
{
"type": "input",
"field": "Fmkr1ng9y8slnq",
"title": "输入框",
"info": "",
"_fc_drag_tag": "input",
"hidden": false,
"display": true
}
]
formCreate.create(ruleTest).fields()
输出:['distributor', 'inputbox', 'dealerCode']
期望的结果 (Desired outcome)
因为 control 中写了 "prepend": "distributor",则希望输出: ['dealerCode', 'distributor', 'inputbox']
没有 prepend 时,默认为: ['distributor', 'dealerCode', 'inputbox']
若设置了 append,则排在 append 的后面。
各位大佬帮我看看喃,是我使用、理解错误了,还是说 form-create 确实有这个问题。
The text was updated successfully, but these errors were encountered: