yoho-plugin.js
449 Bytes
/**
* 插件
*/
import components from '../components/common';
const yohoPlugin = {
install(Vue, options) {
if (options.apiDomains) {
Vue.prototype.$api = options.apiDomains;
}
if (options.config) {
Vue.prototype.$config = options.config;
}
components.forEach(component => {
Vue.component(component.name, component);
});
}
};
export default yohoPlugin;