更新优化调整

This commit is contained in:
2026-02-11 15:49:19 +08:00
parent 1bfe30651e
commit ada5e027fa
11 changed files with 643 additions and 892 deletions

View File

@@ -272,9 +272,10 @@ pages/
**搜索区域设计原则**:
1. **精简显示**: 搜索条件不全部显示,只显示最常用的 1-2 项
2. **优先使用表格筛选**: 对于状态等枚举类型的筛选,优先使用 Ant Design Vue Table 的自定义过滤器功能
3. **高级搜索抽屉**: 其他复杂搜索条件使用抽屉弹出(需要在页面 components 目录下创建 SearchDrawer.vue 组件)
4. **保持界面整洁**: 避免搜索区域占用过多空间
2. **去除 label 属性**: 搜索输入框不使用 label 属性,通过 placeholder 直接说明用途,保持界面简洁
3. **优先使用表格筛选**: 对于状态等枚举类型的筛选,优先使用 Ant Design Vue Table 的自定义过滤器功能
4. **高级搜索抽屉**: 其他复杂搜索条件使用抽屉弹出(需要在页面 components 目录下创建 SearchDrawer.vue 组件)
5. **保持界面整洁**: 避免搜索区域占用过多空间
**实现方式**:
@@ -285,24 +286,17 @@ pages/
<div class="pages-base-layout role-page">
<div class="tool-bar">
<div class="left-panel">
<a-form layout="inline" :model="searchForm">
<!-- 常用搜索条件 -->
<a-form-item label="角色名称">
<a-input v-model:value="searchForm.keyword" placeholder="请输入角色名称" allow-clear style="width: 180px" />
</a-form-item>
<a-form-item>
<a-space>
<a-button type="primary" @click="handleSearch">
<template #icon><search-outlined /></template>
搜索
</a-button>
<a-button @click="handleReset">
<template #icon><redo-outlined /></template>
重置
</a-button>
</a-space>
</a-form-item>
</a-form>
<a-space>
<a-input v-model:value="searchForm.keyword" placeholder="角色名称" allow-clear style="width: 180px" />
<a-button type="primary" @click="handleSearch">
<template #icon><search-outlined /></template>
搜索
</a-button>
<a-button @click="handleReset">
<template #icon><redo-outlined /></template>
重置
</a-button>
</a-space>
</div>
<div class="right-panel">
<a-button type="primary" @click="handleAdd">
@@ -388,19 +382,12 @@ const columns = [
<div class="pages-base-layout user-page">
<div class="tool-bar">
<div class="left-panel">
<a-form layout="inline" :model="searchForm">
<!-- 常用搜索条件 -->
<a-form-item label="用户名">
<a-input v-model:value="searchForm.username" placeholder="请输入用户名" allow-clear style="width: 140px" />
</a-form-item>
<a-form-item>
<a-space>
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
<a-button @click="showAdvancedSearch = true">高级搜索</a-button>
</a-space>
</a-form-item>
</a-form>
<a-space>
<a-input v-model:value="searchForm.username" placeholder="用户名" allow-clear style="width: 140px" />
<a-button type="primary" @click="handleSearch">搜索</a-button>
<a-button @click="handleReset">重置</a-button>
<a-button @click="showAdvancedSearch = true">高级搜索</a-button>
</a-space>
</div>
</div>
@@ -472,8 +459,6 @@ const handleAdvancedSearch = (formData) => {
</template>
<script setup>
import { reactive } from 'vue'
defineProps({
visible: Boolean,
formData: {