<template>
<div>
<el-upload
class="upload-demo"
ref="upload"
action="http://192.168.1.120:6001/gateway/app/content-aggr/content/addResource"
:on-change="onchangeFunc"
:multiple="bool"
:headers="header"
:data="datas"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary"></el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload"></el-button>
<div slot="tip" class="el-upload__tip">jpg/png500kb</div>
</el-upload>
</div>
</template>
export default {
data(){
return {
bool:true,
header:{
"Authorization": "Bearer " + sessionStorage.getItem("session_Authorization"),
"userId": sessionStorage.getItem("session_userId")
},
datas:{
// files: files,
ivFormat: "image/jpeg",
ivHeight: "1000",
ivName: "1111",
ivSize: "11111",
ivWidth: "2222",
},
fileList: []
}
},
methods:{
onchangeFunc(file, fileList){
console.log("filelist");
this.fileList=fileList;
}
}
}