feat: 实现矢量节点 MVP 功能

- 扩展 NodeProperties 接口,添加 vector 字段定义
- 创建 VectorNode.vue 组件,使用 SVG Pattern 实现自动平铺
- 创建 VectorNodeModel.ts 数据模型,处理节点初始化和 resize
- 创建 VectorPanel.vue 属性面板,支持图形类型、平铺尺寸、颜色等配置
- 在 FlowEditor.vue 中注册 vectorNode
- 在 ComponentsPanel.vue 中添加到组件库
- 在 PropertyPanel.vue 中注册属性面板

功能特性:
- 支持 5 种图形类型(矩形/椭圆/多边形/路径/自定义SVG)
- 节点缩放时矢量图自动重复平铺
- 可调整平铺尺寸(10-500px)
- 支持填充和描边颜色配置
- 实时预览,属性修改立即生效
This commit is contained in:
2026-02-17 21:50:24 +08:00
parent 3091ef063c
commit 47fc8928d8
8 changed files with 427 additions and 2 deletions

View File

@@ -51,6 +51,24 @@ const componentGroups = [
width: 200,
height: 120
}
},
{
id: 'vector',
name: '矢量图块',
type: 'vectorNode',
description: '可平铺的矢量图形,用于边框装饰',
data: {
vector: {
kind: 'rect',
tileWidth: 50,
tileHeight: 50,
fill: '#409EFF',
stroke: '#303133',
strokeWidth: 1
},
width: 200,
height: 200
}
}
]
},