From 915b104b8a40513fa225287ba139230abe708bbc Mon Sep 17 00:00:00 2001
From: archer <545436317@qq.com>
Date: Tue, 11 Apr 2023 16:32:07 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E8=BE=93=E5=85=A5=E5=BC=95=E5=AF=BC?=
=?UTF-8?q?=E3=80=82=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=E7=BC=96=E7=A0=81?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F=E3=80=82=E5=88=97=E8=A1=A8=E6=95=B0=E5=AD=97?=
=?UTF-8?q?=E8=A2=AB=E9=9A=90=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Markdown/index.module.scss | 2 +-
src/pages/model/detail/components/InputDataModal.tsx | 8 ++++++--
src/pages/model/detail/components/ModelEditForm.tsx | 4 ++--
src/service/errorCode.ts | 2 +-
src/styles/reset.scss | 5 +++++
src/utils/file.ts | 2 +-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/components/Markdown/index.module.scss b/src/components/Markdown/index.module.scss
index 30466dbb3..32da9ef0a 100644
--- a/src/components/Markdown/index.module.scss
+++ b/src/components/Markdown/index.module.scss
@@ -160,7 +160,7 @@
}
.markdown ul,
.markdown ol {
- padding-left: 1em;
+ padding-left: 2em;
}
.markdown ul.no-list,
.markdown ol.no-list {
diff --git a/src/pages/model/detail/components/InputDataModal.tsx b/src/pages/model/detail/components/InputDataModal.tsx
index 95352234f..8dba1497a 100644
--- a/src/pages/model/detail/components/InputDataModal.tsx
+++ b/src/pages/model/detail/components/InputDataModal.tsx
@@ -124,7 +124,9 @@ const InputDataModal = ({
问题
diff --git a/src/service/errorCode.ts b/src/service/errorCode.ts
index 933fa97f3..14b3efbbf 100644
--- a/src/service/errorCode.ts
+++ b/src/service/errorCode.ts
@@ -8,7 +8,7 @@ export const openaiError: Record = {
};
export const openaiError2: Record = {
insufficient_quota: 'API 余额不足',
- invalid_request_error: '输入参数异常'
+ invalid_request_error: 'openai 接口异常'
};
export const proxyError: Record = {
ECONNABORTED: true,
diff --git a/src/styles/reset.scss b/src/styles/reset.scss
index c83359de7..f029de10b 100644
--- a/src/styles/reset.scss
+++ b/src/styles/reset.scss
@@ -49,6 +49,11 @@ svg {
background: #999;
}
+input::placeholder,
+textarea::placeholder {
+ font-size: 0.85em;
+}
+
@media (max-width: 900px) {
html {
font-size: 14px;
diff --git a/src/utils/file.ts b/src/utils/file.ts
index 6962b3123..1b1fb233d 100644
--- a/src/utils/file.ts
+++ b/src/utils/file.ts
@@ -125,7 +125,7 @@ export const fileDownload = ({
filename: string;
}) => {
// 导出为文件
- const blob = new Blob([text], { type: `${type};charset=utf-8` });
+ const blob = new Blob([`\uFEFF${text}`], { type: `${type};charset=utf-8;` });
// 创建下载链接
const downloadLink = document.createElement('a');