账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    elementui上传问题,急急急!!!!
    27
    0

    上传的标签是这样的写的。

    <el-upload
        class="upload-demo"
        ref="uploadNewFile"
        :action="actionUrl"
        :file-list="fileList"
        :auto-upload="false"
        :on-change="newFileChange"
        :on-remove="removeFile"
        :data="newFileData"
        name="files"
        :on-preview="handlePreview">
        <el-button type="primary" class="button b2 upload">
        <i class="iconfont icon-shangchuan"></i> 上传
        </el-button>
        <el-input style="display: none" v-model="formData.newFile"></el-input>
    </el-upload>

    提交的时候

    saveIt: function () {
                    this.$refs['newAddForm'].validate((valid) => {
                        if(valid){
                            if (this.fileNameCheckFlag) {
                                this.newFileData.dictionaryName = this.formData.fileName;
                                this.newFileData.indexName = this.formData.fileName;
                                this.newFileData.isPublish = false;
                                this.newFileData.menuId = 256;
                                this.$refs['newAddForm'].resetFields();
                                this.zDialog.showAdd = false;
                                this.$refs.uploadNewFile.submit();
                                }
                        }

    但是上传文件提交的时候需要带上 this.newFileData.title(文件名),和 this.newFileData.sort(文件排序号);
    请问上传多个文件的时候文件名和文件排序号怎么赋值? 在哪里赋值?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 自我主宰 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部