import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from './App.vue';
import router from './router';
import { directive } from '/@/directive';
import other from '/@/utils/other';
//  引入element
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import '/@/theme/index.scss';
// 分页组件
import Pagination from '/@/components/Pagination/index.vue';
// 空组件
import Empty from '/@/components/Empty/index.vue';

// 图片预览
import 'viewerjs/dist/viewer.css';
import VueViewer from 'v-viewer';

const app = createApp(App);

// 自定义指令和svg组件
directive(app);
other.elSvg(app);
// app.config.errorHandler = async (err: any, instance: any, info: any) => {
//     // 错误日志
//     if (appConfig.clientLog) console.log('globalError: ', err, instance, info);
// }
// 全局组件挂载
app.component('Pagination', Pagination)
app.component('Empty', Empty);

app.use(pinia).use(router).use(ElementPlus).use(VueViewer).mount('#app');


