import { createApp } from 'vue'
import '@/assets/styles/style.less'
import App from './App.vue'
import router from '@/router/index'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import '@/polyfill/polyfill'
import '@/assets/styles/scroll-bar.less'
// 国际化
import i18n from '../locales'
// icons 相关
import 'virtual:svg-icons-register'
import SvgIcon from './components/svgIcon/SvgIcon.vue'
import 'vue-global-api'

const app = createApp(App)
const store = createPinia()
store.use(piniaPluginPersistedstate)
// 挂载store
app.use(store)
app.use(i18n)
app.use(Antd)
app.use(router)
app.component('svg-icon', SvgIcon)
app.mount('#app')
