2021-06-26 01:35:40 +00:00
|
|
|
import type { App } from 'vue';
|
2018-03-21 13:16:11 +00:00
|
|
|
|
2021-06-23 13:47:53 +00:00
|
|
|
import * as components from './components';
|
2019-01-12 03:33:27 +00:00
|
|
|
import { default as version } from './version';
|
2021-06-23 13:47:53 +00:00
|
|
|
export * from './components';
|
|
|
|
|
2021-06-23 15:08:16 +00:00
|
|
|
export const install = function (app: App) {
|
2021-06-23 13:47:53 +00:00
|
|
|
Object.keys(components).forEach(key => {
|
|
|
|
const component = components[key];
|
|
|
|
if (component.install) {
|
|
|
|
app.use(component);
|
|
|
|
}
|
2019-01-12 03:33:27 +00:00
|
|
|
});
|
|
|
|
|
2021-06-23 13:47:53 +00:00
|
|
|
app.config.globalProperties.$message = components.message;
|
|
|
|
app.config.globalProperties.$notification = components.notification;
|
|
|
|
app.config.globalProperties.$info = components.Modal.info;
|
|
|
|
app.config.globalProperties.$success = components.Modal.success;
|
|
|
|
app.config.globalProperties.$error = components.Modal.error;
|
|
|
|
app.config.globalProperties.$warning = components.Modal.warning;
|
|
|
|
app.config.globalProperties.$confirm = components.Modal.confirm;
|
|
|
|
app.config.globalProperties.$destroyAll = components.Modal.destroyAll;
|
2020-10-13 11:14:56 +00:00
|
|
|
return app;
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-18 14:02:43 +00:00
|
|
|
|
2021-06-23 13:47:53 +00:00
|
|
|
export { version };
|
2018-04-19 08:42:55 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
version,
|
|
|
|
install,
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|