element-ui 组件报错:

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

 

出错位置:

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

 应改为:

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

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

Logo

前往低代码交流专区

更多推荐