Views: 2703
Last Modified: 28.04.2022

It's recommended to allocate Vue components in the folder components at the first level of module JS extensions, for example, /modules/timeman/install/js/timeman/components/.

If your component uses Vue as template engine and all logic is located in JS extension, then Vue component is located in the folder src/components.

You can read more about component naming in this article: Component naming and import.

The Vue developer community has a current special component/instance options order. We recommend to strictly follow it in the components for BitrixVue 3 as well.

Vue 3 components are written in such a manner, that you can clearly understand at the superficial glance, which input parameters are used (props), what internal data (data) and which events are emitted (emits).

If you component creates and stands by for an event from EventEmitter, you must describe them at the start of component: this will significantly help other developers.

You can read about component formatting in the article: Component properties formatting and order.




Courses developed by Bitrix24