locale ru
This commit is contained in:
15
src/main.js
15
src/main.js
@ -4,9 +4,11 @@ import Cookies from "js-cookie";
|
||||
|
||||
import ElementPlus from "element-plus";
|
||||
import locale from "element-plus/lib/locale/lang/zh-cn"; // 中文语言
|
||||
|
||||
import "@/assets/styles/index.scss"; // global css
|
||||
|
||||
// import {createI18n} from "vue-i18n";
|
||||
// import {messages} from '@/i18n'
|
||||
|
||||
import App from "./App";
|
||||
import store from "./store";
|
||||
import router from "./router";
|
||||
@ -49,6 +51,7 @@ import TreeSelect from "@/components/TreeSelect";
|
||||
import DictTag from "@/components/DictTag";
|
||||
|
||||
import WangEditor from "@/components/WangEditor";
|
||||
import i18n from "@/i18n";
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
@ -79,6 +82,14 @@ app.use(elementIcons);
|
||||
app.component("svg-icon", SvgIcon);
|
||||
|
||||
directive(app);
|
||||
//
|
||||
// const i18n = createI18n({
|
||||
// locale: 'ru', // set locale
|
||||
// fallbackLocale: 'zh', // set fallback locale
|
||||
// messages, // set locale messages
|
||||
// // If you need to specify other options, you can set other options
|
||||
// // ...
|
||||
// })
|
||||
|
||||
// 使用element-plus 并且设置全局的大小
|
||||
app.use(ElementPlus, {
|
||||
@ -87,4 +98,6 @@ app.use(ElementPlus, {
|
||||
size: Cookies.get("size") || "default",
|
||||
});
|
||||
|
||||
app.use(i18n);
|
||||
|
||||
app.mount("#app");
|
||||
|
||||
Reference in New Issue
Block a user