Invalid prop: type check failed for prop “xxx“

Invalid named data: 'data' type check failed.

A very classic solution to the problem: add a colon

<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>

Guess you like

Origin blog.csdn.net/weixin_46669844/article/details/128539438