remove unused createComponentWithMixin from vue spec helpers
This commit is contained in:
parent
99c4e46d1d
commit
9a9f758d91
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue