From 060b71a7216c0a33357c391a59936e42fbf174e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=81=E9=80=9F=E8=9C=97=E7=89=9B?= <31986081+Jisu-Woniu@users.noreply.github.com> Date: Tue, 8 Oct 2024 11:14:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=9A=A8=20replace=20const=20enums?= =?UTF-8?q?=20with=20normal=20enums?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://biomejs.dev/linter/rules/no-const-enum/ --- src/App.vue | 8 ++++---- src/command.ts | 2 +- src/components/FileSelector.vue | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5db2944..458bd19 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,10 +15,10 @@ import { mdiFileCheck, mdiFileKey, mdiKeyChain } from "@mdi/js"; import { useSessionStorage } from "@vueuse/core"; import ColorSwitcher from "@/components/ColorSwitcher.vue"; -const enum Tab { - sign, - validate, - keygen, +enum Tab { + sign = 0, + validate = 1, + keygen = 2, } const tab = useSessionStorage("tab", Tab.sign); diff --git a/src/command.ts b/src/command.ts index 9384f3a..888e6ea 100644 --- a/src/command.ts +++ b/src/command.ts @@ -19,7 +19,7 @@ export const generateKeyPair = ( }); // Binary serialized, DO NOT CHANGE THE ORDER! -export const enum FileType { +export enum FileType { file = 0, dir = 1, other = 2, diff --git a/src/components/FileSelector.vue b/src/components/FileSelector.vue index dca8fcd..d0a329e 100644 --- a/src/components/FileSelector.vue +++ b/src/components/FileSelector.vue @@ -3,7 +3,6 @@ import { onMounted, onUnmounted, ref } from "vue"; import { VBtn, VCard, VDialog, VIcon } from "vuetify/components"; import { TauriEvent, type UnlistenFn, listen } from "@tauri-apps/api/event"; import { message, open } from "@tauri-apps/plugin-dialog"; -// import { useVModel } from "@vueuse/core"; import { FileType, detectFileType } from "@/command"; import FolderOpen from "~icons/ic/twotone-folder-open"; import Reject from "~icons/ic/twotone-highlight-off";