element-UI 中的upload组件如何添加token?
<el-upload :show-file-list="false" :on-error="errmsg" :headers="headers" :on-success="refreshList" action="/xxxx" accept=".xls, .xlsx" style="display: inline;"> <el-button type="primary" icon="el-icon-upload2" >导入</el-button> </el-upload>
computed: { headers(){ return { "Authorization":store.getters.access_token } } },
简单方便 干净卫生