Skip to content
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

change事件在调用校验方法时也会被触发 #190

Open
StrongerLph opened this issue Nov 18, 2020 · 0 comments
Open

change事件在调用校验方法时也会被触发 #190

StrongerLph opened this issue Nov 18, 2020 · 0 comments

Comments

@StrongerLph
Copy link

form-item的change事件是否是仅供内部使用,如果不是的话,那么它存在误触发的问题。在调用校验的时候也会触发change事件,原因是调用校验时会将校验结果添加到schema中,导致watch监听到schema的变化,因而会触发下面这段代码:

formVM.$emit('change', {
paths: this.paths,
itemValue: this.schema.value,
formValue: this.formData,
itemOldValue: this.$data.itemValue
})

不知道这是有意为之还是意外的结果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant