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,81 @@
<!-- 选择下拉框 -->
<template>
<a-select
:allow-clear="allowClear"
:show-search="showSearch"
optionFilterProp="label"
:options="data"
:value="value"
:placeholder="placeholder"
@update:value="updateValue"
:style="`width: ${width}px`"
@blur="onBlur"
@change="onChange"
/>
</template>
<script lang="ts" setup>
import { ref, watch } from 'vue';
import { listSpecValue } from '@/api/shop/specValue';
const props = withDefaults(
defineProps<{
value?: string;
placeholder?: string;
showSearch?: string;
allowClear?: boolean;
width?: number;
specId?: number;
index?: number;
}>(),
{
placeholder: '请选择服务器厂商'
}
);
// specValues
const data = ref<any>([]);
const emit = defineEmits<{
(e: 'update:value', value: string): void;
(e: 'blur'): void;
(e: 'done', value: any, index: number): void;
}>();
/* 更新选中数据 */
const updateValue = (value: string) => {
emit('update:value', value);
};
/* 失去焦点 */
const onBlur = () => {
emit('blur');
};
const onChange = (value: any) => {
console.log(value);
data.value.map((d) => {
if (d.value == value) {
emit('done', d, Number(props.index));
}
});
};
watch(
() => props.specId,
(specId) => {
if (specId) {
listSpecValue({ specId }).then((list) => {
data.value = list.map((v) => {
v.label = v.specValue;
v.value = v.specValue;
return v;
});
});
} else {
data.value = [];
}
},
{ immediate: true }
);
</script>