<template>
  <el-config-provider :locale="locale">
    <router-view v-slot="{ Component }">
      <keep-alive>
        <component :is="Component" :key="$route.name" v-if="route.meta.keepAlive" />
      </keep-alive>
      <component :is="Component" :key="$route.name" v-if="!route.meta.keepAlive" />
    </router-view>
  </el-config-provider>
</template>

<script setup>
import zhCn from 'element-plus/es/locale/lang/zh-cn'

const locale = ref(zhCn)

const route = useRoute()

onMounted(() => {
  console.log(import.meta.env.VITE_APP_ENV)
})

</script>

<style lang="scss"></style>