index.js 947 B

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