New issue
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
fApi.fields()无法获取表单字段 #302
Comments
感谢反馈 ,我检查一下 |
非常感谢,我再看一下具体原因。 |
@xaboy 你好, |
我这边先检查一下 |
相关代码如下 // 规则加载函数
let module = await import('@/utils/form/rule/'+ ruleName)
const ruleFunc = module.default
const ruleArray = ruleFunc()
_.each(ruleArray, function(value) {
rule.push(value)
})
// 调用规则加载函数
this.ruleLoaded = dispatch(this.ruleName, this.rule);
// 使用表单fields的值
await this.ruleLoaded
let fields = this.fApi.fields()
console.debug('使用表单属性', fields) |
2.5.0-alpha.5 版本优化了下 你再试试 |
谢谢!经过验证,此问题已解决。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2.5.0-alpha.2
element-ui
2.12.0
在表单加载完成后,使用fApi.fields()函数无法获取表单字段,返回值为[]。(通过fApi.form验证,表单实际有字段)
在全局配置中,使用mounted属性,在函数中输出fApi.fields()。(规则文件较大,不便展示)
当将规则简化为如下形式后,仍存在此问题。
使用fApi.fields()函数可以获取表单字段
无
The text was updated successfully, but these errors were encountered: