feat:save

This commit is contained in:
zyronon
2025-07-21 03:17:20 +08:00
parent 84ee068c45
commit 60c0273e15
3 changed files with 18 additions and 5 deletions

View File

@@ -476,7 +476,8 @@ footer {
}
.book {
@apply p-4 rounded-md bg-slate-200 relative cursor-pointer h-40 hover:bg-red anim flex flex-col justify-between;
@extend .anim;
@apply p-4 rounded-md bg-slate-200 relative cursor-pointer h-40 hover:bg-orange-200 flex flex-col justify-between;
}
.line {

View File

@@ -6,6 +6,7 @@ defineProps<{
item?: Dict
quantifier?: string
isAdd: boolean
showCheckbox?: boolean
}>()
</script>
@@ -18,6 +19,7 @@ defineProps<{
<div class="text-sm line-clamp-3" v-opacity="item.name !== item.description">{{ item?.description }}</div>
</div>
<div class="absolute bottom-4 right-4">{{ item?.length }}{{ quantifier }}</div>
<el-checkbox v-if="showCheckbox" class="absolute left-3 bottom-2"/>
</template>
<div v-else class="center h-full">
<Icon

View File

@@ -43,7 +43,7 @@ useEvent(EventKey.changeDict, () => {
})
function study() {
if (store.sdict.name) {
if (store.sdict.id) {
nav('study-word', {}, currentStudy)
} else {
ElMessage.warning('请先选择一本词典')
@@ -51,6 +51,16 @@ function study() {
}
}
function setPerDayStudyNumber() {
if (store.sdict.id) {
show = true
tempPerDayStudyNumber = store.sdict.perDayStudyNumber
} else {
ElMessage.warning('请先选择一本词典')
dictListRef.startSearch()
}
}
let show = $ref(false)
let tempPerDayStudyNumber = $ref(0)
@@ -134,9 +144,9 @@ let dictListRef = $ref<any>()
每日目标
<div
style="color:#ac6ed1;"
@click="show = true;tempPerDayStudyNumber = store.sdict.perDayStudyNumber"
@click="setPerDayStudyNumber"
class="bg-slate-200 px-2 h-10 flex center text-2xl rounded cursor-pointer">
{{ store.sdict.perDayStudyNumber }}
{{ store.sdict.id ? store.sdict.perDayStudyNumber : 0 }}
</div>
个单词
</div>
@@ -222,7 +232,7 @@ let dictListRef = $ref<any>()
}}</span>天完成学习
</div>
<div>
要达到最佳效果就坚持每天学习每天学20个单词是最理想的但就算再忙的时候每天学10个也有助你养成良好的学习习惯
要达到最佳效果坚持每天学习每天学20个单词是最理想的但就算再忙的时候每天学10个也有助你养成良好的学习习惯
</div>
</div>
</Dialog>