debian-mirror-gitlab/spec/javascripts/helpers/vue_mount_component_helper.js

15 lines
377 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
export const createComponentWithStore = (Component, store, propsData = {}) => new Component({
store,
propsData,
});
2018-05-09 12:01:36 +05:30
export const mountComponentWithStore = (Component, { el, props, store }) =>
new Component({
store,
propsData: props || { },
}).$mount(el);
2018-03-17 18:26:18 +05:30
export default (Component, props = {}, el = null) => new Component({
propsData: props,
}).$mount(el);