fix: 修复管理端前端类型校验问题

- 修正知识库与 Bot 设置页相关组件的类型定义和空值处理

- 补齐工作流与公开聊天页的前端类型约束和动态导入类型

- 收敛本次改动文件的局部格式与样式规范,确保 pnpm check:type 通过
This commit is contained in:
2026-04-05 20:36:25 +08:00
parent b5dd427920
commit bb72e19c84
15 changed files with 361 additions and 244 deletions

View File

@@ -1689,9 +1689,9 @@ const handleBasicInfoChange = async (
.publish-external-item {
display: flex;
min-width: 0;
flex-direction: column;
gap: 8px;
min-width: 0;
padding: 12px;
background: var(--el-bg-color);
border-radius: 8px;
@@ -1740,24 +1740,23 @@ const handleBasicInfoChange = async (
width: 100%;
max-width: 100%;
max-height: 180px;
margin: 0;
overflow-x: auto;
overflow-y: auto;
padding: 10px 12px;
margin: 0;
overflow: auto;
}
.publish-external-code-block code {
display: block;
min-width: 0;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
font-family:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
'Courier New', monospace;
font-size: 12px;
line-height: 1.6;
color: #d8e1f0;
word-break: normal;
overflow-wrap: anywhere;
white-space: pre-wrap;
}
.publish-external-code-block code .hljs-tag,
@@ -1861,11 +1860,11 @@ const handleBasicInfoChange = async (
.bot-avatar-label,
.bot-basic-form-label {
flex: 0 0 60px;
padding-right: 16px;
font-size: 14px;
font-weight: 500;
color: var(--el-text-color-primary);
text-align: left;
padding-right: 16px;
}
.bot-avatar-upload-wrap {
@@ -1884,8 +1883,8 @@ const handleBasicInfoChange = async (
.bot-avatar-upload-wrap :deep(.avatar-uploader .avatar) {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
border-radius: 50%;
}
.bot-avatar-upload-wrap :deep(.el-icon.avatar-uploader-icon) {
@@ -1911,20 +1910,20 @@ const handleBasicInfoChange = async (
.knowledge-binding-item {
display: flex;
gap: 16px;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 12px;
border-radius: 8px;
background-color: hsl(var(--background));
border-radius: 8px;
}
.knowledge-binding-main {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
flex: 1;
gap: 10px;
align-items: center;
min-width: 0;
}
.knowledge-binding-content {
@@ -1939,18 +1938,18 @@ const handleBasicInfoChange = async (
}
.knowledge-binding-description {
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
line-height: 20px;
color: var(--el-text-color-secondary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.knowledge-binding-actions {
display: flex;
align-items: center;
gap: 12px;
align-items: center;
}
.knowledge-binding-select {