-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.ts
49 lines (37 loc) · 1.42 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { defineAsyncComponent } from 'vue';
import { App } from 'vue';
import './styles/main.scss';
import type { SharedProps } from './types';
import * as VInlineFields from '@components/index';
export const globalOptions = Symbol();
export function createVInlineFields(options: Omit<SharedProps,
'disabled' | 'label' | 'loading' | 'name'
> = {}) {
const install = (app: App) => {
app.provide(globalOptions, options);
app.component('VInlineAutocomplete', defineAsyncComponent(
() => import('./components/VInlineAutocomplete/VInlineAutocomplete.vue'))
);
app.component('VInlineCheckbox', defineAsyncComponent(
() => import('./components/VInlineCheckbox/VInlineCheckbox.vue'))
);
app.component('VInlineCustomField', defineAsyncComponent(
() => import('./components/VInlineCustomField/VInlineCustomField.vue'))
);
app.component('VInlineSelect', defineAsyncComponent(
() => import('./components/VInlineSelect/VInlineSelect.vue'))
);
app.component('VInlineSwitch', defineAsyncComponent(
() => import('./components/VInlineSwitch/VInlineSwitch.vue'))
);
app.component('VInlineTextarea', defineAsyncComponent(
() => import('./components/VInlineTextarea/VInlineTextarea.vue'))
);
app.component('VInlineTextField', defineAsyncComponent(
() => import('./components/VInlineTextField/VInlineTextField.vue'))
);
};
return { install };
}
export default VInlineFields;
export * from '@components/index';