remove unused createComponentWithMixin from vue spec helpers

This commit is contained in:
Lukas Eipert 2018-05-28 11:48:22 +02:00
parent 99c4e46d1d
commit 9a9f758d91
No known key found for this signature in database
GPG Key ID: 148BEA37CB35B2AC
1 changed files with 9 additions and 21 deletions

View File

@ -1,30 +1,18 @@
import Vue from 'vue';
const mountComponent = (Component, props = {}, el = null) =>
new Component({
propsData: props,
}).$mount(el);
const mountComponent = (Component, props = {}, el = null) => new Component({
propsData: props,
}).$mount(el);
export const createComponentWithStore = (Component, store, propsData = {}) => new Component({
store,
propsData,
});
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;