Skip to content

Commit 60fc3ed

Browse files
committed
fix: 上下键翻页超出范围
1 parent ce1b580 commit 60fc3ed

24 files changed

Lines changed: 551 additions & 567 deletions

src/components/AsideMenuLayer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const asideLgCloseClick = (event) => {
5454
height: 27px;
5555
"
5656
/>
57-
<b class="font-black break-keep">iPanel 网页控制台</b>
57+
<b class="font-black break-keep select-none">iPanel 网页控制台</b>
5858
</div>
5959
<button
6060
class="hidden lg:inline-block xl:hidden p-3"

src/menus/adminSidebar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { mdiAccountMultiple } from "@mdi/js";
1+
import { mdiAccountMultiple } from '@mdi/js';
22

33
export default [
44
{
5-
to: "/users",
6-
label: "用户管理",
5+
to: '/users',
6+
label: '用户管理',
77
icon: mdiAccountMultiple,
88
},
99
];

src/menus/commonSidebar.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
import {
2-
mdiAccountCircle,
3-
mdiCog,
4-
mdiCone,
5-
mdiHome
6-
} from "@mdi/js";
1+
import { mdiAccountCircle, mdiCog, mdiHome } from '@mdi/js';
72

83
export default [
94
{
10-
to: "/overview",
5+
to: '/overview',
116
icon: mdiHome,
12-
label: "总览",
7+
label: '总览',
138
},
149
{
15-
to: "/profile",
16-
label: "个人资料",
10+
to: '/profile',
11+
label: '个人资料',
1712
icon: mdiAccountCircle,
1813
},
1914
{
20-
to: "/settings",
21-
label: "设置",
15+
to: '/settings',
16+
label: '设置',
2217
icon: mdiCog,
2318
},
2419
];

src/menus/instanceSidebar.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { mdiConsole, mdiConsoleLine, mdiMonitorDashboard } from "@mdi/js";
1+
import { mdiConsole, mdiMonitorDashboard } from '@mdi/js';
22

33
export default [
44
{
5-
to: "./dashboard",
5+
to: './dashboard',
66
icon: mdiMonitorDashboard,
7-
label: "仪表盘",
7+
label: '仪表盘',
88
},
99
{
10-
to: "./console",
10+
to: './console',
1111
icon: mdiConsole,
12-
label: "控制台",
12+
label: '控制台',
1313
},
1414
];

src/menus/navbar.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,56 @@ import {
44
mdiCogOutline,
55
mdiGithub,
66
mdiLogout,
7-
mdiThemeLightDark
8-
} from "@mdi/js";
7+
mdiThemeLightDark,
8+
} from '@mdi/js';
99

1010
export default [
1111
{
1212
isCurrentUser: true,
1313
menu: [
1414
{
1515
icon: mdiAccount,
16-
label: "个人资料",
17-
to: "/profile",
16+
label: '个人资料',
17+
to: '/profile',
1818
},
1919
{
20-
to: "/settings",
20+
to: '/settings',
2121
icon: mdiCogOutline,
22-
label: "设置",
22+
label: '设置',
2323
},
2424
{
2525
isDivider: true,
2626
},
2727
{
2828
icon: mdiLogout,
29-
label: "退出",
29+
label: '退出',
3030
isLogout: true,
31-
to: "/login",
31+
to: '/login',
3232
},
3333
],
3434
},
3535
{
36-
label: "未连接",
36+
label: '未连接',
3737
isLatency: true,
3838
},
3939
{
4040
icon: mdiThemeLightDark,
41-
label: "主题",
41+
label: '主题',
4242
isDesktopNoLabel: true,
4343
isToggleLightDark: true,
4444
},
4545
{
4646
icon: mdiGithub,
47-
label: "GitHub",
47+
label: 'GitHub',
4848
isDesktopNoLabel: true,
49-
href: "https://github.com/iPanelDev/WebConsole",
50-
target: "_blank",
49+
href: 'https://github.com/iPanelDev/WebConsole',
50+
target: '_blank',
5151
},
5252
{
5353
icon: mdiBook,
54-
label: "文档",
54+
label: '文档',
5555
isDesktopNoLabel: true,
56-
href: "https://ipaneldev.github.io/",
57-
target: "_blank",
56+
href: 'https://ipaneldev.github.io/',
57+
target: '_blank',
5858
},
5959
];

src/notification/index.ts

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import { mdiAlert, mdiAlertOctagon, mdiCheck, mdiCheckCircleOutline, mdiInformation } from "@mdi/js";
2-
import { ref } from "vue";
1+
import {
2+
mdiAlert,
3+
mdiAlertOctagon,
4+
mdiCheckCircleOutline,
5+
mdiInformation
6+
} from '@mdi/js';
7+
import { ref } from 'vue';
38

49
export declare type NotificationOption = {
510
type: NotificationType;
@@ -10,24 +15,24 @@ export declare type NotificationOption = {
1015
};
1116

1217
export declare type NotificationType =
13-
| "white"
14-
| "light"
15-
| "info"
16-
| "success"
17-
| "contrast"
18-
| "warning"
19-
| "danger";
18+
| 'white'
19+
| 'light'
20+
| 'info'
21+
| 'success'
22+
| 'contrast'
23+
| 'warning'
24+
| 'danger';
2025

2126
export const notificationMap = ref(new Map<string, NotificationOption>());
2227

2328
const acceptables = [
24-
"white",
25-
"light",
26-
"info",
27-
"success",
28-
"contrast",
29-
"warning",
30-
"danger",
29+
'white',
30+
'light',
31+
'info',
32+
'success',
33+
'contrast',
34+
'warning',
35+
'danger',
3136
];
3237

3338
export const defaultIcons = {
@@ -44,22 +49,22 @@ let id = 0;
4449
* @param option 选项
4550
*/
4651
export function createNotify(option: NotificationOption | string) {
47-
if (typeof option === "string") {
48-
createNotify({ message: option, type: "info", title: "提示" });
52+
if (typeof option === 'string') {
53+
createNotify({ message: option, type: 'info', title: '提示' });
4954
return;
5055
}
5156

5257
const {
5358
type,
54-
title = "",
55-
message = "",
59+
title = '',
60+
message = '',
5661
duration = 5000,
5762
icon = defaultIcons[type],
5863
} = option;
5964

60-
if (!acceptables.includes(type)) throw new TypeError("`type`类型错误");
65+
if (!acceptables.includes(type)) throw new TypeError('`type`类型错误');
6166

62-
if (typeof message != "string") throw new TypeError("`message`类型错误");
67+
if (typeof message != 'string') throw new TypeError('`message`类型错误');
6368

6469
const currentId = id.toString();
6570

0 commit comments

Comments
 (0)