How to create component for multi-sites

  1. create component

  2. declare component

  3. use component


Example: step by step create navigation component for multi-sites :

  1. create component:

~/src/components/navigation/navigation

a. impl.js : declare variable, props, methods,… implement common function for the component.

 

b. index.vue: declare theme use for this component

c. lgcns.vue, multicart.vue, unishop.vue: name of the theme will be use for the component. We can implement UI and feature for each theme.

2. declare component:

~/src/components/navigation/navigation.collection.js

3. use component:

reg + componentId(declared on navigation.collection.js)

We can use <reg-navigation/> for any page what we want.