feat: 竞赛主页中文
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
const props = defineProps<{
|
||||
status: string
|
||||
type: 'pdf' | 'video'
|
||||
@@ -29,16 +32,16 @@
|
||||
|
||||
const textMap: Record<string, string> = {
|
||||
idle: '',
|
||||
uploading: 'Upload in progress…',
|
||||
success: 'Uploaded Successfully',
|
||||
error: 'Upload failed'
|
||||
uploading: computed(() => t('AwardsPage.uploadInProgress')).value,
|
||||
success: computed(() => t('AwardsPage.uploadSuccess')).value,
|
||||
error: computed(() => t('AwardsPage.uploadFailed')).value
|
||||
}
|
||||
|
||||
const tips = computed(() => {
|
||||
if (props.type === 'pdf') {
|
||||
return 'PDF file, max 20MB'
|
||||
return t('AwardsPage.pdfFileTip')
|
||||
} else if (props.type === 'video') {
|
||||
return 'Video file (MP4, MOV), 1080p, max 100MB'
|
||||
return t('AwardsPage.videoFileTip')
|
||||
}
|
||||
return ''
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user