BigW Consortium Gitlab

remove unused createComponentWithMixin from vue spec helpers

parent 99c4e46d
import Vue from 'vue';
const mountComponent = (Component, props = {}, el = null) => new Component({
propsData: props,
}).$mount(el);
export const createComponentWithStore = (Component, store, propsData = {}) => new Component({
store,
propsData,
});
const mountComponent = (Component, props = {}, el = null) =>
new Component({
propsData: props,
}).$mount(el);
export const createComponentWithMixin = (mixins = [], state = {}, props = {}, template = '<div></div>') => {
const Component = Vue.extend({
template,
mixins,
data() {
return props;
},
export const createComponentWithStore = (Component, store, propsData = {}) =>
new Component({
store,
propsData,
});
return mountComponent(Component, props);
};
export const mountComponentWithStore = (Component, { el, props, store }) =>
new Component({
store,
propsData: props || { },
propsData: props || {},
}).$mount(el);
export default mountComponent;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment