Skip to content

Instantly share code, notes, and snippets.

@flancer64
Last active April 19, 2024 07:38
Show Gist options
  • Save flancer64/028608cafe350c552f7abadd69a04915 to your computer and use it in GitHub Desktop.
Save flancer64/028608cafe350c552f7abadd69a04915 to your computer and use it in GitHub Desktop.
The template for a Vue based UI component used in the TeqFW
/**
*
*
* @namespace App_Front_Ui_Lib_Component
*/
// MODULE'S VARS
const NS = 'App_Front_Ui_Lib_Component';
const REF_SELF = 'self';
const DOM_ID = 't-any-id';
// MODULE'S INTERFACES
// noinspection JSUnusedLocalSymbols
/**
* @interface
* @mixin
* @memberOf App_Front_Ui_Lib_Component
*/
class IUi {
hide() { }
/**
* @param {App_Shared_Dto_Item.Dto} item
*/
show(item) { }
}
// MODULE'S FUNCTIONS
/**
* TeqFW DI factory function to get dependencies for the object.
*
* @param {App_Front_Defaults} DEF
* @param {TeqFw_Core_Shared_Api_Logger} logger - instance
*
* @returns {App_Front_Ui_Lib_Component.vueCompTmpl}
*/
export default function (
{
App_Front_Defaults$: DEF,
TeqFw_Core_Shared_Api_Logger$$: logger,
}
) {
// VARS
const template = `
<div></div>
`;
// MAIN
/**
* Template to create new component instances using Vue.
*/
return {
teq: {package: DEF.SHARED.NAME},
name: NS,
template,
components: {},
data() {
return {};
},
props: {},
computed: {},
methods: {},
watch: {},
emits: {},
beforeCreate() {},
created() {},
beforeMount() {},
mounted() {},
beforeUpdate() {},
updated() {},
activated() {},
deactivated() {},
beforeUnmount() {},
unmounted() {},
errorCaptured() {},
renderTracked() {},
renderTriggered() {},
mixins: [],
provide: {},
inject: {},
setup(props, context) {},
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment