index.js 361 B

1234567891011121314151617181920
  1. import Ueditor from './ueditor/index.js';
  2. import Vue from 'vue';
  3. const components = [
  4. Ueditor
  5. ];
  6. function install(Vue) {
  7. Vue.prototype.$httpajax = window.axios;
  8. components.map(component => {
  9. Vue.component(component.name, component);
  10. });
  11. }
  12. if (window.Vue) {
  13. install(window.Vue);
  14. } else {
  15. install(Vue);
  16. }
  17. export default install;