mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 19:18:07 +08:00
32 lines
962 B
TypeScript
32 lines
962 B
TypeScript
import type { App } from 'vue';
|
|
|
|
import * as components from './components';
|
|
import { default as version } from './version';
|
|
export * from './components';
|
|
|
|
export const install = function (app: App) {
|
|
Object.keys(components).forEach(key => {
|
|
const component = components[key];
|
|
if (component.install) {
|
|
app.use(component);
|
|
}
|
|
});
|
|
|
|
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;
|
|
return app;
|
|
};
|
|
|
|
export { version };
|
|
|
|
export default {
|
|
version,
|
|
install,
|
|
};
|