chore(config): 添加项目配置文件和隐私协议

- 添加 .editorconfig 文件统一代码风格
- 添加 .env.development 和 .env.example 环境配置文件
- 添加 .eslintignore 和 .eslintrc.js 代码检查配置
- 添加 .gitignore 版本控制忽略文件配置
- 添加 .prettierignore 格式化忽略配置
- 添加隐私协议HTML文件
- 添加API密钥管理组件基础结构
This commit is contained in:
2026-01-26 14:05:01 +08:00
commit 482e2a2718
1192 changed files with 238401 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<!-- 国际化语言切换组件 -->
<template>
<a-dropdown
:placement="placement"
:overlay-style="{ minWidth: '120px', paddingTop: '17px' }"
>
<slot>
<global-outlined :style="style" />
</slot>
<template #overlay>
<a-menu :selected-keys="language" @click="changeLanguage">
<a-menu-item key="en">English</a-menu-item>
<a-menu-item key="zh_CN">简体中文</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
<script lang="ts" setup>
import type { CSSProperties } from 'vue';
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { GlobalOutlined } from '@ant-design/icons-vue';
import { I18N_CACHE_NAME } from '@/config/setting';
withDefaults(
defineProps<{
// dropdown placement
placement?: any;
// 自定义样式
style?: CSSProperties;
}>(),
{
placement: 'bottom',
style: () => {
return { transform: 'scale(1.08)' };
}
}
);
const { locale } = useI18n();
// 当前显示语言
const language = computed(() => [locale.value]);
/* 切换语言 */
const changeLanguage = ({ key }) => {
locale.value = key;
localStorage.setItem(I18N_CACHE_NAME, key);
window.location.reload();
};
</script>