opnform/resources/js/components/index.js

28 lines
903 B
JavaScript
Raw Normal View History

2023-10-24 09:00:54 +00:00
import { defineAsyncComponent } from 'vue'
import { registerComponents as registerCommonComponents } from './common'
import { registerComponents as registerFormComponents } from './forms'
2022-09-20 19:59:52 +00:00
import Child from './Child.vue'
import Modal from './Modal.vue'
import Loader from './common/Loader.vue'
2022-09-20 19:59:52 +00:00
2023-10-24 09:00:54 +00:00
export function registerComponents (app) {
[Child, Modal, Loader].forEach(Component => {
app.component(Component.name, Component)
})
registerCommonComponents(app)
registerFormComponents(app)
2023-10-24 09:00:54 +00:00
// Register async components
app.component('FormEditor', defineAsyncComponent(() =>
import('./open/forms/components/FormEditor.vue')
))
app.component('NotionPage', defineAsyncComponent(() =>
import('./open/NotionPage.vue')
))
app.component('FormBlockLogicEditor', defineAsyncComponent(() =>
import('./open/forms/components/form-logic-components/FormBlockLogicEditor.vue')
))
2023-10-24 09:00:54 +00:00
}