main.js操作
axios.interceptors.request.use(config=>{
console.log(config)
config.headers.Authorization =window.sessionStorage.getItem('token')
return config;
})
遍历:
<el-submenu :index="item.id +'' " v-for="item in menulist" :key="item.id">
<!-- 文本 -->
<template slot="title">
<!-- 图标 -->
<i :class="iconobj[item.id]"></i>
<span>{{ item.authName }}</span>