Skip to content

Commit d511897

Browse files
committed
fix: builder created by factory method is not compiled
1 parent ccb0bf8 commit d511897

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/components/FormBuilder.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,5 @@ const options = {
116116
}
117117
};
118118
119-
export function createFormBuilder({ components = {} } = {}) {
120-
return {
121-
...options,
122-
components
123-
};
124-
}
125-
126119
export default options;
127120
</script>

src/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
import FormBuilder, { createFormBuilder } from './components/FormBuilder.vue';
1+
import FormBuilder from './components/FormBuilder.vue';
22

3-
const install = function installFormBuilder(Vue) {
3+
const install = function(Vue) {
44
Vue.component('form-builder', FormBuilder);
55
};
66

7+
const createFormBuilder = function(options = {}) {
8+
return {
9+
...FormBuilder,
10+
...options
11+
};
12+
};
13+
714
export { FormBuilder, createFormBuilder };
815

916
export default {

0 commit comments

Comments
 (0)