今早写代码,一切正常使用时打开console发现竟然报了个warning,红红的,巨丑无比= =|||数组
仔细看警告信息:orm
`Form.Item` cannot generate `validateStatus` and `help` automatically, while there are more than one `getFieldDecorator` in it.get
看样子主要缘由是由于一个form-item标签中正常只容许有一个v-decorator,而我在form-item中用了v-for生成了多个input框,并每一个都加上了v-decorator做为数组。。。input
解决方案it
在v-for内要生成的要加v-decorator的元素(如input)外再包裹一层form-item,即对n个元素进行循环遍历将生成n个form-item,知足了一个form-item仅有一个v-decorator的要求,再也不报错。console
仍是想吐槽一下,为何这种报错又丑,还不给出大体的错误代码定位,唉。。。form