2024-08-15 10:51:58 +08:00
|
|
|
import { createApp,nextTick } from 'vue';
|
2024-05-21 16:42:16 +08:00
|
|
|
import App from '/@/App.vue';
|
|
|
|
import { saasInit } from '/nerv-lib/saas';
|
|
|
|
import { apiModule } from '/@/api';
|
|
|
|
import { appConfig } from '/@/config';
|
|
|
|
import './theme/global.less';
|
|
|
|
import { LeftOutlined } from '@ant-design/icons-vue';
|
2024-06-28 14:49:40 +08:00
|
|
|
import { setupGlobDirectives } from '/@/directives';
|
2024-08-15 10:51:58 +08:00
|
|
|
import * as Icons from '@ant-design/icons-vue'
|
2024-05-21 16:42:16 +08:00
|
|
|
const app = createApp(App);
|
2024-08-15 10:51:58 +08:00
|
|
|
// 屏蔽黄色警告信息
|
|
|
|
app.config.warnHandler = () => null;
|
|
|
|
nextTick(() => {
|
|
|
|
// 配置全局对象
|
|
|
|
app.config.globalProperties.$icons = Icons
|
|
|
|
// Antd 注入全部图标(这样注入之后,就可以全局直接使用 icon 组件,不需要每个页面去引入了)
|
|
|
|
for (const key in Icons) { app.component(key, Icons[key as keyof typeof Icons]) }
|
|
|
|
})
|
2024-05-21 16:42:16 +08:00
|
|
|
app.component('LeftOutlined', LeftOutlined);
|
2024-06-28 14:49:40 +08:00
|
|
|
|
|
|
|
// Register global directive
|
|
|
|
// 注册全局指令
|
|
|
|
setupGlobDirectives(app);
|
|
|
|
|
2024-05-21 16:42:16 +08:00
|
|
|
saasInit({
|
|
|
|
app,
|
|
|
|
apiModule,
|
|
|
|
appConfig,
|
|
|
|
});
|
|
|
|
app.mount('#app');
|