add context menu options placeholder function

This commit is contained in:
geoffrey45
2022-07-12 18:54:06 +03:00
parent e538b0d4d7
commit 55215e0ad5
2 changed files with 18 additions and 4 deletions
+13 -1
View File
@@ -3,10 +3,22 @@ import normalize from "../composables/normalizeContextMenu";
import { Option } from "../interfaces";
import { ContextSrc } from "../composables/enums";
function getPlaceholders(length: number) {
let list: Option[] = [];
for (let index = 0; index < length; index++) {
list.push("" as Option);
}
return list;
}
getPlaceholders(5);
export default defineStore("context-menu", {
state: () => ({
visible: false,
options: <Option[]>[],
options: getPlaceholders(5),
x: 500,
y: 500,
normalizedX: false,