mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 15:05:27 +00:00
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:
@@ -5,6 +5,7 @@ import ImagePanel from './panels/ImagePanel.vue';
|
||||
import TextPanel from './panels/TextPanel.vue';
|
||||
import StylePanel from './panels/StylePanel.vue';
|
||||
import AssetSelectorPanel from './panels/AssetSelectorPanel.vue';
|
||||
import VectorPanel from './panels/VectorPanel.vue';
|
||||
import { ASSET_LIBRARIES } from '@/types/nodeTypes';
|
||||
import { getLogicFlowInstance } from '@/ts/useLogicFlow';
|
||||
|
||||
@@ -33,7 +34,8 @@ const panelMap: Record<string, any> = {
|
||||
propertySelect: PropertyRulePanel,
|
||||
imageNode: ImagePanel,
|
||||
textNode: TextPanel,
|
||||
assetSelector: AssetSelectorPanel
|
||||
assetSelector: AssetSelectorPanel,
|
||||
vectorNode: VectorPanel
|
||||
};
|
||||
|
||||
const panelComponent = computed(() => panelMap[nodeType.value] || null);
|
||||
|
||||
Reference in New Issue
Block a user