-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- 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"