diff --git a/frontend/src/components/forms/Select.tsx b/frontend/src/components/forms/Select.tsx index 490c2e6..17c878c 100644 --- a/frontend/src/components/forms/Select.tsx +++ b/frontend/src/components/forms/Select.tsx @@ -28,11 +28,13 @@ export type SelectProps = { className?: string id?: string name?: string + /** 禁用时要解释原因(「不能修改自己的角色」),否则灰掉的下拉只会让人反复点 */ + title?: string } export function Select({ value, onChange, options, disabled, placeholder = '请选择', searchThreshold = 8, - size = 'md', ariaLabel, className, id, name + size = 'md', ariaLabel, className, id, name, title }: SelectProps) { const opts = useMemo(() => toOptions(options), [options]) const uid = useId() @@ -141,7 +143,7 @@ export function Select({ return ( -
+
{children}
{actions && ( -