perf(schedule): 减少重渲染与冗余动画
- useCanvasNodeDrag.moveDrag 改 ref 直改 DOM,松手才写 store,避免拖拽期间反复重渲染 SchedulePage - runs 轮询改 setTimeout 链式 + 移除 runs 依赖,避免每 1.5s 重建 interval - SchedulePage 拆 PositionDraftBadge / RunNowButton,删除冗余的 runs/runsLoading/positionDraftCount 订阅 - 拆 ScheduleEdge 组件 + React.memo + useMemo,切换 edge 选中时不再重算所有 edgePath - 删除 schedule.css 中引用未定义 keyframes 的 modal-in/spin 死动画 - 删除 .schedule-edge-line transition、.schedule-run-result-backdrop backdrop-filter;补 .artifact-card transition Refs: kaneo #19-#24
This commit is contained in:
@@ -294,6 +294,10 @@
|
||||
background: #fff;
|
||||
cursor: grab;
|
||||
user-select: none;
|
||||
transition:
|
||||
transform .15s ease,
|
||||
box-shadow .15s ease,
|
||||
border-color .15s ease;
|
||||
}
|
||||
|
||||
.artifact-card:hover {
|
||||
@@ -431,7 +435,6 @@
|
||||
fill: none;
|
||||
stroke: #4e92db;
|
||||
stroke-width: 2.2;
|
||||
transition: stroke .15s, stroke-width .15s;
|
||||
}
|
||||
|
||||
.schedule-edge-hit {
|
||||
@@ -1083,7 +1086,6 @@
|
||||
border: 0;
|
||||
background: rgb(10 27 45 / 46%);
|
||||
cursor: default;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.schedule-run-result-modal {
|
||||
@@ -1101,7 +1103,6 @@
|
||||
box-shadow: 0 24px 80px rgb(8 27 48 / 30%);
|
||||
grid-template-rows: auto minmax(0, 1fr);
|
||||
transform: translate(-50%, -50%);
|
||||
animation: modal-in .18s ease-out;
|
||||
}
|
||||
|
||||
.schedule-run-result-modal__header {
|
||||
@@ -1501,7 +1502,6 @@
|
||||
border: 2px solid #b9d4ef;
|
||||
border-top-color: #1978d4;
|
||||
border-radius: 50%;
|
||||
animation: spin .7s linear infinite;
|
||||
}
|
||||
|
||||
@media (max-width: 1500px) {
|
||||
|
||||
Reference in New Issue
Block a user