Skip to content
Merged

Dev #51

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change to use async
  • Loading branch information
webdevnerdstuff committed Mar 13, 2024
commit 018896c3fcc3a8a550f330e7b15dd2b7c90738e9
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
31 changes: 28 additions & 3 deletions src/plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineAsyncComponent } from 'vue';
import { App } from 'vue';
import './styles/main.scss';
import type { SharedProps } from './types';
Expand All @@ -12,9 +13,33 @@ export function createVInlineFields(options: Omit<SharedProps,
const install = (app: App) => {
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 };
Expand Down