element-ui 组件报错: Vue warn]: Invalid prop: type check failed for prop “min“. Expected Number with

element-ui 组件报错:

Vue warn]: 
Invalid prop: type check failed for prop "min". 
Expected Number with value 0, got String with value "0". 

 

element-ui 组件报错: Vue warn]: Invalid prop: type check failed for prop “min“. Expected Number with

出错位置:


   
  1. <el-form-item label="排序" prop="sort">
  2. <el-input-number v-model="person.sort" controls-position="right" min="0" />
  3. </el-form-item>

 应改为:


   
  1. <el-form-item label="讲师排序" prop="sort">
  2. <el-input-number v-model="teacher.sort" controls-position="right" :min="0" />
  3. </el-form-item>

错误原因:min max 之类,使用组件的话应为 :min :max

尚硅谷谷粒学院p93,如果出现Invalid prop: type check failed for prop image. Expected String, got Undefined的,原因是组件文件夹component中panThumb中的模板标签image是一个String,只需要将teacher.avatar用String包裹起来,即String(teacher.avatar)即可
即:在save.vue中头衔缩略图的注释下

<pan-thumb :image="String(teacher.avatar)"/>

转自(https://blog.csdn.net/yssa1125001/article/details/106102235)

上一篇:如何在PHP中找到最接近的一周?


下一篇:Dimension out of range (expected to be in range of [-1, 0], but got 1)