chore(release): v0.0.3

This commit is contained in:
René Preuß
2023-02-17 20:19:34 +01:00
parent 6f32d46437
commit ea9f83cb7e
14 changed files with 58 additions and 44 deletions

View File

@@ -7,7 +7,11 @@ declare namespace _default {
link: string;
};
namespace computed {
const thirdLevelLinks: () => never[];
const thirdLevelLinks: () => {
name: string;
icon: string;
to: string;
}[];
}
namespace methods {
function onChange(event: any): void;

View File

@@ -1 +1,2 @@
export function useMenu(data: any): void;
import { MenuOptions } from "../../types";
export declare const useMenu: (options: MenuOptions) => void;

View File

@@ -1,8 +1,7 @@
import {useMenuStore} from "../stores/menu.js";
export const useMenu = (data) => {
const menu = useMenuStore()
if (data.thirdLevelLinks) {
menu.updateThirdLevelLinks(data.thirdLevelLinks)
}
}
import { useMenuStore } from "../stores/menu.mjs";
export const useMenu = (options) => {
const menu = useMenuStore();
if (options.thirdLevelLinks) {
menu.updateThirdLevelLinks(options.thirdLevelLinks);
}
};

View File

@@ -1,5 +1,6 @@
export const useMenuStore: import("pinia").StoreDefinition<"menu", {
thirdLevelLinks: never[];
import { ThirdLevelLink } from "../../types";
export declare const useMenuStore: import("pinia").StoreDefinition<"menu", {
thirdLevelLinks: ThirdLevelLink[];
}, {}, {
updateThirdLevelLinks(links: any): void;
updateThirdLevelLinks(links: Array<ThirdLevelLink>): void;
}>;

View File

@@ -1,14 +1,13 @@
import {defineStore} from 'pinia';
export const useMenuStore = defineStore('menu', {
state: () => {
return {
thirdLevelLinks: []
}
},
actions: {
updateThirdLevelLinks(links) {
this.thirdLevelLinks = links;
},
},
})
import { defineStore } from "pinia";
export const useMenuStore = defineStore("menu", {
state: () => {
return {
thirdLevelLinks: []
};
},
actions: {
updateThirdLevelLinks(links) {
this.thirdLevelLinks = links;
}
}
});