yitisheng-new-web/src/lang/index.js

19 lines
371 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// src/lang/index.js
import { createI18n } from "vue-i18n";
// 自定义语言文件
import zh_CN from "./zh_CN";
import en_US from "./en_US";
const i18n = createI18n({
legacy: false, // 使用 Composition API 模式
locale: "zh_CN", // 语言库
messages: {
zh_CN,
en_US,
},
});
// 将i18n暴露出去在main.js中引入挂载
export default i18n;