mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
fix(sidebar): 侧边栏添加 News,暂且就这些吧
This commit is contained in:
20
components.d.ts
vendored
20
components.d.ts
vendored
@@ -5,17 +5,17 @@
|
|||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
import '@vue/runtime-core'
|
import '@vue/runtime-core'
|
||||||
|
|
||||||
export {}
|
export {};
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module "@vue/runtime-core" {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ALayout: typeof import('ant-design-vue/es')['Layout']
|
ALayout: typeof import("ant-design-vue/es")["Layout"];
|
||||||
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
ALayoutContent: typeof import("ant-design-vue/es")["LayoutContent"];
|
||||||
ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
|
ALayoutSider: typeof import("ant-design-vue/es")["LayoutSider"];
|
||||||
AMenu: typeof import('ant-design-vue/es')['Menu']
|
AMenu: typeof import("ant-design-vue/es")["Menu"];
|
||||||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
AMenuItem: typeof import("ant-design-vue/es")["MenuItem"];
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import("vue-router")["RouterLink"];
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import("vue-router")["RouterView"];
|
||||||
TSidebar: typeof import('./src/components/t-sidebar.vue')['default']
|
TSidebar: typeof import("./src/components/t-sidebar.vue")["default"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 侧边栏 -->
|
<!-- 侧边栏 -->
|
||||||
<t-sidebar />
|
<t-sidebar />
|
||||||
<!-- 内容区 -->
|
<!-- 内容区 -->
|
||||||
<a-layout-content class="container">
|
<a-layout-content>
|
||||||
<!-- 路由组件 -->
|
<!-- 路由组件 -->
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
@@ -22,4 +22,4 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style lang="css"></style>
|
||||||
|
|||||||
@@ -8,11 +8,15 @@
|
|||||||
>
|
>
|
||||||
<a-menu-item key="home">
|
<a-menu-item key="home">
|
||||||
<HomeOutlined />
|
<HomeOutlined />
|
||||||
<span>Home</span>
|
<span>首页</span>
|
||||||
|
</a-menu-item>
|
||||||
|
<a-menu-item key="news">
|
||||||
|
<ScheduleOutlined />
|
||||||
|
<span>咨讯</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item key="config">
|
<a-menu-item key="config">
|
||||||
<SettingOutlined />
|
<SettingOutlined />
|
||||||
<span>Config</span>
|
<span>设置</span>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</a-layout-sider>
|
</a-layout-sider>
|
||||||
@@ -20,13 +24,14 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { HomeOutlined, SettingOutlined } from "@ant-design/icons-vue";
|
import { HomeOutlined, ScheduleOutlined, SettingOutlined } from "@ant-design/icons-vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "TSidebar",
|
name: "TSidebar",
|
||||||
components: {
|
components: {
|
||||||
HomeOutlined,
|
HomeOutlined,
|
||||||
|
ScheduleOutlined,
|
||||||
SettingOutlined,
|
SettingOutlined,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
13
src/pages/News.vue
Normal file
13
src/pages/News.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
<h1>咨讯</h1>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "News",
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="css"></style>
|
||||||
@@ -1,19 +1,25 @@
|
|||||||
import Home from "../pages/Home.vue";
|
import Home from "../pages/Home.vue";
|
||||||
|
import News from "../pages/News.vue";
|
||||||
import Config from "../pages/Config.vue";
|
import Config from "../pages/Config.vue";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
name: "Home",
|
name: "首页",
|
||||||
component: Home,
|
component: Home,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
redirect: "/",
|
redirect: "/",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/news",
|
||||||
|
name: "咨讯",
|
||||||
|
component: News,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/config",
|
path: "/config",
|
||||||
name: "Config",
|
name: "设置",
|
||||||
component: Config,
|
component: Config,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user