vue.esm.js:634 [Vue tip]: Prop "receivetime" is passed to component <Anonymous>, but the declared prop name is "receiveTime". Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM templates. You should probably use "receive-time" instead of "receiveTime".
时间: 2024-04-23 14:27:24 浏览: 184
js获得时间
这个警告是因为您在使用组件时,传递的属性名大小写不一致。
Vue组件的props属性是大小写敏感的,而HTML属性是不区分大小写的。在模板中使用驼峰式命名的props时,需要使用短横线分隔的kebab-case形式。
所以,您需要将属性名从"receiveTime"改为"receive-time",以解决这个警告。
例如,将以下代码:
```
<water-overproof-form :visible.sync="dialogVisible2" :data="formData2" :receiveTime="receivetime" @success="search" />
```
改为:
```
<water-overproof-form :visible.sync="dialogVisible2" :data="formData2" :receive-time="receivetime" @success="search" />
```
这样修改后,Vue不再会报警告提示。
阅读全文