DruxtSchemaMixin
DruxtSchemaMixin
Lazy loads a schema into the Vuex State object.
Kind: global mixin
Example
<script>
import { DruxtSchemaMixin } from 'druxt-schema'
export default {
mixins: [DruxtSchemaMixin],
}
</script>
.props
Kind: static property of DruxtSchemaMixin
- .props
- .mode :
string - .schemaType :
'view'|'form' - .type :
string
- .mode :
.mode : string
The Drupal Display mode.
Kind: static property of props
Default: "default"
.schemaType : 'view' | 'form'
Drupal display schema type, 'view' or 'form'.
Kind: static property of props
.type : string
The JSON:API Resource type.
Kind: static property of props
.methods
Kind: static property of DruxtSchemaMixin
.fetch()
Loads the Schema from the Vuex store.
Kind: static method of DruxtSchemaMixin
.data()
Kind: static method of DruxtSchemaMixin
Properties
| Name | Type | Description |
|---|---|---|
| schema | object | The Drupal Schema data. |
getSchema()
Maps druxtSchema/get Vuex action to this.getSchema.
Kind: global function