import {
	createApp
} from 'vue'
import {
	createPinia
} from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

//引入element-plus库
// 引入Grid Layout Plus库
import { GridLayout, GridItem } from 'grid-layout-plus'

import ElementPlus from 'element-plus'  
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
//引入VForm3库
import VForm3 from 'vform3-builds'   
import 'vform3-builds/dist/designer.style.css'   


//引入dayjs库
import dayjs from 'dayjs'
dayjs.locale('zh-cn') 


import routers from './router'
 


import axios from '@/axios'
import tools from '@/tools'
import router from '@/router'

 


import './style.css'
// import "@/style/cust.css"
import '@/style/sx.css'
 
// import "@/style/index.css"
// import "@/style/tabletree.css"


import App from './App.vue'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
const app = createApp(App)


app.component('GridLayout', GridLayout).component('GridItem', GridItem)

app.use(pinia) 
app.use(routers) 
app.use(ElementPlus, {
  locale: zhCn
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}
app.use(VForm3) 


import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
app.component('Splitpanes', Splitpanes)
app.component('Pane', Pane)

import 'virtual:svg-icons-register'
import gloalComponent from "@/components/index.ts";
app.use(gloalComponent)
// app.component('QuillEditor', QuillEditor)


app.config.globalProperties.$axios = axios 
app.config.globalProperties.$tools = tools 
app.config.globalProperties.$router = router 
app.config.globalProperties.$dayjs = dayjs 
app.mount('#app')