fix(web): 修复 TypeScript 编译错误 — 10 处类型/未使用变量问题
- EntitySelect: 未使用的 searchFields 改为 _searchFields - PluginKanbanPage: DragEndEvent/DragStartEvent 改为 type import, lane_order 改为 optional - PluginDashboardPage: 添加 PluginPageSchema import, 移除未使用的 CHART_COLORS/palette/totalCount - PluginGraphPage: 移除未使用的 Title/textColor, 修复 hovered → hoverState
This commit is contained in:
@@ -33,7 +33,7 @@ import {
|
||||
type PluginSchemaResponse,
|
||||
} from '../api/plugins';
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
const { Text } = Typography;
|
||||
|
||||
// ── Types ──
|
||||
|
||||
@@ -300,7 +300,6 @@ function drawEdgeLabel(
|
||||
y: number,
|
||||
label: string,
|
||||
color: string,
|
||||
textColor: string,
|
||||
alpha: number,
|
||||
) {
|
||||
ctx.save();
|
||||
@@ -617,7 +616,7 @@ export function PluginGraphPage() {
|
||||
// Edge label
|
||||
if (edge.label && labelPos) {
|
||||
const labelAlpha = hoverState.nodeId ? (isHighlighted ? 1 : 0.1) : 0.9;
|
||||
drawEdgeLabel(ctx, labelPos.labelX, labelPos.labelY - 10, edge.label, colors.base, textColor, labelAlpha);
|
||||
drawEdgeLabel(ctx, labelPos.labelX, labelPos.labelY - 10, edge.label, colors.base, labelAlpha);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -672,7 +671,7 @@ export function PluginGraphPage() {
|
||||
if (hoverState.nodeId) {
|
||||
const hoveredNode = nodes.find((n) => n.id === hoverState.nodeId);
|
||||
if (hoveredNode) {
|
||||
const degree = degreeMap.get(hovered.nodeId) || 0;
|
||||
const degree = degreeMap.get(hoverState.nodeId) || 0;
|
||||
const tooltipText = `${hoveredNode.label} (${degree} 条关系)`;
|
||||
ctx.save();
|
||||
ctx.font = '12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
|
||||
|
||||
Reference in New Issue
Block a user