From 2352d58820b5ed53a18e06710abd7ddcf81c5e93 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 29 Aug 2024 16:36:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E4=BD=93=EF=BC=8C=E4=BD=BF=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E8=B6=85=E8=BF=8710=E4=B8=AA=EF=BC=8C10=E4=B8=AA?= =?UTF-8?q?=E4=BB=A5=E5=90=8E=E7=9A=84=E5=AD=97=E4=BD=93=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/font/UploadDetail.vue | 4 +- .../src/views/system/font/index.vue | 61 ++++++++++--------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/core/core-frontend/src/views/system/font/UploadDetail.vue b/core/core-frontend/src/views/system/font/UploadDetail.vue index 4d5e111589..139ad6b40c 100644 --- a/core/core-frontend/src/views/system/font/UploadDetail.vue +++ b/core/core-frontend/src/views/system/font/UploadDetail.vue @@ -75,14 +75,14 @@ defineExpose({ }) const beforeAvatarUpload = rawFile => { - if (rawFile.type !== 'font/ttf') { + if (!rawFile.name.endsWith('.ttf')) { ElMessage.error('只支持上传ttf格式的字体文件!') return false } return true } const onChange = file => { - if (file.raw?.type === 'font/ttf') { + if (file.raw?.name.endsWith('.ttf')) { state.fileList = file } } diff --git a/core/core-frontend/src/views/system/font/index.vue b/core/core-frontend/src/views/system/font/index.vue index 653d829eb2..eb5ec28846 100644 --- a/core/core-frontend/src/views/system/font/index.vue +++ b/core/core-frontend/src/views/system/font/index.vue @@ -128,33 +128,35 @@ onMounted(() => { -
-
- 默认字体 -
- {{ ele.name }} 系统内置 -
-
- 更新时间: {{ new Date(ele.updateTime).toLocaleString() }} - 字库文件: {{ ele.fileName }} -
-
- 上传字库文件 - 替换字库文件 - 设为默认字体 - 删除 +
+
+
+ 默认字体 +
+ {{ ele.name }} 系统内置 +
+
+ 更新时间: {{ new Date(ele.updateTime).toLocaleString() }} + 字库文件: {{ ele.fileName }} +
+
+ 上传字库文件 + 替换字库文件 + 设为默认字体 + 删除 +
@@ -183,12 +185,15 @@ onMounted(() => { } } } + .font-content_overflow { + height: calc(100vh - 146px); + overflow-y: auto; + } .font-content_list { display: flex; flex-wrap: wrap; row-gap: 16px; justify-content: space-between; - .font-content_item { border-radius: 4px; background: #fff;