Files
xh-medical-sign-web/clinical-web/src/main.ts
T

27 lines
934 B
TypeScript

import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import App from './App.vue'
import { registerDirectives } from './directives'
import router from './router'
import './styles/index.css'
import { ensureDocumentPaperStyle } from './utils/document-paper'
/**
* 文书纸的基础排版 + A4 规格变量(`--doc-paper-*`)在启动时就注入。
*
* DocumentPaper 自己在 setup 期也会幂等注入一次,但**编辑器**的编辑面不是
* `DocumentPaper`(是 WangEditor 的 `[data-slate-editor]`),它也要吃同一套页边距 ——
* 只在组件里注入的话,先进编辑器(还没挂载过任何 DocumentPaper)会拿不到变量。
*/
ensureDocumentPaperStyle()
const app = createApp(App)
const pinia = createPinia()
app.use(pinia).use(router).use(ElementPlus)
registerDirectives(app)
app.mount('#app')