48 lines
1.4 KiB
Vue
48 lines
1.4 KiB
Vue
<template>
|
|
<t-layout class="shell">
|
|
<t-aside width="240px" class="side">
|
|
<div class="brand">Browser Desk</div>
|
|
<div class="sub">Electron + Vue3 + TDesign Vue Next</div>
|
|
<t-menu theme="dark" v-model:value="active" @change="go">
|
|
<t-menu-item value="/profiles">环境</t-menu-item>
|
|
<t-menu-item value="/proxy">代理</t-menu-item>
|
|
<t-menu-item value="/fingerprint">指纹</t-menu-item>
|
|
<t-menu-item value="/running">运行中</t-menu-item>
|
|
<t-menu-item value="/settings">设置</t-menu-item>
|
|
</t-menu>
|
|
</t-aside>
|
|
<t-layout>
|
|
<t-header class="topbar">
|
|
<div>Electron + TDesign Frontend</div>
|
|
</t-header>
|
|
<t-content class="content">
|
|
<router-view />
|
|
</t-content>
|
|
</t-layout>
|
|
</t-layout>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, watch } from 'vue'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const active = ref(route.path)
|
|
|
|
watch(() => route.path, val => (active.value = val))
|
|
|
|
function go(value) {
|
|
router.push(value)
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.shell { height: 100vh; }
|
|
.side { background: #111827; color: #fff; }
|
|
.brand { padding: 20px 20px 6px; font-weight: 700; }
|
|
.sub { padding: 0 20px 12px; opacity: 0.7; font-size: 12px; }
|
|
.topbar { display:flex; align-items:center; padding: 0 24px; background:#fff; border-bottom:1px solid #e5e7eb; }
|
|
.content { padding: 20px; background: #f5f7fb; }
|
|
</style>
|