vue路由\导航刷新后:ative\localStorage\url截取参数

来源:互联网 发布:python 列表变元组 编辑:程序博客网 时间:2024/05/21 15:49
<el-menu :default-active="$route.path" router  mode="horizontal">    <el-menu-item v-for="route in routes" :key="route.path"       :index="route.path" :class="$route.path==route.path?'is-active':''">{{route.name}}</el-menu-item></el-menu>routes: [    { path: '/main/kdgadmin', name: '幼儿园管理', },    { path: '/main/phyex', name: '体测', },    ]css:.is-active{        background: #a3212f;        border-bottom: 0px solid transparent;        color: #FFFFFF;    }本地localStorage:localStorage.Id= response.data.Meta.Id;localStorage.getItem("Id"),url截取参数:path: '/info?ChildId=' + id + '&ChildName=' + childnameChildId= this.$route.query.ChildId;
 
原创粉丝点击