mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-03-05 15:05:27 +00:00
多文件编辑支持
This commit is contained in:
20
src/main.js
20
src/main.js
@@ -3,22 +3,26 @@ import App from './App.vue'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
|
||||
import Vue3DraggableResizable from 'vue3-draggable-resizable'
|
||||
// default styles
|
||||
import 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'
|
||||
|
||||
import { createI18n } from 'vue-i18n'
|
||||
|
||||
// 引入语言文件
|
||||
import zh from './locales/zh.json'
|
||||
import ja from './locales/ja.json'
|
||||
|
||||
import { createPinia } from 'pinia' // 导入 Pinia
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
|
||||
|
||||
// 获取用户的首选语言
|
||||
const userLanguage = navigator.language
|
||||
|
||||
@@ -40,10 +44,10 @@ const i18n = createI18n({
|
||||
},
|
||||
})
|
||||
|
||||
app.use(i18n)
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
|
||||
const pinia = createPinia() // 创建 Pinia 实例
|
||||
|
||||
app.use(pinia) // 使用 Pinia
|
||||
.use(i18n)
|
||||
.use(ElementPlus)
|
||||
.use(Vue3DraggableResizable)
|
||||
.mount('#app')
|
||||
Reference in New Issue
Block a user