index.js 1.1 KB

1234567891011121314151617181920212223242526272829
  1. import * as components from './components';
  2. import { default as version } from './version';
  3. import cssinjs from './_util/cssinjs';
  4. export * from './components';
  5. export * from './_util/cssinjs';
  6. export { default as theme } from './theme';
  7. export const install = function (app) {
  8. Object.keys(components).forEach(key => {
  9. const component = components[key];
  10. if (component.install) {
  11. app.use(component);
  12. }
  13. });
  14. app.use(cssinjs.StyleProvider);
  15. app.config.globalProperties.$message = components.message;
  16. app.config.globalProperties.$notification = components.notification;
  17. app.config.globalProperties.$info = components.Modal.info;
  18. app.config.globalProperties.$success = components.Modal.success;
  19. app.config.globalProperties.$error = components.Modal.error;
  20. app.config.globalProperties.$warning = components.Modal.warning;
  21. app.config.globalProperties.$confirm = components.Modal.confirm;
  22. app.config.globalProperties.$destroyAll = components.Modal.destroyAll;
  23. return app;
  24. };
  25. export { version, cssinjs };
  26. export default {
  27. version,
  28. install
  29. };