mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 21:10:23 +00:00
feat: nav
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>面板</h1>
|
||||
<p>欢迎来到面板页面!</p>
|
||||
</div>
|
||||
<SidebarMenu :menuItems="menuItems" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '../css/style.css';
|
||||
import SidebarMenu from './webui/Nav.vue';
|
||||
|
||||
export default {
|
||||
name: 'Dashboard'
|
||||
};
|
||||
components: {
|
||||
SidebarMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuItems: [
|
||||
{ value: 'item1', icon: 'dashboard', label: '基础信息', route: '/basic-info' },
|
||||
{ value: 'item3', icon: 'play-circle', label: '网络配置', route: '/network-config' },
|
||||
{ value: 'item4', icon: 'edit-1', label: '日志查看', route: '/log-view' },
|
||||
{ value: 'item5', icon: 'info-circle', label: '关于我们', route: '/about-us' }
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -21,6 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import '../css/style.css';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { Button as TButton, Select as TSelect, Option as TOption, MessagePlugin } from 'tdesign-vue-next';
|
||||
import QRCode from 'qrcode';
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import '../css/style.css';
|
||||
import '../css/font.css';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { MessagePlugin } from 'tdesign-vue-next';
|
||||
|
||||
27
napcat.webui/src/components/webui/Nav.vue
Normal file
27
napcat.webui/src/components/webui/Nav.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<t-menu theme="light" default-value="2-1" :collapsed="collapsed">
|
||||
<template #logo>
|
||||
<span>WebUi</span>
|
||||
</template>
|
||||
<router-link v-for="item in menuItems" :key="item.value" :to="item.route">
|
||||
<t-menu-item :value="item.value" :disabled="item.disabled">
|
||||
<template #icon>
|
||||
<t-icon :name="item.icon" />
|
||||
</template>
|
||||
{{ item.label }}
|
||||
</t-menu-item>
|
||||
</router-link>
|
||||
</t-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SidebarMenu',
|
||||
props: {
|
||||
menuItems: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user