save
This commit is contained in:
@@ -14,6 +14,7 @@ export const EventKey = {
|
||||
keyup: 'keyup',
|
||||
onTyping: 'onTyping',
|
||||
repeat: 'repeat',
|
||||
//TODO 废弃
|
||||
next: 'next',
|
||||
write: 'write',
|
||||
editDict: 'editDict',
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user