
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import * as utils from '@/utils/common'
window.$utils = utils
// 工具包
import * as mUtils from 'maxiliam-utils'
import moment from 'moment'
window.$moment = moment
import * as $api from '@/utils/api'
window.$api = $api

// 全局状态管理
import { createPinia } from 'pinia'
// 重置css
import '@/assets/styles/reset.scss'
import '@/assets/styles/pagecss.scss'
// 使用svg图标组件
import 'virtual:svg-icons-register'
// 防止Xss攻击的v-html
import VueDomPurifyHTML from 'vue-dompurify-html'
// 引入elementplus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/el-message.css'
// // 引入VFormRender组件
// import VFormRender from 'vform3-builds/dist/render.umd.js'
// // 引入VFormRender样式
import 'vform3-builds/dist/render.style.css'
import 'vform3-builds/dist/designer.style.css' //引入VForm3样式
import VForm3 from 'vform3-builds' //引入VForm3库
// 引入全局指令
import directive from '@/directive'
// 初始化项目尺寸 1920 * 1080
mUtils.setRemSize(1920, 1080)
const pinia = createPinia()

const app = createApp(App)
app.config.globalProperties.$utils = utils
app.config.globalProperties.$moment = moment
app.use(pinia)
app.use(VueDomPurifyHTML)
app.use(ElementPlus)

// app.use(VFormRender)
app.use(VForm3) //全局注册VForm3(同时注册了v-form-designe、v-form-render等组件)
app.use(router)

directive(app)

app.mount('#app')
