完成演示demo

This commit is contained in:
2025-08-22 15:14:05 +08:00
parent fc2e48c6b0
commit f743f67454
20 changed files with 60 additions and 81 deletions

View File

@@ -32,11 +32,11 @@ The fix involves correcting the vuedraggable configuration to properly support:
```typescript
const cloneNode = (original: FlowNode): FlowNode => {
return {
...original,
id: `${original.id}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
config: original.config ? { ...original.config } : undefined
};
return {
...original,
id: `${original.id}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
config: original.config ? { ...original.config } : undefined
};
};
```
@@ -53,16 +53,16 @@ const cloneNode = (original: FlowNode): FlowNode => {
### FlowNode Interface (Existing)
```typescript
interface FlowNode {
id: string; // Unique identifier
name: string; // Display name
type: string; // Node type category
taskId: string; // Task execution identifier
icon: string; // Icon name
backgroundColor: string;
shape: "square" | "circle" | "rounded";
textColor: string;
category: "控制类" | "设备类" | "媒体类" | "灯光类" | "延时类";
config?: Record<string, any>;
id: string // Unique identifier
name: string // Display name
type: string // Node type category
taskId: string // Task execution identifier
icon: string // Icon name
backgroundColor: string
shape: "square" | "circle" | "rounded"
textColor: string
category: "控制类" | "设备类" | "媒体类" | "灯光类" | "延时类"
config?: Record<string, any>
}
```
@@ -152,4 +152,4 @@ const workflowNodes = ref<FlowNode[]>([]);
- Use efficient ID generation to avoid blocking
- Minimize re-renders during drag operations
- Optimize large workflow handling
- Cache node definitions for better performance
- Cache node definitions for better performance

View File

@@ -47,4 +47,4 @@ This feature addresses the drag and drop functionality issue in the existing wor
1. WHEN I start dragging a node THEN the system SHALL provide visual feedback indicating drag state
2. WHEN I hover over a valid drop zone THEN the system SHALL highlight the drop zone
3. WHEN I hover over an invalid drop zone THEN the system SHALL indicate the zone is not droppable
4. WHEN dragging is in progress THEN the cursor SHALL change to indicate drag operation
4. WHEN dragging is in progress THEN the cursor SHALL change to indicate drag operation

View File

@@ -97,3 +97,9 @@
- Initialize dialog plugin in lib.rs
- Remove invalid configuration fields that caused startup errors
- _Requirements: 2.1, 3.1_
- [x] 8. Fix Tauri 2.0 permissions configuration structure
- Move permissions to app section in tauri.conf.json (not root level)
- Add dialog plugin to plugins section
- Resolve "Additional properties are not allowed" configuration error
- Ensure proper Tauri 2.0 configuration format compliance
- _Requirements: 2.1, 3.1_