Invalid prop: type check failed for prop “xxx“

无效的命名数据:“数据”类型检查失败。

很经典的问题处理办法:加冒号

<template>
  <el-upload
    class="avatar-uploader"
    action="https://jsonplaceholder.typicode.com/posts/"
    :show-file-list="false"
    :on-success="handleAvatarSuccess"
    :before-upload="beforeAvatarUpload"
    :http-request="load"    // 找引号对应字符位置,属性前加冒号
  >
    <img v-if="imageUrl" :src="imageUrl" class="avatar">
    <i v-else class="el-icon-plus avatar-uploader-icon" />
  </el-upload>
</template>

猜你喜欢

转载自blog.csdn.net/weixin_46669844/article/details/128539438
今日推荐