diff --git a/src/views/VirtualLab.vue b/src/views/VirtualLab.vue index 539df35..d6351cc 100644 --- a/src/views/VirtualLab.vue +++ b/src/views/VirtualLab.vue @@ -1073,7 +1073,8 @@ function editTextBox(inst: Instance) { :class="{ selected: selectedId === inst.id }" :style="{ left: inst.x + 'px', top: inst.y + 'px', transform: 'translate(-50%, -50%) rotate(' + (inst.rotation || 0) + 'deg)' }" @pointerdown="(e) => onInstanceMouseDown(e, inst)" - @click.stop="() => selectInstance(inst.id)" :title="(elements.find(e => e.key === inst.key)?.name || inst.key)"> + @click.stop="() => selectInstance(inst.id)" + :title="(elements.find(e => e.key === inst.key)?.name || inst.key)">
-
+
{{ String(inst.props?.['text'] ?? '') }}
@@ -1184,8 +1182,10 @@ function editTextBox(inst: Instance) { :style="{ right: showAI ? '360px' : '0' }">
{{ selectedInst.key }} 属性
- -
+ +
预设
-
diff --git a/src/views/elements.ts b/src/views/elements.ts index cc717cb..98a9def 100644 --- a/src/views/elements.ts +++ b/src/views/elements.ts @@ -150,10 +150,10 @@ export const elements: CircuitElement[] = [ pinUrl: slidingRheostatPin, defaultSize: 180, connectionPoints: [ - { x: 0.15, y: 0.28, name: '下部左侧' }, - { x: 0.85, y: 0.28, name: '下部右侧' }, - { x: 0.15, y: 0.76, name: '上部左侧' }, - { x: 0.85, y: 0.76, name: '上部右侧' }, + { x: 0.15, y: 0.28, name: '上部左侧' }, + { x: 0.85, y: 0.28, name: '上部右侧' }, + { x: 0.15, y: 0.76, name: '下部左侧' }, + { x: 0.85, y: 0.76, name: '下部右侧' }, ], propertySchemas: [ { key: 'maxResistance', label: '最大电阻', type: 'number', unit: 'Ω', default: 100 },