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

简单方便 干净卫生

posted @ 2021-03-16 13:54  努力化猿的鼠  阅读(1702)  评论(0编辑  收藏  举报