Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleSample Vue Component (custom template)
<template>
    <div >
        <header>
            <a @click="callAkiomaCode('$ akioma.test.stamm.OpenVersicherter(eventSource); ')"><h3>{{fullName}}</h3></a>
        </header>
    </div>
</template>


<script>

import mixinAkioma from '@/mixins/mixinGlobalAkioma';

export default {
    mixins: [ mixinAkioma ],
    props: {
        dataSource:{
            type: Object
        },
        datasourceNamespace: {
            type: Object
        },
        currentRecord: {
            type: Object
        }, 
        controller: {
            type:Object
        }
    },
    computed: {
        fullName(){
            if(this.currentRecord.stamm_nr_nachname || this.currentRecord.vorname)
                return `${this.currentRecord.stamm_nr_nachname} ${this.currentRecord.vorname}`;
            else
                return '';
        }
    }
}
</script>

In a Custom Vue Component, the developer can implement computed properties, can define new methods, can create 

Vue components will be exported inside the custom index.js file:

...

Code Block
npm run build:vue

This will compile the Vue single component files and can be used in a htmlContainer as the Template attribute.


In the custom Vue component the developer can use the akioma vue mixin for helper methods. callAkiomaCode is available in this mixin and can be applied on different events(click, mouseenter...) and using the vue events in templates.

...