Skip to content

!(fieldOption && initialValue in fieldOption) 这段代码语法有误 #1291

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

Closed
1 task
yicheng-irun opened this issue Oct 16, 2019 · 1 comment
Closed
1 task
Labels

Comments

@yicheng-irun
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

2

Reproduction link

https://vue.ant.design/components/form-cn/#components-form-demo-customized-form-controls

Steps to reproduce

这里不需要纠结于怎么复现,这里是纯粹的语法问题,因为一个报错,然后读源码然后发现这里写错了

What is expected?

把initialValue 用引号引起来就可以了

What is actually happening?

我在v-decorator中写了initialValue,依然会报错, [Vue warn]: Error in render: "ReferenceError: initialValue is not defined"


这里不重要,在/components/vc-form/src/createBaseForm.jsx 第207行
原写法:!(fieldOption && initialValue in fieldOption)
应该写成 !(fieldOption && 'initialValue' in fieldOption)

这里会报错 [Vue warn]: Error in render: "ReferenceError: initialValue is not defined"

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant