39 行
933 B
Vue
39 行
933 B
Vue
<template>
|
|
<div class="common-layout">
|
|
<el-container>
|
|
<el-header>
|
|
<el-menu
|
|
:default-active="activeIndex"
|
|
menu-trigger="click"
|
|
class="el-menu-demo"
|
|
mode="horizontal"
|
|
:ellipsis="false"
|
|
:router="true"
|
|
>
|
|
<el-menu-item index="/">
|
|
<img style="width: 60px" src="@/assets/logo.svg" alt="logo" />
|
|
</el-menu-item>
|
|
<el-menu-item index="/about">控制台</el-menu-item>
|
|
<el-menu-item index="/login">注销</el-menu-item>
|
|
</el-menu>
|
|
</el-header>
|
|
<el-main>Main</el-main>
|
|
</el-container>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from "vue"
|
|
|
|
const activeIndex = ref("1")
|
|
const handleSelect = (key: string, keyPath: string[]) => {
|
|
console.log(key, keyPath)
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.el-menu--horizontal > .el-menu-item:nth-child(1) {
|
|
margin-right: auto;
|
|
}
|
|
</style>
|