diff --git a/src/circuit-ele/resistance_box.png b/src/circuit-ele/resistance_box.png new file mode 100644 index 0000000..8dcef44 Binary files /dev/null and b/src/circuit-ele/resistance_box.png differ diff --git a/src/elements.ts b/src/elements.ts index 3a83dc9..24f9036 100644 --- a/src/elements.ts +++ b/src/elements.ts @@ -7,6 +7,7 @@ import inductor from './circuit-ele/inductor.png' import lightBulb from './circuit-ele/light_bulb.png' import lightBulbGrow from './circuit-ele/light_bulb_grow.png' import resistor from './circuit-ele/resistor.png' +import resistanceBox from './circuit-ele/resistance_box.png' import switchOff from './circuit-ele/switch_off.png' import switchOn from './circuit-ele/switch_on.png' import meter from './circuit-ele/meter.png' @@ -161,6 +162,19 @@ export const elements: CircuitElement[] = [ { key: 'resistance', label: '电阻', type: 'number', unit: 'Ω', default: 5 }, ], }, + { + key: 'resistance_box', + name: '电阻箱', + url: resistanceBox, + defaultSize: 180, + connectionPoints: [ + { x: 0.1, y: 1, name: 'A' }, + { x: 0.9, y: 1, name: 'B' }, + ], + propertySchemas: [ + { key: 'resistance', label: '电阻', type: 'number', unit: 'Ω', default: 100 }, + ], + }, { key: 'meter', name: '表',