fix(agent): force form re-render when clicking tag to fill description

main
sp mac bookpro 2605 2026-05-24 19:42:07 +08:00
parent 0793d8549e
commit 3d46372688
1 changed files with 6 additions and 1 deletions

View File

@ -838,7 +838,12 @@ export default function AgentEditor() {
{['客服助理', '内容创作', '数据分析', '私人教练'].map((label) => ( {['客服助理', '内容创作', '数据分析', '私人教练'].map((label) => (
<span <span
key={label} key={label}
onClick={() => form.setFieldsValue({ description: label })} onClick={() => {
// 这里需要通知表单重新渲染
form.setFieldsValue({ description: label });
// 为了确保组件感知到变化,强制触发一下更新(如果表单没有响应)
form.validateFields(['description']);
}}
style={{ style={{
padding: '6px 10px', padding: '6px 10px',
borderRadius: 999, borderRadius: 999,