An object which is passed into the method a plugin provides for declaring a slot via IAssetLinkPluginHandle#defineSlot.
Methods
# component(component)
Specify the component for this plugin-provided slot.
Usage
pageSlot.component(SomeVueComponent);
Parameters:
Name | Type | Description |
---|---|---|
component |
VueComponent
|
The component for this plugin-provided slot.
this can be anything that is valid as the first argument to Vue's |
# multiplexContext(contextMultiplexerFn)
Specify a function that allows this slot to render multiple times with different inputs.
Usage
pageSlot.multiplexContext(context => context.asset.nickname);
Parameters:
Name | Type | Description |
---|---|---|
contextMultiplexerFn |
function
|
A function which allows a slot to "fan out" and render multiple times with different inputs. |
# showIf(predicateFn)
Specify a function which determines whether this slot should apply for a given context.
Usage
pageSlot.showIf(context => context.asset.attributes.status !== 'archived');
Parameters:
Name | Type | Description |
---|---|---|
predicateFn |
function
|
Determines whether this slot should apply for a given context. |
# type(type)
Specify the type of this slot.
Usage
pageSlot.type("page-slot");
Parameters:
Name | Type | Description |
---|---|---|
type |
String
|
The path of this plugin-provided route. See https://router.vuejs.org/guide/essentials/dynamic-matching.html for route path format. |
# weight(weight)
Specify the weight for this plugin-provided slot.
Usage
pageSlot.weight(50);
Parameters:
Name | Type | Description |
---|---|---|
weight |
Number
|
function
|
The weight of this slot - either a fixed number or a function that takes the context and returns a number. |