-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
156 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ElBreadcrumb, ElDropdownMenu } from "element-plus" | ||
import { defineComponent } from "vue" | ||
|
||
const _default = defineComponent({ | ||
setup() { | ||
return () => ( | ||
<div class="nav-container"> | ||
<ElBreadcrumb /> | ||
<ElDropdownMenu> | ||
|
||
</ElDropdownMenu> | ||
</div> | ||
) | ||
} | ||
}) | ||
|
||
export default _default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
/** | ||
* Copyright (c) 2021-present Hengyang Zhang | ||
* | ||
* This software is released under the MIT License. | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import type { IconProps } from "element-plus" | ||
import { Aim, HelpFilled, Memo, Rank, SetUp, Stopwatch, Timer } from "@element-plus/icons-vue" | ||
import { getGuidePageUrl } from "@util/constant/url" | ||
import Trend from "./icons/Trend" | ||
import Table from "./icons/Table" | ||
import Database from "./icons/Database" | ||
import Whitelist from "./icons/Whitelist" | ||
import Website from "./icons/Website" | ||
import About from "./icons/About" | ||
import { ANALYSIS_ROUTE, MERGE_ROUTE } from "@app/router/constants" | ||
import { I18nKey } from "@app/locale" | ||
|
||
export type MenuItem = { | ||
title: I18nKey | ||
icon: IconProps | string | ||
route?: string | ||
href?: string | ||
index?: string | ||
} | ||
|
||
export type MenuGroup = { | ||
title: I18nKey | ||
children: MenuItem[] | ||
} | ||
|
||
/** | ||
* Menu items | ||
*/ | ||
export const MENUS: MenuGroup[] = [{ | ||
title: msg => msg.menu.data, | ||
children: [{ | ||
title: msg => msg.menu.dashboard, | ||
route: '/data/dashboard', | ||
icon: Stopwatch | ||
}, { | ||
title: msg => msg.menu.dataReport, | ||
route: '/data/report', | ||
icon: Table | ||
}, { | ||
title: msg => msg.menu.siteAnalysis, | ||
route: ANALYSIS_ROUTE, | ||
icon: Trend | ||
}, { | ||
title: msg => msg.menu.dataClear, | ||
route: '/data/manage', | ||
icon: Database | ||
}] | ||
}, { | ||
title: msg => msg.menu.behavior, | ||
children: [{ | ||
title: msg => msg.menu.habit, | ||
route: '/behavior/habit', | ||
icon: Aim | ||
}, { | ||
title: msg => msg.menu.limit, | ||
route: '/behavior/limit', | ||
icon: Timer | ||
}] | ||
}, { | ||
title: msg => msg.menu.additional, | ||
children: [{ | ||
title: msg => msg.menu.siteManage, | ||
route: '/additional/site-manage', | ||
icon: Website | ||
}, { | ||
title: msg => msg.menu.whitelist, | ||
route: '/additional/whitelist', | ||
icon: Whitelist | ||
}, { | ||
title: msg => msg.menu.mergeRule, | ||
route: MERGE_ROUTE, | ||
icon: Rank | ||
}, { | ||
title: msg => msg.menu.option, | ||
route: '/additional/option', | ||
icon: SetUp | ||
}] | ||
}, { | ||
title: msg => msg.menu.other, | ||
children: [{ | ||
title: msg => msg.base.guidePage, | ||
href: getGuidePageUrl(), | ||
icon: Memo, | ||
index: '_guide', | ||
}, { | ||
title: msg => msg.menu.helpUs, | ||
route: '/other/help', | ||
icon: HelpFilled, | ||
}, { | ||
title: msg => msg.menu.about, | ||
route: '/other/about', | ||
icon: About, | ||
}] | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
@import ./mobile | ||
@import "./mobile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
@media screen and (max-width: 600px) | ||
body | ||
100vw | ||
$mobile-width: 640px | ||
|
||
@media screen and (max-width: $mobile-width) | ||
#app | ||
.el-aside | ||
width: 0px | ||
.app-layout | ||
.app-aside | ||
display: none | ||
.app-header | ||
background-color: var(--el-menu-bg-color) | ||
color: var(--el-menu-text-color) | ||
.content-container | ||
width: 100% | ||
padding: 0 | ||
|
||
@media screen and (min-width: $mobile-width) | ||
#app | ||
.app-layout | ||
.app-header | ||
display: none |