|
@@ -1,32 +1,55 @@
|
|
|
<template>
|
|
|
- <div class="common-layout">
|
|
|
+ <el-container class="common-layout">
|
|
|
+ <el-header>
|
|
|
+ <el-menu menu-trigger="click" 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-container>
|
|
|
- <el-header>
|
|
|
+ <el-aside width="200px">
|
|
|
<el-menu
|
|
|
- :default-active="activeIndex"
|
|
|
- menu-trigger="click"
|
|
|
- class="el-menu-demo"
|
|
|
- mode="horizontal"
|
|
|
- :ellipsis="false"
|
|
|
+ default-active="/im"
|
|
|
+ class="el-menu-vertical-demo"
|
|
|
+ @open="handleOpen"
|
|
|
+ @close="handleClose"
|
|
|
: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-sub-menu index="/about">
|
|
|
+ <template #title>
|
|
|
+ <el-icon>
|
|
|
+ <location />
|
|
|
+ </el-icon>
|
|
|
+ <span>Im服务</span>
|
|
|
+ </template>
|
|
|
+ <el-menu-item index="/im">应用信息</el-menu-item>
|
|
|
+ </el-sub-menu>
|
|
|
+ <el-sub-menu index="2">
|
|
|
+ <template #title>
|
|
|
+ <el-icon>
|
|
|
+ <location />
|
|
|
+ </el-icon>
|
|
|
+ <span>版本管理</span>
|
|
|
+ </template>
|
|
|
+ <el-menu-item index="/appManager">应用信息</el-menu-item>
|
|
|
+ </el-sub-menu>
|
|
|
</el-menu>
|
|
|
- </el-header>
|
|
|
- <el-main>Main</el-main>
|
|
|
+ </el-aside>
|
|
|
+ <el-main><RouterView /></el-main>
|
|
|
</el-container>
|
|
|
- </div>
|
|
|
+ </el-container>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref } from "vue"
|
|
|
+import { Location } from "@element-plus/icons-vue"
|
|
|
|
|
|
-const activeIndex = ref("1")
|
|
|
-const handleSelect = (key: string, keyPath: string[]) => {
|
|
|
+const handleOpen = (key: string, keyPath: string[]) => {
|
|
|
+ console.log(key, keyPath)
|
|
|
+}
|
|
|
+const handleClose = (key: string, keyPath: string[]) => {
|
|
|
console.log(key, keyPath)
|
|
|
}
|
|
|
</script>
|