调整draggable的区域,鼠标移动到draggable的区域时,指针调整为移动的icon

This commit is contained in:
JIANG
2026-01-07 15:05:23 +08:00
parent f43abfc6c4
commit 350eda4b10
3 changed files with 34 additions and 3 deletions

View File

@@ -776,7 +776,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
return (
<>
{/* 主面板 */}
<Draggable nodeRef={draggableRef}>
<Draggable nodeRef={draggableRef} handle=".drag-handle">
<Box
ref={draggableRef}
sx={{
@@ -811,12 +811,14 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
>
{/* Header */}
<Box
className="drag-handle"
sx={{
p: 2,
borderBottom: 1,
borderColor: "divider",
backgroundColor: "primary.main",
color: "primary.contrastText",
cursor: "move",
}}
>
<Stack