diff --git a/src/components/DiagramCanvas.vue b/src/components/DiagramCanvas.vue
index 87b6a81..1abc48f 100644
--- a/src/components/DiagramCanvas.vue
+++ b/src/components/DiagramCanvas.vue
@@ -9,7 +9,7 @@
:style="{ transform: `translate(${position.x}px, ${position.y}px) scale(${scale})` }">
-
-
- {{ tooltipText }}
-
+
+
diff --git a/src/components/equipments/componentConfig.ts b/src/components/equipments/componentConfig.ts
index 065ebc6..9bd3c94 100644
--- a/src/components/equipments/componentConfig.ts
+++ b/src/components/equipments/componentConfig.ts
@@ -318,7 +318,55 @@ const componentConfigs: Record = {
description: '相同约束字符串的组件将被视为有电气连接'
}
]
- }
+ },
+ // 线缆配置
+ Wire: {
+ props: [
+ {
+ name: 'routingMode',
+ type: 'select',
+ label: '路由方式',
+ default: 'orthogonal',
+ options: [
+ { value: 'orthogonal', label: '直角' },
+ { value: 'direct', label: '直线' },
+ { value: 'auto', label: '自动' }
+ ],
+ description: '线路连接方式'
+ },
+ {
+ name: 'strokeColor',
+ type: 'string',
+ label: '线条颜色',
+ default: '#4a5568',
+ description: '线条颜色,使用CSS颜色值'
+ },
+ {
+ name: 'strokeWidth',
+ type: 'number',
+ label: '线条宽度',
+ default: 2,
+ min: 1,
+ max: 10,
+ step: 0.5,
+ description: '线条宽度'
+ },
+ {
+ name: 'constraint',
+ type: 'string',
+ label: '约束名称',
+ default: '',
+ description: '线路约束名称,用于标识连接关系'
+ },
+ {
+ name: 'showLabel',
+ type: 'boolean',
+ label: '显示标签',
+ default: false,
+ description: '是否显示连线上的约束标签'
+ }
+ ]
+ },
};
// 获取组件配置的函数
diff --git a/src/views/ProjectView.vue b/src/views/ProjectView.vue
index e475bdb..84cbecc 100644
--- a/src/views/ProjectView.vue
+++ b/src/views/ProjectView.vue
@@ -344,7 +344,7 @@ function updateComponentProp(componentId: string | { id: string; propName: strin
// 处理连线创建事件
function handleWireCreated(wireData: any) {
console.log('Wire created:', wireData);
- // 可以在这里添加连线创建的相关逻辑
+ // 连线已在DiagramCanvas.vue中完成约束处理
}
// 处理连线删除事件