Invalid prop: type check failed for prop "price". Expected String, got Number.

在谷歌浏览器上写Vue项目时,总会有很多警告,关键是红色的,非常刺眼,一片红好像是严重的错误,在有强迫症的程序员眼里非常之别扭,准备清除警告! 定位错误信息:components/alters/addCartAlter.vue 和src/pages/HomePages/productDetails.vue中的price的类型不对, 组件中定义类型为字符串: 父试图用Number赋值的,原来类型不匹
相关文章
相关标签/搜索