diff --git a/CHANGELOG.md b/CHANGELOG.md index cefe510..df18df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to the "vuetify-inline-fields" plugin will be documented in this file. +## v1.0.7 +2024-03-13 +[main] (@webdevnerdstuff) +* Change component to use `defineAsyncComponent` + ## v1.0.6 2024-02-26 [main] (@webdevnerdstuff) diff --git a/package.json b/package.json index fd2bd10..861aab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wdns/vuetify-inline-fields", - "version": "1.0.6", + "version": "1.0.7", "description": "Vuetify Inline Fields Component Library offers a comprehensive collection of reusable UI components to create elegant and efficient inline form fields within your applications.", "private": false, "publishConfig": { diff --git a/src/plugin/index.ts b/src/plugin/index.ts index a707325..615b9de 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -1,3 +1,4 @@ +import { defineAsyncComponent } from 'vue'; import { App } from 'vue'; import './styles/main.scss'; import type { SharedProps } from './types'; @@ -12,9 +13,33 @@ export function createVInlineFields(options: Omit { app.provide(globalOptions, options); - for (const key in VInlineFields) { - app.component(key, VInlineFields[key]); - } + 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 };