web/src/views/employee/index.vue
@@ -10,17 +10,12 @@
          placeholder="请输入员工名称"
          style="width: 200px"
          clearable
          @keyup.enter="handleSearch"
        >
          <template #prefix>
            <el-icon><Search /></el-icon>
          </template>
        </el-input>
        />
        <el-button type="primary" @click="handleSearch">
          <el-icon><Search /></el-icon>
          搜索
          查询
        </el-button>
        <el-button type="success" @click="handleAdd">
        <el-button type="primary" @click="handleAdd">
          <el-icon><Plus /></el-icon>
          新增员工
        </el-button>
@@ -40,15 +35,11 @@
            {{ formatDateTime(row.createTime) }}
          </template>
        </el-table-column>
        <el-table-column label="操作" width="150" fixed="right">
        <el-table-column label="操作" width="120" fixed="right">
          <template #default="{ row }">
            <div class="table-actions">
              <el-button type="warning" size="small" @click="handleEdit(row)">
                编辑
              </el-button>
              <el-button type="danger" size="small" @click="handleDelete(row)">
                删除
              </el-button>
              <el-button type="warning" size="small" @click="handleEdit(row)" :icon="Edit" circle title="编辑"></el-button>
              <el-button type="danger" size="small" @click="handleDelete(row)" :icon="Delete" circle title="删除"></el-button>
            </div>
          </template>
        </el-table-column>
@@ -72,6 +63,7 @@
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Search, Plus, Edit, Delete } from '@element-plus/icons-vue'
import { employeeApi, type Employee } from '@/api/employee'
import EmployeeForm from './EmployeeForm.vue'
@@ -204,6 +196,7 @@
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: flex-end;
  }
  
  .table-actions {