<!-- @format -->

<script setup lang="ts">
const { locale, locales, setLocale } = useI18n()
function handleClick(key: any) {
  setLocale(key)
  // window.location.reload()
}
</script>

<template>
  <el-dropdown :hide-on-click="false" @command="handleClick">
    <svgo-language class="!w-24px !h-24px " />
    <template #dropdown>
      <el-dropdown-menu>
        <el-dropdown-item command="zh-CN">
          CN 简体中文
        </el-dropdown-item>
        <el-dropdown-item command="en">
          US English
        </el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
</template>
