Files
MTKJPAY-FRONT/src/App.vue

65 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<el-container>
<el-header>
<div class="header-content">
<h1>MT Pay - PingPong支付系统</h1>
<el-menu
mode="horizontal"
:default-active="activeIndex"
router
>
<el-menu-item index="/">创建订单</el-menu-item>
<el-menu-item index="/query">订单查询</el-menu-item>
</el-menu>
</div>
</el-header>
<el-main>
<router-view />
</el-main>
</el-container>
</template>
<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const activeIndex = computed(() => route.path)
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#app {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.el-header {
background-color: #409eff;
color: white;
line-height: 60px;
padding: 0 20px;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.header-content h1 {
font-size: 20px;
margin: 0;
}
.el-main {
padding: 20px;
min-height: calc(100vh - 60px);
}
</style>