feat: 文档下载页的i18n适配
This commit is contained in:
@ -8,15 +8,17 @@
|
|||||||
</template>
|
</template>
|
||||||
<dl class="text-gray-600 space-y-1 mb-6">
|
<dl class="text-gray-600 space-y-1 mb-6">
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">类型:</dt>
|
<dt class="font-semibold inline">{{ $t('document-meta.type') }}:</dt>
|
||||||
<dd class="inline">{{ file.type }}</dd>
|
<dd class="inline">{{ file.type }}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">大小:</dt>
|
<dt class="font-semibold inline">{{ $t('document-meta.size') }}:</dt>
|
||||||
<dd class="inline">{{ formatFileSize(file.filesize) }}</dd>
|
<dd class="inline">{{ formatFileSize(file.filesize) }}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<dt class="font-semibold inline">上传时间:</dt>
|
<dt class="font-semibold inline">
|
||||||
|
{{ $t('document-meta.upload-at') }}:
|
||||||
|
</dt>
|
||||||
<dd class="inline">
|
<dd class="inline">
|
||||||
{{ new Date(file.uploaded_on).toLocaleDateString() }}
|
{{ new Date(file.uploaded_on).toLocaleDateString() }}
|
||||||
</dd>
|
</dd>
|
||||||
@ -24,10 +26,12 @@
|
|||||||
</dl>
|
</dl>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<el-button type="primary" @click="handleDownload">下载</el-button>
|
<el-button type="primary" @click="handleDownload">{{
|
||||||
<el-button v-if="file.previewable" @click="handlePreview"
|
$t('document-action.download')
|
||||||
>预览</el-button
|
}}</el-button>
|
||||||
>
|
<el-button v-if="file.previewable" @click="handlePreview">{{
|
||||||
|
$t('document-action.preview')
|
||||||
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1 class="page-title">文件下载</h1>
|
<h1 class="page-title">{{ $t('navigation.downloads') }}</h1>
|
||||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!pending" class="page-content">
|
<div v-if="!pending" class="page-content">
|
||||||
|
|||||||
@ -81,6 +81,12 @@
|
|||||||
},
|
},
|
||||||
"document-meta": {
|
"document-meta": {
|
||||||
"size": "Size",
|
"size": "Size",
|
||||||
"format": "Format"
|
"format": "Format",
|
||||||
|
"type": "Type",
|
||||||
|
"upload-at": "Upload at"
|
||||||
|
},
|
||||||
|
"document-action": {
|
||||||
|
"download": "Download",
|
||||||
|
"preview": "Preview"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,6 +80,12 @@
|
|||||||
},
|
},
|
||||||
"document-meta": {
|
"document-meta": {
|
||||||
"size": "大小",
|
"size": "大小",
|
||||||
"format": "格式"
|
"format": "格式",
|
||||||
|
"type": "类型",
|
||||||
|
"upload-at": "上传时间"
|
||||||
|
},
|
||||||
|
"document-action": {
|
||||||
|
"download": "下载",
|
||||||
|
"preview": "预览"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user