fixing path config manual

This commit is contained in:
Warunee Tamkoo 2024-08-08 16:44:31 +07:00
parent abee5bc462
commit c2db1f3d4b
3 changed files with 54 additions and 68 deletions

View file

@ -13,18 +13,7 @@ import type {
export const useMenuDataStore = defineStore("menuUse", () => {
/****************** เมนู **************************/
/** รายการเมนู*/
const menuList = ref<ListMenu[]>([
{
id: "dashboard",
order: 0,
icon: "mdi-home-variant-outline",
sysName: "หน้าแรก",
sysDescription: "หน้าแรก",
path: "dashboard",
parentId: null,
children: [],
},
]);
const menuList = ref<ListMenu[]>([]);
/** ข้อมูล Level3*/
const childLevelTree = ref<ChildLevelTree>({
@ -117,7 +106,19 @@ export const useMenuDataStore = defineStore("menuUse", () => {
*/
function fetchListMenu(data: ListMenu[]) {
if (data) {
menuList.value.push(...data);
menuList.value = [
{
id: "dashboard",
order: 0,
icon: "mdi-home-variant-outline",
sysName: "หน้าแรก",
sysDescription: "หน้าแรก",
path: "dashboard",
parentId: null,
children: [],
},
...data,
];
}
}