import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { Buffer } from 'buffer';


// createApp(App).use(store).use(router).mount('#app')


const app = createApp(App);
app.use(ElementPlus)      // 注册 ElementPlus
app.use(createPinia()); // 注册 Pinia
app.use(store); // 注册 store
app.use(router);
app.config.globalProperties.Buffer = Buffer; // 注册 Buffer

// window.addEventListener('unhandledrejection', event => event.preventDefault());
// window.addEventListener('error', event => event.preventDefault()); // 阻止错误和未处overlay理的 Promise 拒绝事件冒泡到 window 对象
app.mount('#app');

