wip
This commit is contained in:
@@ -21,13 +21,11 @@ defineEmits<{
|
||||
}>()
|
||||
|
||||
const progress = $computed(() => {
|
||||
if (props.item?.complete) return 100
|
||||
return Number(((props.item?.lastLearnIndex / props.item?.length) * 100).toFixed())
|
||||
})
|
||||
|
||||
const studyProgress = $computed(() => {
|
||||
if (!props.showProgress) return
|
||||
if (props.item.complete) return props.item?.length + '/'
|
||||
return props.item?.lastLearnIndex ? props.item?.lastLearnIndex + '/' : ''
|
||||
})
|
||||
</script>
|
||||
@@ -41,14 +39,14 @@ const studyProgress = $computed(() => {
|
||||
<div>{{ studyProgress }}{{ item?.length }}{{ quantifier }}</div>
|
||||
</div>
|
||||
<div class="absolute bottom-2 left-3 right-3">
|
||||
<Progress v-if="(item?.lastLearnIndex || item.complete) && showProgress" class="mt-1"
|
||||
<Progress v-if="(item?.lastLearnIndex) && showProgress" class="mt-1"
|
||||
:percentage="progress"
|
||||
:show-text="false"></Progress>
|
||||
</div>
|
||||
<Checkbox v-if="showCheckbox"
|
||||
:model-value="checked"
|
||||
@change="$emit('check')"
|
||||
class="absolute left-3 bottom-3"/>
|
||||
class="absolute left-3 bottom-3 z-2"/>
|
||||
<div class="custom z-1" v-if="item.custom">自定义</div>
|
||||
<div class="custom bg-red! color-white z-1" v-else-if="item.update">更新中</div>
|
||||
</div>
|
||||
|
||||
@@ -189,7 +189,7 @@ const sentence = $computed(() => {
|
||||
|
||||
<div class="bg-gray-900/30 py-4 center flex-col rounded-2xl">
|
||||
<div class="text-center mb-2 text-xl">
|
||||
我在 {{ APP_NAME }} 学习了 {{ studyStats.time }}
|
||||
我学习了{{ studyStats.time }} {{ baseStore.sdict.name }}
|
||||
</div>
|
||||
<!-- Progress Overview -->
|
||||
<div class="w-90/100 flex items-center gap-space">
|
||||
|
||||
@@ -216,7 +216,7 @@ const simpleWords = $computed({
|
||||
<div class="line"></div>
|
||||
<SettingItem mainTitle="自动切换"/>
|
||||
<SettingItem title="自动切换下一个单词"
|
||||
desc="仅在 **跟写** 时生效,听写、辨认、默写均不会自动切换,需要手动按 **空格键** 切换"
|
||||
desc="仅在 **跟写** 时生效,听写、自测、默写均不会自动切换,需要手动按 **空格键** 切换"
|
||||
>
|
||||
<Switch v-model="settingStore.autoNextWord"/>
|
||||
</SettingItem>
|
||||
|
||||
Reference in New Issue
Block a user