1
+ import { defineAsyncComponent } from 'vue' ;
1
2
import { App } from 'vue' ;
2
3
import './styles/main.scss' ;
3
4
import type { SharedProps } from './types' ;
@@ -12,9 +13,33 @@ export function createVInlineFields(options: Omit<SharedProps,
12
13
const install = ( app : App ) => {
13
14
app . provide ( globalOptions , options ) ;
14
15
15
- for ( const key in VInlineFields ) {
16
- app . component ( key , VInlineFields [ key ] ) ;
17
- }
16
+ app . component ( 'VInlineAutocomplete' , defineAsyncComponent (
17
+ ( ) => import ( './components/VInlineAutocomplete/VInlineAutocomplete.vue' ) )
18
+ ) ;
19
+
20
+ app . component ( 'VInlineCheckbox' , defineAsyncComponent (
21
+ ( ) => import ( './components/VInlineCheckbox/VInlineCheckbox.vue' ) )
22
+ ) ;
23
+
24
+ app . component ( 'VInlineCustomField' , defineAsyncComponent (
25
+ ( ) => import ( './components/VInlineCustomField/VInlineCustomField.vue' ) )
26
+ ) ;
27
+
28
+ app . component ( 'VInlineSelect' , defineAsyncComponent (
29
+ ( ) => import ( './components/VInlineSelect/VInlineSelect.vue' ) )
30
+ ) ;
31
+
32
+ app . component ( 'VInlineSwitch' , defineAsyncComponent (
33
+ ( ) => import ( './components/VInlineSwitch/VInlineSwitch.vue' ) )
34
+ ) ;
35
+
36
+ app . component ( 'VInlineTextarea' , defineAsyncComponent (
37
+ ( ) => import ( './components/VInlineTextarea/VInlineTextarea.vue' ) )
38
+ ) ;
39
+
40
+ app . component ( 'VInlineTextField' , defineAsyncComponent (
41
+ ( ) => import ( './components/VInlineTextField/VInlineTextField.vue' ) )
42
+ ) ;
18
43
} ;
19
44
20
45
return { install } ;
0 commit comments