fix: 修复多个运行时崩溃和功能bug,优化画布连接线和剧本评分
- 修复 EcommercePage generateEcommerceImage 调用不存在变量导致运行时崩溃 - 修复 DigitalHumanPage/ImageWorkbenchPage 变量名错误导致页面不可用 - 修复 ecommerceVideoService token 读取用错 key 导致请求 401 - 修复画布连接线在弹窗出现后仍跟随鼠标的问题 - 剧本评分 .docx 文件改为服务端 mammoth 解析(新增 /api/files/extract-text) - ErrorBoundary 加 key 支持切换页面时自动重置 - Vite proxy 改为指向公网域名 omniai.net.cn - 新增视频生成历史记录面板和删除确认弹窗 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2646,7 +2646,23 @@ function CanvasPage({
|
||||
}
|
||||
: null;
|
||||
})()
|
||||
: null;
|
||||
: connectionDropMenu
|
||||
? (() => {
|
||||
const source = getNodePortPoint(connectionDropMenu.sourcePort);
|
||||
const target = getCanvasWorldPointFromClient(connectionDropMenu.originLeft, connectionDropMenu.originTop);
|
||||
return source
|
||||
? {
|
||||
id: "pending-link-preview",
|
||||
sourceX: source.x,
|
||||
sourceY: source.y,
|
||||
targetX: target.x,
|
||||
targetY: target.y,
|
||||
sourceSide: connectionDropMenu.sourcePort.side,
|
||||
targetSide: null,
|
||||
}
|
||||
: null;
|
||||
})()
|
||||
: null;
|
||||
|
||||
const openCanvasAddNodeMenu = useCallback((clientX: number, clientY: number) => {
|
||||
const menuPosition = positionFloatingMenu(clientX, clientY, 260, 390, 0);
|
||||
@@ -2816,6 +2832,8 @@ function CanvasPage({
|
||||
originTop: event.clientY,
|
||||
sourcePort: connectorDrag.port,
|
||||
});
|
||||
setPendingLinkPort(null);
|
||||
setPendingLinkPreviewPoint(null);
|
||||
}
|
||||
} else {
|
||||
clearPendingConnector();
|
||||
@@ -2840,7 +2858,7 @@ function CanvasPage({
|
||||
}, [selectedNode]);
|
||||
|
||||
const handleCanvasMouseMove = (event: MouseEvent<HTMLElement>) => {
|
||||
if (!pendingLinkPort) return;
|
||||
if (!pendingLinkPort || connectionDropMenu) return;
|
||||
setPendingLinkPreviewPoint(getCanvasWorldPointFromClient(event.clientX, event.clientY));
|
||||
};
|
||||
|
||||
@@ -5534,11 +5552,6 @@ function CanvasPage({
|
||||
role="menu"
|
||||
onClick={(event) => event.stopPropagation()}
|
||||
onContextMenu={(event) => event.preventDefault()}
|
||||
onMouseMove={(event) => {
|
||||
if (pendingLinkPort) {
|
||||
setPendingLinkPreviewPoint(getCanvasWorldPointFromClient(event.clientX, event.clientY));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="studio-canvas-add-node-menu__title">新建节点并连接</div>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user