Static Element
An element used to render a static string/HTML or a Vue component.
#Examples
<script>
export default {
mixins: [Laraform],
data: () => ({
schema: {
static: {
type: 'static',
content: 'Some static text',
label: '<b>I\'m a label</b>'
}
}
})
}
</script>
<script>
export default {
mixins: [Laraform],
data: () => ({
schema: {
static: {
type: 'static',
content: Vue.extend({
props: ['el$'],
template: `<span>I'm a component in {{el$.form$.$options.name}}</span>`
})
}
}
})
}
</script>
#Options
Name | Type | Description |
---|---|---|
content | obj|str |
Content to be rendered. Either a string (HTML) or a Vue component. Vue component receives an el$ prop, which refers to the element. |
wrap | boolean |
Determines if the content should be rendered in a standard element layout. |
#Properties
Name | Type | Default | Description |
---|---|---|---|
content | obj|str |
null |
Content to be rendered. Either a string (HTML) or a Vue component. |
wrap | boolean |
true |
Determines if the content should be rendered in a standard element layout. |
isHtml | boolean |
- | Determines if HTML content should be rendered for the element. |