Interface IDesignEditorDefinitionChangeMockup
Provides properties to change mockups. For details, you can refer to the ChangeMockup command.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"changeMockup": [{
"data": {
"mockup": {
"down": "{{$['color']._.props.mockup}}"
},
"previewMockups": "{{$['color']._.props.previews}}"
}
}]
}
}
Package: ui-framework
Properties
after
The next commands to be executed after this command completes.
Declaration
after?: string | string[]
Property Value
Type | Description |
---|---|
string | string[] | The next commands to be executed after this command completes. |
autoCompile
If false
, action will never execute automatically.
Declaration
autoCompile?: boolean
Property Value
Type | Description |
---|---|
boolean | If |
data
Declaration
data: IMockupData[]
Property Value
Type | Description |
---|---|
IMockupData[] |
executeOnce
If true
, this command will be executed only once.
You can use it for initial
command.
For example, we need to change surface depending on the option value.
We write for initial
and for updateSurfaces
the same productDefinition with $['option]._
And set executeOnce = true
for initial
. And initial will be executed only once.
Declaration
executeOnce?: boolean
Property Value
Type | Description |
---|---|
boolean | If |
executeOnlyAfter
Current command will be executed in a next update only after all commands executed in this param.
The same example from executeOnce
param.
We need to execute updateSurface
on all next updates, exclude the first one.
And we set executeOnlyAfter = ['initial']
for updateSurface
command.
Declaration
executeOnlyAfter?: string[]
Property Value
Type | Description |
---|---|
string[] | Current command will be executed in a next update only after all commands executed in this param.
The same example from |
lock
Name of widgets that show preloader when command executed.
Declaration
lock?: string[]
Property Value
Type | Description |
---|---|
string[] | Name of widgets that show preloader when command executed. |
message
The message for preloader.
Declaration
message?: string | string[]
Property Value
Type | Description |
---|---|
string | string[] | The message for preloader. |
onExecuted
Functions that executed after command
Declaration
onExecuted?: Function | Function[]
Property Value
Type | Description |
---|---|
Function | Function[] | Functions that executed after command |
options
Declaration
options: Object
Property Value
Type | Description |
---|---|
Object |
showPreloader
If true
, displays the preloader while executing this command.
Declaration
showPreloader?: boolean
Property Value
Type | Description |
---|---|
boolean | If |
timeout
The timeout for switching preloader messages.
Declaration
timeout?: number
Property Value
Type | Description |
---|---|
number | The timeout for switching preloader messages. |