mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
819 B
TypeScript
40 lines
819 B
TypeScript
/*
|
|
* menu.ts
|
|
* Copyright (C) 2024 veypi <i@veypi.com>
|
|
* 2024-06-07 17:51
|
|
* Distributed under terms of the MIT license.
|
|
*/
|
|
|
|
interface item {
|
|
ico: string
|
|
name: string
|
|
path: string
|
|
label?: string
|
|
subs?: item[]
|
|
}
|
|
|
|
const default_menu: item[] = [
|
|
// { ico: 'home', name: 'menu.app', path: '/' },
|
|
// { ico: 'user', name: 'menu.user', path: '/user' },
|
|
// { ico: 'file-exception', name: 'menu.doc', path: '/docs' },
|
|
// { ico: 'data-view', name: 'menu.appstat', path: '/stats' },
|
|
// { ico: 'setting', name: 'menu.setting', path: '/setting' },
|
|
]
|
|
|
|
export const useMenuStore = defineStore('menu', {
|
|
state: () => ({
|
|
menus: default_menu as item[]
|
|
}),
|
|
getters: {
|
|
},
|
|
actions: {
|
|
set(list: item[]) {
|
|
this.menus = list
|
|
},
|
|
default() {
|
|
this.menus = default_menu
|
|
}
|
|
},
|
|
});
|
|
|