fix: 修复管理端前端 lint 与构建问题

- 收敛 easyflow-ui-admin 的 lint、格式和类型问题

- 修正 demo 页面与管理端前端构建失败点

- 验证 pnpm lint 与 pnpm build 均已通过
This commit is contained in:
2026-04-05 21:39:13 +08:00
parent bb72e19c84
commit 7e7c236c2a
240 changed files with 5151 additions and 4701 deletions

View File

@@ -268,76 +268,85 @@ const backDoc = () => {
<style scoped>
.document-container {
width: 100%;
display: flex;
height: 100%;
padding: 24px 24px 30px 24px;
}
.doc-container {
height: 100%;
width: 100%;
height: 100%;
padding: 24px 24px 30px;
}
.doc-container {
box-sizing: border-box;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.doc-table-content {
border-radius: 8px;
width: 100%;
box-sizing: border-box;
padding: 20px 14px 0 14px;
background-color: var(--el-bg-color);
flex: 1;
height: 100%;
}
.doc-table-content {
box-sizing: border-box;
flex: 1;
width: 100%;
padding: 20px 14px 0;
background-color: var(--el-bg-color);
border-radius: 8px;
}
.doc-header {
width: 100%;
margin: 0 auto;
padding-bottom: 21px;
margin: 0 auto;
}
.doc-content {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
gap: 12px;
width: 100%;
height: 100%;
}
.doc-top-menu {
flex: 1;
width: auto;
border-radius: 0;
background-color: transparent;
padding: 0;
display: flex;
flex: 1;
flex-wrap: wrap;
gap: 6px;
min-height: 32px;
align-items: center;
width: auto;
min-height: 32px;
padding: 0;
background-color: transparent;
border-radius: 0;
}
.doc-menu-item {
border: 1px solid transparent;
background: transparent;
padding: 7px 14px;
border-radius: 8px;
font-size: 14px;
color: var(--el-text-color-secondary);
font-weight: 500;
color: var(--el-text-color-secondary);
cursor: pointer;
background: transparent;
border: 1px solid transparent;
border-radius: 8px;
transition:
background-color 0.2s,
color 0.2s,
border-color 0.2s,
box-shadow 0.2s;
}
.doc-menu-item:hover {
background-color: var(--el-fill-color-light);
color: var(--el-text-color-primary);
background-color: var(--el-fill-color-light);
}
.doc-menu-item.active {
font-weight: 600;
color: var(--el-color-primary);
background-color: var(--el-color-primary-light-9);
border-color: var(--el-color-primary-light-7);
box-shadow: 0 2px 10px rgb(64 158 255 / 16%);
font-weight: 600;
}
.doc-menu-item:focus-visible {
outline: 2px solid var(--el-color-primary-light-5);
outline-offset: 1px;
@@ -353,52 +362,59 @@ const backDoc = () => {
.doc-table {
background-color: var(--el-bg-color);
}
.doc-imp-container {
box-sizing: border-box;
flex: 1;
width: 100%;
box-sizing: border-box;
}
.doc-header-container {
display: flex;
flex-direction: column;
width: 100%;
}
.doc-knowledge-container {
display: flex;
flex-direction: row;
gap: 8px;
align-items: center;
margin-bottom: 20px;
gap: 8px;
}
.knowledge-info-container {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 160px;
}
.title {
font-weight: 500;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 24px;
text-align: left;
font-style: normal;
text-transform: none;
}
.description {
font-weight: 400;
font-size: 14px;
color: #75808d;
line-height: 22px;
text-align: left;
font-style: normal;
font-weight: 400;
line-height: 22px;
color: #75808d;
text-align: left;
text-transform: none;
}
.doc-search-container {
display: flex;
width: 100%;
height: 100%;
display: flex;
}
.menu-container {
flex: 1;
}

View File

@@ -601,9 +601,9 @@ function changeCategory(category: any) {
<style scoped>
h1 {
text-align: center;
margin-bottom: 30px;
color: #303133;
text-align: center;
}
.knowledge-scope-chip {
@@ -616,7 +616,7 @@ h1 {
font-weight: 600;
line-height: 1;
color: hsl(var(--text-strong));
background: hsl(var(--surface-subtle) / 0.92);
background: hsl(var(--surface-subtle) / 92%);
border: 1px solid hsl(var(--line-subtle));
border-radius: 999px;
transition:
@@ -632,15 +632,15 @@ button.knowledge-scope-chip {
}
button.knowledge-scope-chip:hover {
box-shadow: 0 10px 22px -18px hsl(var(--foreground) / 32%);
transform: translateY(-1px);
box-shadow: 0 10px 22px -18px hsl(var(--foreground) / 0.32);
}
button.knowledge-scope-chip:focus-visible {
outline: none;
box-shadow:
0 0 0 4px hsl(var(--primary) / 0.12),
0 10px 22px -18px hsl(var(--foreground) / 0.32);
0 0 0 4px hsl(var(--primary) / 12%),
0 10px 22px -18px hsl(var(--foreground) / 32%);
}
button.knowledge-scope-chip:disabled {
@@ -663,20 +663,20 @@ button.knowledge-scope-chip:disabled {
.knowledge-scope-chip--private {
color: hsl(var(--primary));
background: hsl(var(--primary) / 0.09);
border-color: hsl(var(--primary) / 0.2);
background: hsl(var(--primary) / 9%);
border-color: hsl(var(--primary) / 20%);
}
.knowledge-scope-chip--dept {
color: hsl(var(--warning));
background: hsl(var(--warning) / 0.12);
border-color: hsl(var(--warning) / 0.2);
background: hsl(var(--warning) / 12%);
border-color: hsl(var(--warning) / 20%);
}
.knowledge-scope-chip--public {
color: hsl(var(--success));
background: hsl(var(--success) / 0.12);
border-color: hsl(var(--success) / 0.2);
background: hsl(var(--success) / 12%);
border-color: hsl(var(--success) / 20%);
}
.knowledge-scope-panel {
@@ -687,9 +687,9 @@ button.knowledge-scope-chip:disabled {
.knowledge-scope-option {
display: flex;
gap: 10px;
align-items: center;
justify-content: space-between;
gap: 10px;
width: 100%;
padding: 10px 8px;
text-align: left;
@@ -703,12 +703,12 @@ button.knowledge-scope-chip:disabled {
}
.knowledge-scope-option:hover {
background: hsl(var(--foreground) / 0.04);
background: hsl(var(--foreground) / 4%);
}
.knowledge-scope-option:focus-visible {
outline: none;
box-shadow: 0 0 0 4px hsl(var(--primary) / 0.12);
box-shadow: 0 0 0 4px hsl(var(--primary) / 12%);
}
.knowledge-scope-option:disabled {
@@ -729,8 +729,8 @@ button.knowledge-scope-chip:disabled {
justify-content: center;
width: 30px;
height: 30px;
border-radius: 9px;
background: transparent;
border-radius: 9px;
}
.knowledge-scope-option__icon {
@@ -764,29 +764,29 @@ button.knowledge-scope-chip:disabled {
.knowledge-scope-option--private .knowledge-scope-option__icon-wrap {
color: hsl(var(--primary));
background: hsl(var(--primary) / 0.1);
background: hsl(var(--primary) / 10%);
}
.knowledge-scope-option--dept .knowledge-scope-option__icon-wrap {
color: hsl(var(--warning));
background: hsl(var(--warning) / 0.12);
background: hsl(var(--warning) / 12%);
}
.knowledge-scope-option--public .knowledge-scope-option__icon-wrap {
color: hsl(var(--success));
background: hsl(var(--success) / 0.12);
background: hsl(var(--success) / 12%);
}
.knowledge-scope-option--private.knowledge-scope-option--active {
background: hsl(var(--primary) / 0.08);
background: hsl(var(--primary) / 8%);
}
.knowledge-scope-option--dept.knowledge-scope-option--active {
background: hsl(var(--warning) / 0.08);
background: hsl(var(--warning) / 8%);
}
.knowledge-scope-option--public.knowledge-scope-option--active {
background: hsl(var(--success) / 0.08);
background: hsl(var(--success) / 8%);
}
.knowledge-scope-option--private .knowledge-scope-option__check {
@@ -803,8 +803,8 @@ button.knowledge-scope-chip:disabled {
:global(.knowledge-visibility-popover.el-popover.el-popper) {
padding: 8px;
border-radius: 16px;
border-color: hsl(var(--line-subtle));
box-shadow: 0 18px 34px -28px hsl(var(--foreground) / 0.2);
border-radius: 16px;
box-shadow: 0 18px 34px -28px hsl(var(--foreground) / 20%);
}
</style>

View File

@@ -162,17 +162,19 @@ const handleDelete = (row: any) => {
flex-direction: column;
justify-content: space-between;
}
.file-name-container {
display: flex;
align-items: center;
}
.title {
font-weight: 500;
font-size: 14px;
color: #1a1a1a;
line-height: 20px;
text-align: left;
font-style: normal;
font-weight: 500;
line-height: 20px;
color: #1a1a1a;
text-align: left;
text-transform: none;
}
</style>

View File

@@ -252,8 +252,8 @@ onBeforeUnmount(() => {
.faq-form :deep(.el-input__wrapper),
.faq-form :deep(.el-select__wrapper) {
border-radius: 10px;
min-height: 42px;
border-radius: 10px;
transition: box-shadow 0.2s ease;
}
@@ -264,17 +264,17 @@ onBeforeUnmount(() => {
.field-tip {
margin-top: 6px;
color: var(--el-text-color-secondary);
font-size: 12px;
line-height: 18px;
color: var(--el-text-color-secondary);
}
.editor-wrapper {
width: 100%;
overflow: hidden;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 12px;
background: var(--el-fill-color-blank);
overflow: hidden;
box-shadow: 0 8px 24px rgb(15 23 42 / 4%);
transition:
border-color 0.2s ease,
@@ -287,16 +287,16 @@ onBeforeUnmount(() => {
}
:deep(.w-e-toolbar) {
border-bottom: 1px solid var(--el-border-color-light);
background: var(--el-fill-color-blank);
padding: 8px 10px;
background: var(--el-fill-color-blank);
border-bottom: 1px solid var(--el-border-color-light);
}
:deep(.w-e-text-container) {
height: 340px;
min-height: 340px;
background: var(--el-fill-color-blank);
cursor: text;
background: var(--el-fill-color-blank);
}
:deep(.w-e-text-container .w-e-scroll) {
@@ -315,8 +315,8 @@ onBeforeUnmount(() => {
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 12px;
justify-content: flex-end;
}
.footer-btn {
@@ -324,13 +324,13 @@ onBeforeUnmount(() => {
}
:deep(.faq-edit-dialog .el-dialog) {
border-radius: 14px;
overflow: hidden;
border-radius: 14px;
}
:deep(.faq-edit-dialog .el-dialog__header) {
margin-right: 0;
padding: 18px 22px;
margin-right: 0;
border-bottom: 1px solid var(--el-border-color-lighter);
}

View File

@@ -298,31 +298,31 @@ const handleImport = async () => {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-light);
border-radius: 10px;
background: var(--el-fill-color-blank);
padding: 10px 12px;
}
.selected-file-main {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
flex: 1;
gap: 10px;
align-items: center;
min-width: 0;
}
.selected-file-icon {
color: var(--el-text-color-secondary);
font-size: 18px;
color: var(--el-text-color-secondary);
}
.selected-file-name {
color: var(--el-text-color-primary);
font-size: 14px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
font-weight: 500;
color: var(--el-text-color-primary);
white-space: nowrap;
}
@@ -335,10 +335,10 @@ const handleImport = async () => {
}
.result-wrap {
border: 1px solid var(--el-border-color-light);
border-radius: 12px;
padding: 14px;
background: var(--el-fill-color-light);
border: 1px solid var(--el-border-color-light);
border-radius: 12px;
}
.result-head {
@@ -350,8 +350,8 @@ const handleImport = async () => {
.result-title-wrap {
display: flex;
align-items: center;
gap: 8px;
align-items: center;
}
.result-state-icon {
@@ -371,24 +371,24 @@ const handleImport = async () => {
}
.stat-item {
padding: 10px 12px;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 8px;
padding: 10px 12px;
}
.stat-label {
color: var(--el-text-color-secondary);
margin-bottom: 8px;
font-size: 12px;
line-height: 1;
margin-bottom: 8px;
color: var(--el-text-color-secondary);
}
.stat-value {
color: var(--el-text-color-primary);
font-size: 22px;
font-weight: 600;
line-height: 1;
color: var(--el-text-color-primary);
}
.success-text {
@@ -414,14 +414,14 @@ const handleImport = async () => {
:deep(.faq-upload-area .el-upload-dragger) {
padding: 0;
border-radius: 10px;
background-color: var(--el-fill-color-blank);
border-radius: 10px;
transition: all 0.3s;
}
:deep(.faq-upload-area .el-upload-dragger:hover) {
border-color: var(--el-color-primary);
background-color: var(--el-color-primary-light-9);
border-color: var(--el-color-primary);
}
@media (max-width: 768px) {

View File

@@ -1000,37 +1000,37 @@ onMounted(() => {
}
.faq-category-pane {
width: 236px;
min-width: 236px;
border: 1px solid var(--el-border-color-lighter);
border-radius: 12px;
background: var(--el-fill-color-blank);
display: flex;
flex-direction: column;
width: 236px;
min-width: 236px;
overflow: hidden;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 12px;
}
.faq-category-header {
display: flex;
justify-content: space-between;
align-items: center;
justify-content: space-between;
padding: 10px;
border-bottom: 1px solid var(--el-border-color-lighter);
font-weight: 600;
border-bottom: 1px solid var(--el-border-color-lighter);
}
.faq-category-tree {
flex: 1;
padding: 6px;
overflow: auto;
flex: 1;
}
.faq-category-node {
display: flex;
gap: 6px;
align-items: center;
width: 100%;
min-width: 0;
display: flex;
align-items: center;
gap: 6px;
}
.faq-category-node.is-all-node .faq-category-node-label {
@@ -1053,12 +1053,12 @@ onMounted(() => {
}
.faq-content-pane {
flex: 1;
padding: 14px 16px 8px;
overflow: auto;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 12px;
padding: 14px 16px 8px;
background: var(--el-fill-color-blank);
flex: 1;
overflow: auto;
}
.faq-header {
@@ -1074,18 +1074,18 @@ onMounted(() => {
.faq-toolbar {
display: flex;
gap: 14px;
align-items: center;
justify-content: space-between;
gap: 14px;
padding: 2px 0;
}
.faq-search-actions {
flex: 1;
min-width: 260px;
display: flex;
align-items: center;
flex: 1;
gap: 10px;
align-items: center;
min-width: 260px;
}
.faq-search-input {
@@ -1095,15 +1095,15 @@ onMounted(() => {
.faq-primary-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 10px;
justify-content: flex-end;
}
:deep(.faq-toolbar .el-button) {
height: 38px;
padding: 0 16px;
border-radius: 10px;
font-weight: 500;
border-radius: 10px;
transition:
border-color 0.2s ease,
background-color 0.2s ease,
@@ -1112,15 +1112,15 @@ onMounted(() => {
:deep(.faq-toolbar .el-button:not(.el-button--primary):hover) {
color: hsl(var(--primary));
border-color: hsl(var(--primary) / 45%);
background: hsl(var(--primary) / 7%);
border-color: hsl(var(--primary) / 45%);
}
:deep(.faq-search-input .el-input__wrapper) {
padding-right: 12px;
padding-left: 12px;
border-radius: 10px;
box-shadow: 0 0 0 1px var(--el-border-color) inset;
padding-left: 12px;
padding-right: 12px;
}
:deep(.faq-search-input .el-input__wrapper:hover) {
@@ -1142,8 +1142,8 @@ onMounted(() => {
:deep(.faq-category-tree .el-tree-node__content) {
height: 34px;
border-radius: 8px;
padding-right: 4px;
border-radius: 8px;
}
:deep(.faq-category-tree .el-tree-node__content:hover) {
@@ -1157,8 +1157,8 @@ onMounted(() => {
}
:deep(.el-tree-node.is-current > .el-tree-node__content) {
background-color: hsl(var(--primary) / 15%);
color: hsl(var(--primary));
background-color: hsl(var(--primary) / 15%);
}
:deep(
@@ -1168,8 +1168,8 @@ onMounted(() => {
}
:deep(.el-table) {
border-radius: 10px;
overflow: hidden;
border-radius: 10px;
}
:deep(.el-table th.el-table__cell) {
@@ -1183,8 +1183,8 @@ onMounted(() => {
@media (max-width: 1360px) {
.faq-toolbar {
align-items: flex-start;
flex-direction: column;
align-items: flex-start;
}
.faq-search-actions,

View File

@@ -221,11 +221,11 @@ async function confirmImport() {
.imp-doc-kno-container {
position: relative;
display: flex;
height: 100%;
flex-direction: column;
height: 100%;
padding: 24px;
border-radius: 16px;
background: var(--el-bg-color);
border-radius: 16px;
}
.imp-doc-kno-content {
@@ -239,9 +239,9 @@ async function confirmImport() {
.step-card {
padding: 20px 24px;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-light);
border-radius: 16px;
background: var(--el-fill-color-blank);
}
.step-body {

View File

@@ -323,8 +323,8 @@ function showLengthSettings(strategyCode?: string) {
.strategy-card__header {
display: flex;
justify-content: space-between;
gap: 16px;
justify-content: space-between;
padding-bottom: 16px;
border-bottom: 1px solid var(--el-border-color-lighter);
}
@@ -343,9 +343,9 @@ function showLengthSettings(strategyCode?: string) {
.strategy-card__badges {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: flex-start;
flex-wrap: wrap;
}
.strategy-card__content {
@@ -369,10 +369,10 @@ function showLengthSettings(strategyCode?: string) {
}
.strategy-reason-list {
margin: 0;
padding-left: 18px;
color: var(--el-text-color-regular);
margin: 0;
line-height: 1.7;
color: var(--el-text-color-regular);
}
.strategy-reason-list__item {
@@ -387,7 +387,7 @@ function showLengthSettings(strategyCode?: string) {
.strategy-form {
padding: 16px;
border-radius: 12px;
background: var(--el-fill-color-light);
border-radius: 12px;
}
</style>

View File

@@ -193,9 +193,9 @@ watch(
.preview-panel {
padding: 20px;
background: var(--el-bg-color);
border: 1px solid var(--el-border-color-light);
border-radius: 16px;
background: var(--el-bg-color);
}
.preview-summary {
@@ -212,16 +212,16 @@ watch(
.chunk-card {
padding: 16px;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 14px;
background: var(--el-fill-color-blank);
}
.chunk-card__header {
display: flex;
gap: 12px;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.chunk-card__title {
@@ -244,11 +244,11 @@ watch(
.chunk-card__content {
margin: 16px 0 0;
white-space: pre-wrap;
word-break: break-word;
font-family: inherit;
line-height: 1.7;
color: var(--el-text-color-regular);
overflow-wrap: anywhere;
white-space: pre-wrap;
}
.chunk-card__warnings {
@@ -262,10 +262,10 @@ watch(
display: flex;
flex-direction: column;
gap: 12px;
margin-top: 16px;
padding: 12px;
border-radius: 12px;
margin-top: 16px;
background: var(--el-fill-color-light);
border-radius: 12px;
}
.qa-block__item {
@@ -276,11 +276,11 @@ watch(
.qa-block__label {
display: inline-flex;
width: 22px;
justify-content: center;
border-radius: 999px;
background: var(--el-color-primary-light-9);
color: var(--el-color-primary);
width: 22px;
font-weight: 600;
color: var(--el-color-primary);
background: var(--el-color-primary-light-9);
border-radius: 999px;
}
</style>