-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
38 lines (29 loc) · 892 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import App from './App.vue'
import router from '@router/router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import {
weEditorPlusCssRule,
WeEditable,
WeEditor,
WeEditorPlus,
WeToolbar,
registToggleMode,
} from 'wangeditor5-for-vue3'
// 用于支持表单验证
import weFormFields from './plugins/form-fields'
// 用于 shadow 模式
import westyle from '@wangeditor/editor/dist/css/style.css'
weEditorPlusCssRule(westyle)
registToggleMode()
const app = createApp(App)
app.config.globalProperties.$ELEMENT = { size: 'mini' }
app.use(ElementPlus)
app.use(router)
app.config.globalProperties.$weFormFields = weFormFields
app.component(WeToolbar.name, WeToolbar)
app.component(WeEditable.name, WeEditable)
app.component(WeEditor.name, WeEditor)
app.component(WeEditorPlus.name, WeEditorPlus)
app.mount('#app')