feat: 首次提交,添加Web界面和Redis支持的数据管理系统
This commit is contained in:
59
web/src/App.vue
Normal file
59
web/src/App.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<script setup lang="ts">
|
||||
import {ref, watch} from 'vue'
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const activeIndex = ref(route.name?.toString() || "TokenList")
|
||||
|
||||
watch(route, (newRoute) => {
|
||||
activeIndex.value = newRoute.name?.toString() || "TokenList"
|
||||
})
|
||||
|
||||
const handleSelect = (key: string) => {
|
||||
router.push({
|
||||
name: key
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
class="el-menu-demo"
|
||||
mode="horizontal"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="TokenList">Token列表</el-menu-item>
|
||||
<el-menu-item index="TokenDetail">Token信息</el-menu-item>
|
||||
</el-menu>
|
||||
</el-header>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<router-view></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
|
||||
<style>
|
||||
html, body, #app {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.el-menu-demo {
|
||||
line-height: 60px;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user