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

@@ -1,22 +1,22 @@
.tf-btn {
display: flex;
gap: 2px;
align-items: center;
justify-content: center;
gap: 2px;
background: var(--tf-bg-surface);
border: 1px solid var(--tf-border-color-strong);
color: var(--tf-text-primary);
cursor: pointer;
border-radius: 5px;
width: fit-content;
height: fit-content;
padding: 5px;
margin: 0;
height: fit-content;
width: fit-content;
color: var(--tf-text-primary);
cursor: pointer;
background: var(--tf-bg-surface);
border: 1px solid var(--tf-border-color-strong);
border-radius: 5px;
svg {
fill: currentColor;
width: 16px;
height: 16px;
fill: currentcolor;
}
&:hover {
@@ -25,49 +25,48 @@
}
.tf-btn.tf-btn-primary {
background: var(--tf-primary-color);
color: var(--tf-loop-handle-text);
background: var(--tf-primary-color);
&:hover {
border: 1px solid var(--tf-border-color-strong);
background: var(--tf-primary-color-hover);
border: 1px solid var(--tf-border-color-strong);
}
}
.tf-input, .tf-textarea {
display: flex;
border-radius: 5px;
border: 1px solid var(--tf-border-color-strong);
background: var(--tf-bg-input);
color: var(--tf-text-primary);
padding: 5px 8px;
.tf-input,
.tf-textarea {
box-sizing: border-box;
display: flex;
padding: 5px 8px;
overflow-y: hidden;
line-height: normal;
color: var(--tf-text-primary);
resize: vertical;
outline: none;
line-height: normal;
overflow-y: hidden;
background: var(--tf-bg-input);
border: 1px solid var(--tf-border-color-strong);
border-radius: 5px;
&::placeholder {
color: var(--tf-text-muted);
font-size: 12px;
color: var(--tf-text-muted);
}
// 获得焦点时的样式
/* 获得焦点时的样式 */
&:focus {
border-color: var(--tf-primary-color);
box-shadow: var(--tf-focus-shadow);
}
// 禁用时的样式
/* 禁用时的样式 */
&[disabled] {
background-color: var(--tf-bg-input-disabled);
cursor: not-allowed;
color: var(--tf-text-disabled);
cursor: not-allowed;
background-color: var(--tf-bg-input-disabled);
}
}
.tf-select {
display: flex;
width: 100%;
@@ -75,47 +74,48 @@
&-input {
display: flex;
border: 1px solid var(--tf-border-color);
padding: 4px 10px;
border-radius: 6px;
font-size: 13px;
justify-content: space-between;
align-items: center;
justify-content: space-between;
width: 100%;
height: 32px;
padding: 4px 10px;
font-size: 13px;
color: var(--tf-text-primary);
cursor: pointer;
background: var(--tf-bg-input);
height: 32px;
border: 1px solid var(--tf-border-color);
border-radius: 6px;
transition: all 0.2s;
width: 100%;
color: var(--tf-text-primary);
&:hover {
border-color: var(--tf-border-color-strong);
}
&:focus, &.active {
&:focus,
&.active {
border-color: var(--tf-primary-color);
box-shadow: var(--tf-focus-shadow);
}
&-value {
height: 100%;
min-width: 0;
flex: 1;
font-size: 12px;
display: flex;
flex: 1;
align-items: center;
min-width: 0;
height: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 12px;
white-space: nowrap;
}
&-arrow {
display: flex;
flex-shrink: 0;
width: 16px;
height: 16px;
color: var(--tf-text-secondary);
flex-shrink: 0;
margin-left: 4px;
color: var(--tf-text-secondary);
}
&-placeholder {
@@ -124,7 +124,7 @@
}
&-content {
display: none; // 现在改用 .tf-select-wrapper
display: none; /* 现在改用 .tf-select-wrapper */
}
}
@@ -135,67 +135,66 @@
.tf-tabs {
display: flex;
gap: 5px;
align-items: center;
justify-content: center;
gap: 5px;
padding: 5px;
border-radius: 5px;
border: none;
background: var(--tf-bg-muted);
border: none;
border-radius: 5px;
.tf-tabs-item {
flex-grow: 1;
padding: 5px 10px;
cursor: pointer;
border-radius: 5px;
display: flex;
flex-grow: 1;
align-items: center;
justify-content: center;
padding: 5px 10px;
font-size: 14px;
color: var(--tf-text-secondary);
cursor: pointer;
border-radius: 5px;
}
.tf-tabs-item.active {
background: var(--tf-bg-surface);
color: var(--tf-text-primary);
font-weight: 500;
color: var(--tf-text-primary);
background: var(--tf-bg-surface);
box-shadow: var(--tf-shadow-soft);
}
}
h3.tf-heading {
font-weight: 700;
font-size: 14px;
margin-top: 2px;
margin-bottom: 3px;
font-size: 14px;
font-weight: 700;
color: var(--tf-text-primary);
}
.tf-collapse {
border: none;
border-radius: 5px;
//padding: 5px;
/* padding: 5px; */
&-item {
&-title {
display: flex;
align-items: center;
cursor: pointer;
font-size: 14px;
cursor: pointer;
&-icon {
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
padding: 3px;
margin-right: 10px;
color: var(--tf-icon-color);
background: var(--tf-icon-bg);
border-radius: 5px;
padding: 3px;
justify-content: center;
align-items: center;
margin-right: 10px;
svg {
width: 22px;
@@ -212,10 +211,9 @@ h3.tf-heading {
}
}
&-description {
font-size: 12px;
margin: 10px 0;
font-size: 12px;
color: var(--tf-text-muted);
}
}

View File

@@ -1,27 +1,27 @@
.svelte-flow__nodes {
.svelte-flow__node {
box-sizing: border-box;
border: 3px solid transparent;
border-radius: 5px;
box-sizing: border-box;
.svelte-flow__handle {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
background: transparent;
display: flex;
justify-content: center;
align-items: center;
border: none;
&::after {
content: ' ';
background: var(--tf-primary-color);
width: 8px;
height: 8px;
content: ' ';
background: var(--tf-primary-color);
border-radius: 100%;
transition: width 0.1s, height 0.1s;
transition:
width 0.1s,
height 0.1s;
}
&:hover {
@@ -32,17 +32,17 @@
}
}
div.loop_handle_wrapper {
div.loop-handle-wrapper {
&::after {
content: '循环体';
background: var(--tf-primary-color);
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 20px;
border-radius: 0;
display: flex;
color: var(--tf-loop-handle-text);
justify-content: center;
align-items: center;
content: '循环体';
background: var(--tf-primary-color);
border-radius: 0;
}
&:hover {
@@ -53,15 +53,15 @@
}
}
&:after {
content: ' ';
&::after {
position: absolute;
border-radius: 5px;
top: -2px;
left: -2px;
border: 1px solid var(--tf-node-outline-color);
height: calc(100% + 2px);
width: calc(100% + 2px);
height: calc(100% + 2px);
content: ' ';
border: 1px solid var(--tf-node-outline-color);
border-radius: 5px;
}
&:hover {
@@ -73,11 +73,11 @@
box-shadow: var(--xy-node-boxshadow-selected);
}
&:hover:after {
&:hover::after {
display: none;
}
&.selectable.selected:after {
&.selectable.selected::after {
display: none;
}
}
@@ -85,7 +85,10 @@
.tf-flow-line-path {
stroke: var(--xy-edge-stroke);
stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
stroke-width: var(
--xy-edge-stroke-width,
var(--xy-edge-stroke-width-default)
);
}
.tf-flow-line-path--animated {
@@ -97,16 +100,16 @@
from {
stroke-dashoffset: 0;
}
to {
stroke-dashoffset: -14;
}
}
.tf-node-wrapper {
border-radius: 5px;
min-width: 300px;
background: var(--tf-bg-surface);
border-radius: 5px;
&-body {
padding: 10px;
@@ -118,67 +121,69 @@
}
.tf-bottom-dock {
z-index: 200;
position: absolute;
left: 50%;
bottom: var(--tf-toolbar-bottom, 20px);
transform: translateX(-50%);
left: 50%;
z-index: 200;
display: flex;
align-items: center;
gap: 8px;
align-items: center;
transform: translateX(-50%);
}
// 单行统一工具栏
/* 单行统一工具栏 */
.tf-unified-bar {
display: inline-flex;
gap: 2px;
align-items: center;
height: 40px;
padding: 0 4px;
background: var(--tf-bg-surface);
border: 1px solid var(--tf-border-color);
border-radius: 10px;
background: var(--tf-bg-surface);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
padding: 0 4px;
gap: 2px;
box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
> * {
flex-shrink: 0;
}
}
// 分割线
/* 分割线 */
.tf-bar-divider {
flex-shrink: 0;
width: 1px;
height: 20px;
background: var(--tf-border-color);
margin: 0 4px;
flex-shrink: 0;
background: var(--tf-border-color);
}
// 图标按钮
/* 图标按钮 */
.tf-bar-btn {
all: unset;
box-sizing: border-box;
display: inline-flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 7px;
color: var(--tf-text-secondary);
cursor: pointer;
transition: background 0.15s, color 0.15s;
flex-shrink: 0;
border-radius: 7px;
transition:
background 0.15s,
color 0.15s;
svg {
width: 17px;
height: 17px;
fill: currentColor;
pointer-events: none;
fill: currentcolor;
}
&:hover {
background: var(--tf-bg-hover);
color: var(--tf-text-primary);
background: var(--tf-bg-hover);
}
&.tf-bar-btn-active {
@@ -191,26 +196,26 @@
all: unset;
box-sizing: border-box;
display: inline-flex;
flex-shrink: 0;
gap: 6px;
align-items: center;
justify-content: center;
gap: 6px;
height: 32px;
padding: 0 14px;
border-radius: 8px;
background: #13b33f;
color: #fff;
font-size: 14px;
font-weight: 600;
line-height: 1;
color: #fff;
cursor: pointer;
flex-shrink: 0;
background: #13b33f;
border-radius: 8px;
transition: filter 0.15s;
svg {
width: 14px;
height: 14px;
fill: currentColor;
pointer-events: none;
fill: currentcolor;
}
&:hover {
@@ -222,36 +227,38 @@
all: unset;
box-sizing: border-box;
display: inline-flex;
gap: 6px;
align-items: center;
justify-content: center;
gap: 6px;
height: 32px;
padding: 0 12px;
border-radius: 8px;
background: #e9edff;
color: var(--tf-primary-color);
font-size: 13px;
font-weight: 600;
line-height: 1;
color: var(--tf-primary-color);
cursor: pointer;
transition: filter 0.15s, background 0.15s;
background: #e9edff;
border-radius: 8px;
transition:
filter 0.15s,
background 0.15s;
&:hover {
filter: brightness(0.98);
background: #dde5ff;
filter: brightness(0.98);
}
}
// 百分比缩放选择器单元
/* 百分比缩放选择器单元 */
.tf-zoom-select-wrap {
position: relative;
display: inline-flex;
align-items: center;
padding: 0 6px 0 8px;
gap: 4px;
align-items: center;
height: 32px;
border-radius: 7px;
padding: 0 6px 0 8px;
cursor: pointer;
border-radius: 7px;
transition: background 0.15s;
&:hover {
@@ -259,83 +266,80 @@
}
.tf-zoom-icon {
flex-shrink: 0;
width: 14px;
height: 14px;
fill: var(--tf-text-secondary);
pointer-events: none;
flex-shrink: 0;
fill: var(--tf-text-secondary);
}
.tf-zoom-select {
appearance: none;
-webkit-appearance: none;
border: none;
background: transparent;
min-width: 48px;
padding: 0;
font-size: 13px;
font-weight: 500;
line-height: 1;
color: var(--tf-text-primary);
text-align: center;
appearance: none;
cursor: pointer;
outline: none;
padding: 0;
min-width: 48px;
text-align: center;
line-height: 1;
background: transparent;
border: none;
}
.tf-zoom-chevron {
flex-shrink: 0;
width: 14px;
height: 14px;
fill: var(--tf-text-secondary);
pointer-events: none;
flex-shrink: 0;
fill: var(--tf-text-secondary);
}
}
.tf-zoom-select-simple {
appearance: none;
-webkit-appearance: none;
border: none;
outline: none;
background: transparent;
height: 32px;
min-width: 64px;
height: 32px;
padding: 0 8px;
border-radius: 7px;
font-size: 13px;
font-weight: 500;
line-height: 1;
color: var(--tf-text-primary);
cursor: pointer;
text-align: center;
appearance: none;
cursor: pointer;
outline: none;
background: transparent;
border: none;
border-radius: 7px;
&:hover {
background: var(--tf-bg-hover);
}
}
.tf-toolbar {
position: relative;
display: inline-flex;
align-items: center;
&-panel {
width: min(520px, calc(100vw - 40px));
max-height: min(390px, calc(100vh - 220px));
border: 1px solid var(--tf-border-color);
border-radius: 12px;
background: var(--tf-bg-surface);
box-shadow: var(--tf-shadow-soft);
padding: 8px;
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
z-index: 260;
display: flex;
flex-direction: column;
gap: 10px;
position: absolute;
left: 50%;
bottom: calc(100% + 8px);
transform: translateX(-50%);
z-index: 260;
width: min(520px, calc(100vw - 40px));
max-height: min(390px, calc(100vh - 220px));
padding: 8px;
overflow: hidden;
background: var(--tf-bg-surface);
border: 1px solid var(--tf-border-color);
border-radius: 12px;
box-shadow: var(--tf-shadow-soft);
transform: translateX(-50%);
}
&-trigger {
@@ -350,7 +354,7 @@
svg {
width: 16px;
height: 16px;
fill: currentColor;
fill: currentcolor;
}
}
}

View File

@@ -4,7 +4,7 @@
--tf-primary-color-hover: #3a6fe3;
--tf-primary-soft-bg: #eff6ff;
--tf-primary-soft-border: #bfdbfe;
--tf-primary-ghost-bg: rgba(37, 99, 235, 0.08);
--tf-primary-ghost-bg: rgb(37 99 235 / 8%);
--tf-danger-color: #ef4444;
--tf-danger-hover: #dc2626;
--tf-danger-soft-bg: #fff1f1;
@@ -15,41 +15,35 @@
--tf-warning-soft-border: #f7d79e;
--tf-warning-soft-text: #92400e;
--tf-warning-icon-color: #d97706;
--tf-bg-canvas: #f8fafc;
--tf-bg-surface: #ffffff;
--tf-bg-surface: #fff;
--tf-bg-surface-alt: #f9fafb;
--tf-bg-muted: #f3f4f6;
--tf-bg-hover: #f1f5f9;
--tf-bg-active: #e2e8f0;
--tf-bg-input: #ffffff;
--tf-bg-input: #fff;
--tf-bg-input-disabled: #f3f4f6;
--tf-bg-tag: rgba(0, 0, 0, 0.06);
--tf-bg-tag: rgb(0 0 0 / 6%);
--tf-border-color: #e5e7eb;
--tf-border-color-strong: #d1d5db;
--tf-border-color-soft: #f3f4f6;
--tf-node-outline-color: #d1d5db;
--tf-node-hover-border: rgba(186, 202, 239, 0.49);
--tf-node-hover-border: rgb(186 202 239 / 49%);
--tf-text-primary: #111827;
--tf-text-secondary: #6b7280;
--tf-text-muted: #9ca3af;
--tf-text-disabled: #9ca3af;
--tf-icon-bg: #cedafb;
--tf-icon-color: #3474ff;
--tf-loop-handle-text: #ffffff;
--tf-shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.08);
--tf-shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
--tf-focus-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
--tf-loop-handle-text: #fff;
--tf-shadow-soft: 0 2px 4px rgb(0 0 0 / 8%);
--tf-shadow-medium: 0 10px 25px rgb(0 0 0 / 15%);
--tf-focus-shadow: 0 0 0 2px rgb(37 99 235 / 12%);
--tf-tip-bg: #0f172a;
--tf-tip-text: #f8fafc;
--tf-scrollbar-thumb: #d6dce8;
--tf-slider-track-bg: #d1d5db;
--tf-slider-thumb-bg: var(--tf-primary-color);
--xy-node-boxshadow-selected: 0 0 0 1px var(--tf-primary-color);
--xy-handle-background-color: var(--tf-primary-color);
--xy-handle-border-color: var(--tf-bg-surface);
@@ -65,7 +59,7 @@
--xy-controls-button-color-hover: var(--tf-text-primary);
--xy-controls-button-border-color: var(--tf-border-color);
--xy-minimap-background-color: var(--tf-bg-surface);
--xy-minimap-mask-background-color: rgba(241, 245, 249, 0.68);
--xy-minimap-mask-background-color: rgb(241 245 249 / 68%);
--xy-minimap-node-background-color: #cbd5e1;
--xy-edge-label-background-color: var(--tf-bg-surface);
--xy-edge-label-color: var(--tf-text-primary);
@@ -74,20 +68,19 @@
:root .tf-theme-dark {
--tf-primary-color: #60a5fa;
--tf-primary-color-hover: #93c5fd;
--tf-primary-soft-bg: rgba(96, 165, 250, 0.18);
--tf-primary-soft-border: rgba(96, 165, 250, 0.35);
--tf-primary-ghost-bg: rgba(96, 165, 250, 0.12);
--tf-primary-soft-bg: rgb(96 165 250 / 18%);
--tf-primary-soft-border: rgb(96 165 250 / 35%);
--tf-primary-ghost-bg: rgb(96 165 250 / 12%);
--tf-danger-color: #f87171;
--tf-danger-hover: #ef4444;
--tf-danger-soft-bg: rgba(248, 113, 113, 0.16);
--tf-danger-soft-border: rgba(248, 113, 113, 0.28);
--tf-danger-soft-bg: rgb(248 113 113 / 16%);
--tf-danger-soft-border: rgb(248 113 113 / 28%);
--tf-danger-soft-text: #fca5a5;
--tf-danger-icon-color: #f87171;
--tf-warning-soft-bg: rgba(217, 119, 6, 0.2);
--tf-warning-soft-border: rgba(217, 119, 6, 0.35);
--tf-warning-soft-bg: rgb(217 119 6 / 20%);
--tf-warning-soft-border: rgb(217 119 6 / 35%);
--tf-warning-soft-text: #fbbf24;
--tf-warning-icon-color: #f59e0b;
--tf-bg-canvas: #0b1220;
--tf-bg-surface: #111827;
--tf-bg-surface-alt: #1f2937;
@@ -96,32 +89,27 @@
--tf-bg-active: #3b4b63;
--tf-bg-input: #0f172a;
--tf-bg-input-disabled: #0b1324;
--tf-bg-tag: rgba(148, 163, 184, 0.2);
--tf-bg-tag: rgb(148 163 184 / 20%);
--tf-border-color: #334155;
--tf-border-color-strong: #475569;
--tf-border-color-soft: #263449;
--tf-node-outline-color: #475569;
--tf-node-hover-border: rgba(96, 165, 250, 0.38);
--tf-node-hover-border: rgb(96 165 250 / 38%);
--tf-text-primary: #e5e7eb;
--tf-text-secondary: #cbd5e1;
--tf-text-muted: #94a3b8;
--tf-text-disabled: #64748b;
--tf-icon-bg: rgba(96, 165, 250, 0.2);
--tf-icon-bg: rgb(96 165 250 / 20%);
--tf-icon-color: #93c5fd;
--tf-loop-handle-text: #f8fafc;
--tf-shadow-soft: 0 2px 8px rgba(2, 6, 23, 0.35);
--tf-shadow-medium: 0 10px 25px rgba(2, 6, 23, 0.48);
--tf-focus-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
--tf-shadow-soft: 0 2px 8px rgb(2 6 23 / 35%);
--tf-shadow-medium: 0 10px 25px rgb(2 6 23 / 48%);
--tf-focus-shadow: 0 0 0 2px rgb(96 165 250 / 20%);
--tf-tip-bg: #020617;
--tf-tip-text: #e2e8f0;
--tf-scrollbar-thumb: #475569;
--tf-slider-track-bg: #475569;
--tf-slider-thumb-bg: #93c5fd;
--xy-node-boxshadow-selected: 0 0 0 1px var(--tf-primary-color);
--xy-handle-background-color: var(--tf-primary-color);
--xy-handle-border-color: var(--tf-bg-canvas);
@@ -137,7 +125,7 @@
--xy-controls-button-color-hover: var(--tf-text-primary);
--xy-controls-button-border-color: var(--tf-border-color);
--xy-minimap-background-color: var(--tf-bg-surface);
--xy-minimap-mask-background-color: rgba(15, 23, 42, 0.7);
--xy-minimap-mask-background-color: rgb(15 23 42 / 70%);
--xy-minimap-node-background-color: #475569;
--xy-edge-label-background-color: var(--tf-bg-surface);
--xy-edge-label-color: var(--tf-text-primary);