"use client"; import { Search, X } from "lucide-react"; import type { FormEvent } from "react"; /** 左图标、可清除、Enter 提交;加高壳层便于后台工具条点按 */ export default function AdminSearchField({ value, onChange, onSubmit, onClear, placeholder, ariaLabel, }: { value: string; onChange: (v: string) => void; onSubmit?: () => void; onClear?: () => void; placeholder?: string; ariaLabel: string; }) { const handleSubmit = (e: FormEvent) => { e.preventDefault(); onSubmit?.(); }; const clear = () => { onChange(""); onClear?.(); }; return (
); }