{{ word.name }}
{{ word.usphone }}
@@ -46,6 +46,12 @@ const emit = defineEmits<{
}
}
+.active {
+ .phonetic {
+ color: white !important;
+ }
+}
+
.title {
display: flex;
align-items: center;
diff --git a/src/components/WordList.vue b/src/components/WordList.vue
index 3cdb6fad..fa16ccfe 100644
--- a/src/components/WordList.vue
+++ b/src/components/WordList.vue
@@ -3,12 +3,11 @@ import {Word} from "../types";
import {watch} from "vue"
import {useSettingStore} from "@/stores/setting.ts";
import WordItem from "@/components/WordItem.vue";
+import ListItem from "@/components/ListItem.vue";
+import VolumeIcon from "@/components/VolumeIcon.vue";
+import {usePlayWordAudio} from "@/hooks/sound.ts";
+
-const settingStore = useSettingStore()
-const emit = defineEmits<{
- del: [i: number],
- change: [i: number]
-}>()
const props = withDefaults(defineProps<{
list: Word[],
activeIndex?: number,
@@ -18,6 +17,13 @@ const props = withDefaults(defineProps<{
isActive: false
})
+const emit = defineEmits<{
+ del: [i: number],
+ change: [i: number]
+}>()
+
+const settingStore = useSettingStore()
+
const listRef: HTMLElement = $ref(null as any)
function scrollViewToCenter(index: number) {
@@ -41,19 +47,26 @@ watch(() => props.list, () => {
listRef.scrollTo(0, 0)
})
+const playWordAudio = usePlayWordAudio()
+
-
-
-
-
-
+
+
+ {{ word.name }}
+ {{ word.usphone }}
+
+
+ {{ word.trans.join(';') }}
+
@@ -64,12 +77,47 @@ watch(() => props.list, () => {
.list {
display: flex;
flex-direction: column;
- gap: 12rem;
- width: 100%;
- height: 100%;
- box-sizing: border-box;
+ gap: 15rem;
+ flex: 1;
+ overflow: overlay;
padding: 0 $space;
- overflow: auto;
+ .item {
+ .volume {
+ opacity: 0;
+ }
+
+ &:hover {
+ .volume {
+ opacity: 1;
+ }
+ }
+
+ &.active {
+ .phonetic {
+ color: white !important;
+ }
+ }
+
+ .title {
+ display: flex;
+ align-items: center;
+ gap: 8rem;
+
+ .word {
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
+ display: flex;
+ }
+
+ .phonetic {
+ font-size: 14rem;
+ color: gray;
+ }
+ }
+
+ .translate {
+ font-size: 16rem;
+ }
+ }
}
diff --git a/src/stores/base.ts b/src/stores/base.ts
index f9419a47..bbc4237d 100644
--- a/src/stores/base.ts
+++ b/src/stores/base.ts
@@ -194,10 +194,10 @@ export const useBaseStore = defineStore('base', {
}
],
current: {
- dictType: DictType.word,
- index: 1,
- // dictType: DictType.article,
- // index: 0,
+ // dictType: DictType.word,
+ // index: 1,
+ dictType: DictType.article,
+ index: 0,
practiceType: DictType.word,
},
simpleWords: [