获得徽章 0
- 有谁使用过 antdx 中的 Sender
const testDemo = () => {
const [inputValue, setInputValue] = useState('');
const [skillValues, setSkillValues] = useState({});
const [configValues, setConfigValues] = useState([]);
const [inputPlaceholder, setInputPlaceholder] = useState('');
useEffect(() => {
setSkillValues({
value: 'agent_id',
title: 'dialog_name',
closable: false,
});
setConfigValues([{ type: 'text', value: '' }]);
setInputPlaceholder('请输入问答内容...');
}, []);
return (
<>
<Sender
key="custom-sender-chat-input"
className="custom-sender-box"
suffix={false}
autoSize={{ minRows: 3, maxRows: 6 }}
placeholder={inputPlaceholder}
value={inputValue}
onChange={setInputValue}
onCompositionStart={handleCompositionStart}
onCompositionEnd={handleCompositionEnd}
skill={skillValues}
slotConfig={configValues}
/>
</>
);
}
这么写刷新页面后,在中文输入法的情况,输入的第一个字符,不会弹出中文展开1点赞