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

Commit eaa5f33

Browse files
committed
Prototyping utils into vue
1 parent 3061533 commit eaa5f33

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

dev/vue/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ export default {
201201
name: 'app',
202202
data,
203203
methods,
204+
mounted() {
205+
console.log(this.$formUtils);
206+
},
204207
};
205208
</script>
206209
<style lang="scss">

dev/vue/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Vue from 'vue';
22
import App from './App.vue';
33
import './styles/main.scss';
44

5-
import VueDynamicForms from '../../src/index'; // Dev
5+
import VueDynamicForms from '@/index'; // Dev
66
// import VueDynamicForms from '@asigloo/vue-dynamic-forms' // Prod
77

88
Vue.config.productionTip = false;

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import DynamicForm from './components/dynamic-form/DynamicForm.vue';
22
import DynamicInput from './components/dynamic-input/DynamicInput.vue';
3-
export * from './core/utils';
3+
import utils from './core/utils';
4+
45
const version = process.env.VERSION || require('../package.json').version;
56

67
export let _Vue;
@@ -11,6 +12,8 @@ export function install(Vue) {
1112

1213
_Vue = Vue;
1314

15+
Vue.prototype.$formUtils = utils;
16+
1417
Vue.component('dynamic-form', DynamicForm);
1518
Vue.component('dynamic-input', DynamicInput);
1619
}
@@ -25,6 +28,8 @@ if (typeof window !== 'undefined' && window.Vue) {
2528
window.Vue.use(AsDynamicForms);
2629
}
2730

31+
export * from './core/utils';
32+
2833
export { DynamicForm, DynamicInput };
2934

3035
export default AsDynamicForms;

0 commit comments

Comments
 (0)