You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
510 B

  1. <template>
  2. <el-config-provider :locale="currentLocale">
  3. <router-view />
  4. </el-config-provider>
  5. </template>
  6. <script lang="ts">
  7. import { ElConfigProvider } from "element-plus";
  8. import zhCn from "element-plus/lib/locale/lang/zh-cn";
  9. import en from "element-plus/lib/locale/lang/en";
  10. export default {
  11. name: "app",
  12. components: {
  13. [ElConfigProvider.name]: ElConfigProvider
  14. },
  15. computed: {
  16. currentLocale() {
  17. return this.$storage.locale?.locale === "zh" ? zhCn : en;
  18. }
  19. }
  20. };
  21. </script>