save
This commit is contained in:
@@ -33,9 +33,9 @@ let isDictation = $ref(true)
|
||||
let activeIndex = $ref(-1)
|
||||
const store = useBaseStore()
|
||||
|
||||
const [playKeySound, setAudio] = useSound([机械0, 机械1, 机械2, 机械3], 1)
|
||||
// const [playKeySound, setAudio] = useSound([机械0, 机械1, 机械2, 机械3], 1)
|
||||
// const [playKeySound, setAudio] = useSound([老式机械], 3)
|
||||
// const [playKeySound, setAudio] = useSound([电话打字的声音Mp3], 3)
|
||||
const [playKeySound, setAudio] = useSound([电话打字的声音Mp3], 3)
|
||||
const [playBeep] = useSound([beep], 1)
|
||||
const [playCorrect] = useSound([correct], 1)
|
||||
const [playAudio] = usePlayWordAudio()
|
||||
@@ -101,7 +101,7 @@ function onKeyUp(e: KeyboardEvent) {
|
||||
|
||||
async function onKeyDown(e: KeyboardEvent) {
|
||||
//TODO 还有横杠
|
||||
if (e.keyCode >= 65 && e.keyCode <= 90 || e.code === 'Space') {
|
||||
if ((e.keyCode >= 65 && e.keyCode <= 90) || e.code === 'Space') {
|
||||
let letter = e.key
|
||||
if ((input + letter).toLowerCase() === store.word.name.toLowerCase().slice(0, input.length + 1)) {
|
||||
input += letter
|
||||
@@ -168,7 +168,7 @@ const {appearance, toggle} = useThemeColor()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- <Backgorund/>-->
|
||||
<!-- <Backgorund/>-->
|
||||
<div class="main-page">
|
||||
<div class="center">
|
||||
<Toolbar/>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
--color-second-bg: rgb(238, 240, 244);
|
||||
--color-header-bg: white;
|
||||
--color-font: black;
|
||||
//--color-item-hover: ;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] {
|
||||
|
||||
@@ -87,11 +87,13 @@ watch(() => props.list, () => {
|
||||
|
||||
&.active {
|
||||
background: $second;
|
||||
color: white;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
//background: $dark-main-bg;
|
||||
background: $item-hover;
|
||||
//background: $item-hover;
|
||||
background: rgb(226,226,226);
|
||||
}
|
||||
|
||||
.left {
|
||||
|
||||
18
src/types.ts
18
src/types.ts
@@ -12,7 +12,12 @@ export type Config = {
|
||||
chapterIndex: number,
|
||||
wordIndex: number,
|
||||
}
|
||||
export type Word = {"name": string, "usphone": string, "ukphone": string, "trans": string[]}
|
||||
export type Word = {
|
||||
"name": string,
|
||||
"usphone": string,
|
||||
"ukphone": string,
|
||||
"trans": string[]
|
||||
}
|
||||
|
||||
export const SaveKey = 'bb-word-config'
|
||||
|
||||
@@ -101,6 +106,17 @@ export interface Dict extends DictJson {
|
||||
wordIndex: number,
|
||||
}
|
||||
|
||||
interface DictLog {
|
||||
startDate: number,//开始日期
|
||||
endDate: number//结束日期
|
||||
chapterWordNumber: number//章节单词数量
|
||||
chapterLog: {
|
||||
startDate: number,//开始日期
|
||||
endDate: number//结束日期
|
||||
correctRate: number//正确率
|
||||
}
|
||||
}
|
||||
|
||||
export interface State {
|
||||
newWordDict: {
|
||||
type: DictType,
|
||||
|
||||
Reference in New Issue
Block a user