chore(config): 添加项目配置文件和隐私协议
- 添加 .editorconfig 文件统一代码风格 - 添加 .env.development 和 .env.example 环境配置文件 - 添加 .eslintignore 和 .eslintrc.js 代码检查配置 - 添加 .gitignore 版本控制忽略文件配置 - 添加 .prettierignore 格式化忽略配置 - 添加隐私协议HTML文件 - 添加API密钥管理组件基础结构
This commit is contained in:
48
src/components/DesignHeader/index.vue
Normal file
48
src/components/DesignHeader/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div :class="item.name" :style="item.style" @mousedown="onClick">
|
||||
<div class="logo">
|
||||
<a-image
|
||||
src="https://oss.wsdns.cn/20240311/63b56fd176c14a5ca634254edefed4e3.png"
|
||||
:width="item.style"
|
||||
:preview="false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
const props = defineProps<{
|
||||
// 是否显示
|
||||
visible: boolean;
|
||||
// 修改回显的数据
|
||||
data?: any | null;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'done', item: any): void;
|
||||
(e: 'update:visible', visible: boolean): void;
|
||||
}>();
|
||||
|
||||
const item = ref<any>({
|
||||
body: { backgroundColor: '#ffffff' }
|
||||
});
|
||||
|
||||
const onClick = () => {
|
||||
// if (item.value.body.border) {
|
||||
// item.value.body.border = '';
|
||||
// } else {
|
||||
// item.value.body.border = '1px dashed #dddddd';
|
||||
// }
|
||||
emit('done', props.data);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(data) => {
|
||||
item.value = data;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
<style scoped lang="less"></style>
|
||||
Reference in New Issue
Block a user