mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Update JSON UI actions and conditionals
This commit is contained in:
@@ -106,7 +106,12 @@ Converted three complex pages (Models, Component Trees, and Workflows) from trad
|
||||
"type": "Component",
|
||||
"bindings": { "prop": { "source": "...", "path": "..." } },
|
||||
"events": [
|
||||
{ "event": "click", "actions": [...] }
|
||||
{
|
||||
"event": "click",
|
||||
"actions": [
|
||||
{ "type": "set-value", "target": "selectedId", "expression": "event" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -115,6 +120,18 @@ Converted three complex pages (Models, Component Trees, and Workflows) from trad
|
||||
}
|
||||
```
|
||||
|
||||
### Action & Conditional Syntax
|
||||
- Use supported JSON UI action types (for example, `set-value`, `toggle-value`, `show-toast`) with `target`, `path`, `value`, or `expression` fields instead of legacy `setState` actions.
|
||||
- Replace legacy conditional objects (`{ "source": "...", "operator": "eq|gt|truthy|falsy", "value": ... }`) with `conditional.if` expressions:
|
||||
|
||||
```json
|
||||
{
|
||||
"conditional": {
|
||||
"if": "modelCount === 0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Component Registry Integration
|
||||
All JSON page wrappers are registered in `component-registry.ts`:
|
||||
- `JSONModelDesigner`
|
||||
|
||||
Reference in New Issue
Block a user