- 添加 .editorconfig 文件统一代码风格 - 配置 .env.development 环境变量文件 - 创建 .env.example 环境变量示例文件 - 设置 .eslintignore 忽略检查规则 - 配置 .eslintrc.js 代码检查规则 - 添加 .gitignore 文件忽略版本控制 - 设置 .prettierignore 忽略格式化规则 - 新增隐私政策HTML页面文件 - 创建API密钥编辑组件基础结构
38 lines
789 B
Vue
38 lines
789 B
Vue
<template>
|
|
<div style="max-width: 240px">
|
|
<a-input
|
|
allow-clear
|
|
v-model:value="where.nickname"
|
|
placeholder="输入用户昵称"
|
|
prefix-icon="el-icon-search"
|
|
@change="search"
|
|
>
|
|
<template #prefix>
|
|
<SearchOutlined class="ele-text-placeholder" />
|
|
</template>
|
|
</a-input>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { reactive } from 'vue';
|
|
import { SearchOutlined } from '@ant-design/icons-vue';
|
|
import type { WhereType } from './types';
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'search', where: WhereType): void;
|
|
}>();
|
|
|
|
// 搜索表单
|
|
const where = reactive<WhereType>({
|
|
keywords: '',
|
|
nickname: '',
|
|
phone: ''
|
|
});
|
|
|
|
/* 搜索 */
|
|
const search = () => {
|
|
emit('search', where);
|
|
};
|
|
</script>
|