2026-02-09 17:37:51 +03:00
|
|
|
# Component definitions
|
|
|
|
|
|
|
|
|
|
## Simple calculator
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
code: basics.calculator
|
|
|
|
|
description: Do simple operations for numbers in `args` input.
|
|
|
|
|
inputs:
|
|
|
|
|
- operator: string enum { add, subtract, multiply, divide }
|
|
|
|
|
- args: object[]
|
|
|
|
|
outputs:
|
|
|
|
|
- result: object
|
2026-02-10 14:41:58 +03:00
|
|
|
source: S8n.Components.Packages (project)
|
2026-02-09 17:37:51 +03:00
|
|
|
class: S8n.Components.Basics.Calculator
|
|
|
|
|
methods: Calc()
|
2026-02-10 19:12:14 +03:00
|
|
|
gui: ComponentCalculator.vue
|
2026-02-09 17:37:51 +03:00
|
|
|
```
|