Skip to content

Commit 7ff4087

Browse files
Change to use asnyc
1 parent 8038af6 commit 7ff4087

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugin/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { defineAsyncComponent } from 'vue';
12
import type { App } from 'vue';
23
import type { GlobalOptions } from './types';
34
import './styles/main.scss';
@@ -10,7 +11,7 @@ export function createVColorField(options: GlobalOptions = {}) {
1011
const install = (app: App) => {
1112
app.provide(globalOptions, options);
1213

13-
app.component('VColorField', VColorField);
14+
app.component('VColorField', defineAsyncComponent(() => import('./VColorField.vue')));
1415
};
1516

1617
return {

0 commit comments

Comments
 (0)