这篇文章主要介绍了关于vue使用element实现导航的分析,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下
<template>
<p class="app">
<el-header>
<el-menu :default-active="$route.path" router class="el-menu-demo" mode="horizontal" @select="handleSelect" background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b">
<el-menu-item index="/Help">帮助</el-menu-item>
<el-menu-item index="/Central-summary">中心概括</el-menu-item>
<el-menu-item index="/Flying-Eagle-Academy">飞鹰学苑</el-menu-item>
<el-menu-item index="/Strategy-comparison">策略对比</el-menu-item>
<el-menu-item index="/Strategy-backtest">策略回测</el-menu-item>
<el-menu-item index="/Combined-configuration">组合配置</el-menu-item>
</el-menu>
<p class="line"></p>
</el-header>
<el-main>
<router-view></router-view>
</el-main>
</p>
</template>
<script>
export default {
data() {
return {
activeIndex: "1"
};
}
};
</script>vue中使用element实现导航需要注意三个方面
在el-menu中添加 router
更改 :default-active="$route.path"
在el-menu-item中的index属性直接书写的路由
mallcloud商城基于SpringBoot2.x、SpringCloud和SpringCloudAlibaba并采用前后端分离vue的企业级微服务敏捷开发系统架构。并引入组件化的思想实现高内聚低耦合,项目代码简洁注释丰富上手容易,适合学习和企业中使用。真正实现了基于RBAC、jwt和oauth2的无状态统一权限认证的解决方案,面向互联网设计同时适合B端和C端用户,支持CI/CD多环境部署,并提
0
立即学习“前端免费学习笔记(深入)”;
以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!
相关推荐:
以上就是vue使用element实现导航的分析的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号