This module provide a set of mixin allowing integration between AEM SPA module and vue application.
npm install vue-spa-component-mapping
VueSPAAppMixin works as a wrapper initializing the AEM model within your App.
import { VueSPAAppMixin } from 'vue-spa-component-mapping'
export default {
el: '#app',
mixins: [ VueSPAAppMixin ]
methods: {
onModelChange(model) {
//i can do something cool when my App model init
}
}
};
Hook method triggered after model change/init
VueSPAComponentMixin is meant to be used among general components. It uses the component name and resource type to map and the vue component to AEM model.
import { VueSPAComponentMixin , VueSPAComponentManager } from 'vue-spa-component-mapping'
export default VueSPAComponentManager.mapTo({
name: 'AppText',
resourceType: 'myApp/components/content/text',
mixins: [ VueSPAComponentMixin ],
methods: {
onModelChange(model) {
//i can do something cool when my App model init or change
}
}
})
Helper function to map given component resource type to vue component name
Hook method triggered after model change/init
Helper function to retrieve component by name from a component store - Object with name and resource type
Helper function to retrieve component by resource type from a component store - Object with name and resource type
Helper function to add component to component store
This module has a dependency on aem-spa-page-model-manager
This project is licensed under the MIT License - see the LICENSE.md file for details