1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <div>
- <el-menu
- :default-active="activeIndex"
- class="el-menu-demo"
- mode="horizontal"
- @select="handleSelect"
- :background-color="variables.navbarBg"
- :text-color="variables.navbarText"
- :active-text-color="variables.navbarActiveText">
- <el-menu-item index="1">学员系统</el-menu-item>
- </el-menu>
- </div>
- </template>
- <script>
- import variables from '@/styles/variables.scss'
- export default {
- name: 'NavMenu',
- data() {
- return {
- activeIndex: '1',
- }
- },
- computed: {
- variables() {
- return variables
- },
- },
- mounted() {
-
- },
- methods: {
- handleSelect(key, keyPath) {
- console.log(key, keyPath);
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .el-menu--horizontal {
- >.el-menu-item {
- height: 50px;
- line-height: 50px;
- &.is-active {
- background: #3f62ca !important;
- }
- }
- }
-
- </style>
|