This commit is contained in:
zyronon
2024-05-19 17:53:22 +08:00
parent 0c1c5d33b0
commit 3c0a0df3bf
26 changed files with 421 additions and 614 deletions

View File

@@ -14,6 +14,7 @@ export const EventKey = {
keyup: 'keyup',
onTyping: 'onTyping',
repeat: 'repeat',
//TODO 废弃
next: 'next',
write: 'write',
editDict: 'editDict',

View File

@@ -4,6 +4,7 @@ import {DefaultSettingState, SettingState} from "@/stores/setting.ts";
import {cloneDeep} from "lodash-es";
import {Dict, DictType} from "@/types.ts";
import {ArchiveReader, libarchiveWasm} from "libarchive-wasm";
import {useRouter} from "vue-router";
export function getRandom(a: number, b: number): number {
return Math.random() * (b - a) + a;
@@ -186,3 +187,13 @@ export function getDictFile(url: string) {
}
})
}
export function useNav() {
const router = useRouter()
function nav(val) {
router.push(val)
}
return {nav, back: router.back}
}