import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import '@/assets/main.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import locale from 'element-plus/es/locale/lang/zh-cn';
import './assets/css/apple-input.css'

import { parseTime } from './utils/common'

const app = createApp(App)

// 全局属性挂载
app.config.globalProperties.parseTime = parseTime
app.config.globalProperties.getFilePrefix = "/api/files/get?fileName="

// 注册图标全局组件
Object.keys(ElementPlusIconsVue).forEach((key) => {
  app.component(key, ElementPlusIconsVue[key]);
});

app.use(router)
app.use(ElementPlus, {locale})

app.mount('#app')
