Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix(installation): testing vue-demi
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Dec 28, 2020
1 parent 6f9fb3b commit 1cce47d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/dynamicForms.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App } from 'vue-demi';
import { App, isVue2 } from 'vue-demi';
import { dynamicFormsSymbol } from './useApi';
import DynamicForm from './components/dynamic-form/DynamicForm.vue';
import { FormOptions } from './core/models';
Expand All @@ -20,6 +20,15 @@ export function createDynamicForms(
options,
install(app: App) {
const self = this;

if (isVue2) {
// Vue 2 only
console.log('IS VUEEEE 222');
} else {
// Vue 3 only
console.log('IS VUEEEE 333');
}

app.component('dynamic-form', DynamicForm);
app.provide(dynamicFormsSymbol, self);
},
Expand Down

0 comments on commit 1cce47d

Please sign in to comment.