index.js 765 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import Newly from "./Newly";
  2. import RoseCon from './RoseCon'
  3. import TrendCon from "./TrendCon";
  4. import PieCon from './PieCon'
  5. import CityRank from "./CityRank";
  6. import wordCloud from "./wordCloud";
  7. import test from "./test";
  8. const components = {
  9. RoseCon,
  10. PieCon,
  11. TrendCon,
  12. Newly,
  13. CityRank,
  14. wordCloud,
  15. test,
  16. };
  17. const install = (Vue = {}) => {
  18. if (install.installed) return;
  19. Object.keys(components).forEach(component => {
  20. Vue.component(components[component].name, components[component]);
  21. });
  22. install.installed = true;
  23. };
  24. install.installed = false;
  25. if (typeof window !== "undefined" && window.Vue) {
  26. install(window.Vue);
  27. install.installed = true;
  28. }
  29. const Vcomp = {
  30. ...components,
  31. install
  32. };
  33. export default Vcomp