<template>
  <el-config-provider size="default" :z-index="1000" :locale="locale">
    <RouterView />
  </el-config-provider>
</template>
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn.mjs'
import en from 'element-plus/es/locale/lang/en.mjs'

const language = ref('zh-cn')
const locale = computed(() => (language.value === 'zh-cn' ? zhCn : en))
// 在组件挂载时清空 localStorage
onMounted(() => {
  localStorage.removeItem('socket_connect')
})
</script>
<style lang="scss">
body {
  margin: 0;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
}

div {
  box-sizing: border-box;
}
li {
  list-style: none;
}
ul,
li {
  margin: 0;
  padding: 0;
}
</style>
