使用元素 ui 上传时未找到注入 "elForm"

Injection "elForm" not found when using elemebt ui upload

上传效果很好,但我收到了这个烦人的警告。是什么导致了这个问题?

我是这样用的

        <el-upload
            class="avatar-uploader"
            ref="upload"
            action="/app/admin/product-image"
            :with-credentials="true"
            :thumbnail-mode="true"

            :file-list="fileList"
            :on-success="handleAvatarSuccess"
            :on-change="picPreview"
            :on-error="uploadError"
            :auto-upload="true"
            :data="{product_id:data.id}"
            :multiple="false"
            :on-preview="handlePictureCardPreview"
                        :on-remove="handleRemove"
                        list-type="picture-card"
            :before-upload="beforeAvatarUpload">
            <i class="el-icon-plus"></i>
        </el-upload>


        <el-dialog :visible.sync="dialogVisible">
            <img width="100%" :src="dialogImageUrl" alt="">
        </el-dialog>

尝试:

<el-form ref="form" label-width="120px">
     <!-- form content here --->
</el-form>

从我这里工作。