From 018896c3fcc3a8a550f330e7b15dd2b7c90738e9 Mon Sep 17 00:00:00 2001 From: WebDevNerdStuff Date: Wed, 13 Mar 2024 13:57:34 -0700 Subject: [PATCH 1/2] Change to use async --- CHANGELOG.md | 5 +++++ src/plugin/index.ts | 31 ++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) 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/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 }; From 237988db35cc3612ed93a4de12bb27e9111b360c Mon Sep 17 00:00:00 2001 From: WebDevNerdStuff Date: Wed, 13 Mar 2024 13:57:51 -0700 Subject: [PATCH 2/2] 1.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": {